Forum Discussion

sahil-ramagiri's avatar
sahil-ramagiri
New Contributor
4 days ago

Avoid caching AnnotationIntrospector to support custom module loading. Issue: #4744

https://github.com/swagger-api/swagger-core/blob/24fca016b28d3f8363b29471312d3678a0f7a542/modules/swagger-core/src/main/java/io/swagger/v3/core/jackson/AbstractModelConverter.java#L46

Issue: Currently, binding the annotation introspector to _intr  in `AbstractModelConverter.java` causes a divergence in functionality between Swagger's annotation introspector and Jackson's annotation introspector. This could lead to inconsistencies, especially when users extend Jackson with custom modules that perform custom annotation introspection.

Solution: To address this, I propose that we avoid binding the introspector directly and instead retrieve the current annotation introspector from _mapper. This approach ensures that both Swagger and Jackson utilize the same introspector, maintaining functionality and consistency across the system.

Use Case: This change is particularly beneficial for users implementing custom annotation introspection

Github Issue Link: https://github.com/swagger-api/swagger-core/issues/4744
Github PR Link: https://github.com/swagger-api/swagger-core/pull/4728

Note: I hope this is the right forum to bring attention to the Github Issue and PR I created. I tried tagging maintainers in the PR, but failed to bring attention.

No RepliesBe the first to reply