Skip to content
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

Property with same name, jsonProperty and className but different packages Swagger3 (Springboot3 webflux rest) not use inheritance #4757

Open
skyblackhawk opened this issue Oct 10, 2024 · 0 comments

Comments

@skyblackhawk
Copy link

skyblackhawk commented Oct 10, 2024

I have 2 APIs that are implemented as response 200 with 2 different objects (with a property with same name and propertyName with implementation with 2 fullpath package different and same classe name).
I don't know why Swagger generate documents where that property is like it only searches for it the first time it finds it in an API and doesn't search for inheritance from the starting object by scanning the properties with the related subobjects.
As if it build a hashmap without adding the full package path and do not go to look for that object that has a different full package path
The java annotation Schema - implementation (strated from only classNAme.class now I added fullpackage.className.class but it doesn't work):

@ApiResponse( responseCode = "200",
description = "Response successful",
content = @Content(schema = @Schema(implementation = [fullpackageClassName].class)
)),

it isn't using inheritance for that property in the specified class [fullllpackageClassName].class from implementation but is taking that property from a class with the same object name but are in different packages path and the objects even with the same name and same jsonProperty name are different as package.classe.class property.

Is there a way to specify for a property of type object with the java swagger3 annotations that that object is implemented in the correct class specifying the full package?
Or does anyone have a solution for swagger to correctly take the correct object with the [full package].[classe].class

Thanks a lot for your support.

Kind regards.

Correct Object property to print for this API:
image
Swagger print object with same className but different fullPathPackage:
image

@skyblackhawk skyblackhawk changed the title property with same class name but different package Swagger3 by Springboot3 webflux and rest not use ine property same class name different package Swagger3 Springboot3 webflux rest not use inheritance Oct 10, 2024
@skyblackhawk skyblackhawk changed the title property same class name different package Swagger3 Springboot3 webflux rest not use inheritance property same class name different package Swagger3 (Springboot3 webflux rest) not use inheritance Oct 10, 2024
@skyblackhawk skyblackhawk changed the title property same class name different package Swagger3 (Springboot3 webflux rest) not use inheritance property with name, jsonProperty and className but different packages Swagger3 (Springboot3 webflux rest) not use inheritance Oct 10, 2024
@skyblackhawk skyblackhawk changed the title property with name, jsonProperty and className but different packages Swagger3 (Springboot3 webflux rest) not use inheritance Property with same name, jsonProperty and className but different packages Swagger3 (Springboot3 webflux rest) not use inheritance Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant