-
Notifications
You must be signed in to change notification settings - Fork 119
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
Wrong JSON for response example #420
Comments
So as described in the OpenAPI v2 specification here, the response object contains an "examples" field. The corresponding "Example Object", described here has the mime type as field name and the example response as value. For example, on consumer creation, we have the following in the OpenAPI v2 specification file "responses": {
"200": {
"description": "Consumer created successfully.",
"schema": {
"$ref": "#/definitions/CreatedConsumer"
},
"examples": {
"application/vnd.kafka.v2+json": {
"instance_id": "consumer1",
"base_uri": "http://localhost:8080/consumers/my-group/instances/consumer1"
}
}
} which is compliant with the specification (example object with the mime type {
"instance_id" : "consumer1",
"base_uri" : "http://localhost:8080/consumers/my-group/instances/consumer1"
} and not the entire "Example Object" like this: {
"application/vnd.kafka.v2+json" : {
"instance_id" : "consumer1",
"base_uri" : "http://localhost:8080/consumers/my-group/instances/consumer1"
}
} |
I opened a corresponding issue on the maven plugin project Swagger2Markup/swagger2markup#409 |
The Swagger2Markup was fixed but it's not released yet. We have to wait for the 2.0.0 version. |
I opened this issue about pushing the maintainers to have a new bug-fixed release. |
This was fixed by #602 |
Every response value example in the
paths.adoc
is wrong because it shows a JSON where the field isapplication/vnd.kafka.v2+json
having as a value the actual response.For example, on consumer creation:
while the actual response value is just
The text was updated successfully, but these errors were encountered: