Skip to content

Parse association declarations #291

@rsamoilov

Description

@rsamoilov

Parse association calls, extract the blueprint: class reference, and recursively build a nested object schema. Support the name: rename option. Default to array type in the output. Fall back gracefully when the referenced blueprint cannot be resolved (emit an empty object schema, do not raise).

association :projects, blueprint: ProjectBlueprint
# -> "projects": { type: array, items: { ...ProjectBlueprint fields } }

association :company, blueprint: CompanyBlueprint, name: :org
# -> "org": { type: object, properties: { ... } }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions