Skip to content

Subschema examples #249

@heyarny

Description

@heyarny

I'd like to use the new subschema feature, but can't seem to get it to work.

Adding the attribute to the sub model like so:

fieldWithPath("recipes[]").optional().attributes(schema("RecipeData"))
                .description("List of recipes."),

generates a resource.json:

...
{
      "attributes" : {
        "schemaName" : "RecipeData"
      },
      "description" : "List of recipes.",
      "ignored" : false,
      "path" : "data.recipes[]",
      "type" : "ARRAY",
      "optional" : true
    },
...

But openapi.json doesn't seem to get affected at all.
How to use the newly released feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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