You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've gone through articles that we found to ensure that this is not a duplicate issue. The swagger documentation does not pick up the correct version of the model class if the model is present in other referred micro services.
What version of the library are you using? Is it the latest version? The latest released version is [ ![Download]
We are using the following JAR's with version 1.6.9, but the issue is occurring even with the version 1.6.12.
org.springdoc
springdoc-openapi-webflux-core
1.6.9,
org.springdoc
springdoc-openapi-webflux-ui
1.6.9,
org.springdoc
springdoc-openapi-ui
1.6.9,
What kind of issue is this?
We have a model class that is referred in 3 other services that we have. When we check the documentation in swagger, the model definition that shows up, refers to the model of one of the referred service, instead of the service where it is defined. This issue does not occur for all models with the same name, but its occurring for some model documentations for certain services. The same model is causing a problem in all other services where it is referred in the swagger documentation.
Question. Is this a question about how to do a certain thing?
No, it's a defect that is occurring in our applications.
Bug report.
REST API specification: @GetMapping(value = "/personal/education",
produces = {APPLICATION_STREAM_JSON_VALUE})
Mono<Personal.Education> education(@PathVariable(name = "context") final String profileContext, final String id);
The documentation that comes up for this API is incorrect and as shown below.
{
"degree": {
"code": "string",
"description": "string"
},
"major": {
"code": "string",
"description": "string"
},
"school": {
"code": "string",
"description": "string"
}
}
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Education {
private MetaData meta;
private List<EducationExt> educations;
}
}
For now, we have a workaround by adding the following annotation of @Schema.
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "success", content = {@content(
mediaType = "application/json",
schema = @Schema(implementation = Personal.Education.class))})}
Kindly help us to resolve this issue.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We've gone through articles that we found to ensure that this is not a duplicate issue. The swagger documentation does not pick up the correct version of the model class if the model is present in other referred micro services.
We are using the following JAR's with version 1.6.9, but the issue is occurring even with the version 1.6.12.
Question. Is this a question about how to do a certain thing?
No, it's a defect that is occurring in our applications.
Bug report.
REST API specification:
@GetMapping(value = "/personal/education",
produces = {APPLICATION_STREAM_JSON_VALUE})
Mono<Personal.Education> education(@PathVariable(name = "context") final String profileContext, final String id);
The documentation that comes up for this API is incorrect and as shown below.
{
"degree": {
"code": "string",
"description": "string"
},
"major": {
"code": "string",
"description": "string"
},
"school": {
"code": "string",
"description": "string"
}
}
The expected documentation for Personal.Education object is:
{
"meta": {
"empty": true,
"additionalProp1": [
{}
],
"additionalProp2": [
{}
],
"additionalProp3": [
{}
]
},
"educations": [
{
"externalData": true,
"education": "string"
}
]
}
Personal.java has the following snippet for the Education object.
@DaTa
@builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
public class Personal {
..
private Education education;
....
}
For now, we have a workaround by adding the following annotation of @Schema.
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "success", content = {@content(
mediaType = "application/json",
schema = @Schema(implementation = Personal.Education.class))})}
Kindly help us to resolve this issue.
The text was updated successfully, but these errors were encountered: