-
Notifications
You must be signed in to change notification settings - Fork 533
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
Swagger deserializer ignores JsonSchema.types() for v3.1.0 #1821
Comments
Related #1801 |
This has been addressed by #1846 (fixed bug for 3.1 setting When deserializing/parsing OAS 3.1 / JSON Schema 2020/12 documents, the Programmatic access to In 3.1 Such usage is probably discouraged except in scenarios where the accessed Schema in the OAS document is surely having a single value for |
Consider the following schema:
This schema is deserialized into JsonSchema.

The type is present in
JsonSchema.types
but for some reason the actualJsonSchema.type
is set to"object"
.I've found that the object type is set in
ResolveFully.resolveSchema()
if (property.getProperties() != model.getProperties()) { if (property.getType() == null) { property.setType("object"); }
Also if the open api is of version 3.1 which is in my case then
OpenAPIDeserializer.getJsonSchema()
is being invoked which eventually sets type viaschema.addType(typeString);
.However If open api version is different then 'OpenAPIDeserializer.getSchema()' is being invoked and in this case the type is set via
schema.setType(value);
The text was updated successfully, but these errors were encountered: