swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.37k stars 2.17k forks source link

Resolve JsonSchema refs #4620

Open brampurnot opened 7 months ago

brampurnot commented 7 months ago

Hi all,

I'm trying to get the Json Schema from the response which is possible by first fetching the schema and then calling the getJsonSchema() function like this:

Schema propsSchema = openAPI.getComponents().getSchemas().get("some-ref");
jsonSchema.getJsonSchema();

This works fine but the refs are not resolved. I did use the swagger-parser to resolve them first which is working fine. However it doesn't seem to be taken into account when generating the Json Schema. Anyone came across this?

Bram