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 not working #299

Open
heyarny opened this issue Feb 5, 2024 · 0 comments
Open

SubSchema not working #299

heyarny opened this issue Feb 5, 2024 · 0 comments

Comments

@heyarny
Copy link

heyarny commented Feb 5, 2024

I'm trying to use the new SubSchema attribute which was introduced in latest restdocs-api-spec ePages-de/restdocs-api-spec#246

But when using it, I get an exception:

Attribute example:

fieldWithPath("data").attributes(Attributes.key("schemaName").value("cookbookTest123")).description("Cookbook")

Exception:

[ERROR] Unrecognized field "items" (class io.swagger.v3.oas.models.media.Schema), not marked as ignorable (33 known properties: "default", "multipleOf", "minimum", "exclusiveMinimum", "not", "extensions", "xml", "title", "discriminator", "required", "maximum", "nullable", "exclusiveMaximum", "minProperties", "externalDocs", "maxLength", "writeOnly", "uniqueItems", "properties", "maxProperties", "type", "maxItems", "enum", "minItems", "pattern", "minLength", "readOnly", "example", "$ref", "deprecated", "format", "additionalProperties", "description"])
[ERROR]  at [Source: (String)"{"title":"cookbookTest123","multipleOf":null,"maximum":null,"exclusiveMaximum":null,"minimum":null,"exclusiveMinimum":null,"maxLength":null,"minLength":null,"pattern":null,"maxItems":null,"minItems":null,"uniqueItems":null,"maxProperties":null,"minProperties":null,"required":["id","recipeCount","title"],"type":"object","not":null,"properties":{"recipes":{"title":null,"multipleOf":null,"maximum":null,"exclusiveMaximum":null,"minimum":null,"exclusiveMinimum":null,"maxLength":null,"minLength":null,"[truncated 4259 chars]; line: 1, column: 917] (through reference chain: io.swagger.v3.oas.models.media.ObjectSchema["properties"]->java.util.LinkedHashMap["recipes"]->io.swagger.v3.oas.models.media.Schema["items"])

Versions in use:

<restdocs-api-spec.version>0.19.0</restdocs-api-spec.version>
<restdocs-spec.version>0.23</restdocs-spec.version>
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

1 participant