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.36k stars 2.17k forks source link

Open api 3.1.0 model resolvers are not used when generating models for constructor parameters of jax-rs resources #4694

Open Lorenzo-Bracci opened 2 weeks ago

Lorenzo-Bracci commented 2 weeks ago

Issue description

When generating schemas based on constructor parameters of jax-rs resources (which would be operation parameters in open api specs), the ReaderUtils#collectConstructorParameters method is used. This method then delegates the creation of schemas for every parameter to ParameterProcessor#applyAnnotations and this method then takes as input information about wether or not the generated open api should be 3.1.0. This information is nevertheless never propagated, therefore when resolving schemas for constructor parameters during open api 3.1.0 generation the model resolvers for oas 3.0.1 are always used rather than the ones for oas 3.1.0.