Closed
Description
Describe the bug
I have an OpenAPI v3 contract interface generated using SpringDoc from Spring Boot java code.
I try to have a JSON requestBody example reference:
"requestBody":{
"description":"A commission to update",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/CommissionDto"
},
"examples":{
"requestExample":{
**"description": "requestExample",**
"$ref":"#/components/examples/httpPutCommissionRequestBodyExample"
}
}
}
},
"required":true
}
but "description" field is added which is not standard, consequently validator failed on my contract interface.
And this came from https://github.com/swagger-api/swagger-core/blob/master/modules/swagger-core/src/main/java/io/swagger/v3/core/util/AnnotationsUtils.java#L317 which is called indirectly by SpringDoc.
To Reproduce
To reproduce I have attached a JUnit test case.
Regards.