Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subschema examples #249

Open
heyarny opened this issue Oct 11, 2023 · 1 comment
Open

Subschema examples #249

heyarny opened this issue Oct 11, 2023 · 1 comment

Comments

@heyarny
Copy link

heyarny commented Oct 11, 2023

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?

@heyarny heyarny changed the title Use subschema examples Subschema examples Oct 12, 2023
@better789
Copy link

better789 commented Dec 23, 2024

Yeah, when the object field like so List... the schemaName is not available? I don't know, how to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants