swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

CustomResolver's Results get overwritten by default ModelResolver

Open alaturoz opened this issue 5 months ago • 0 comments

I am experiencing an issue while trying to add a Custom ModelResolver to the Model Resolving Process. As described in https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Extensions#extending-core-resolver I extend the ModelResolver Class and override the "resolveDescription" Method to create a custom Description for some Schema's.

Problem: When adding a Custom Resolver that returns a custom description (Originial Description in the Annotation + Custom Part) for some Schema's. The Custom Description is Overwritten because of reResolving in the default ModelResolver (See https://github.com/swagger-api/swagger-core/blob/852ed24f50f7b5f3cf9d162346362cdff25acc1f/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/ModelResolver.java#L828 )

Is this intended? Is there a way to Customize Description Resolving ?

alaturoz avatar May 26 '25 08:05 alaturoz