-
Notifications
You must be signed in to change notification settings - Fork 102
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
Response HTTP status is not enclosed in quotation marks in YAML format #139
Comments
Hey @uladzimir-tsyperman , thanks for the report! Relevant quote from the spec:
|
This seems to be an (upstream) serialization issue. We are correctly passing HTTP status as Strings to the OpenAPI 3 model classes, see: https://github.com/ePages-de/restdocs-api-spec/blob/master/restdocs-api-spec-openapi3-generator/src/main/kotlin/com/epages/restdocs/apispec/openapi3/OpenApi3Generator.kt#L300 Seems to be a similar issue to this upstream issue. return if (yamlFormats.contains(format)) {
Yaml.pretty().apply {
(factory as YAMLFactory).configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, false)
}.writeValueAsString(openApi)
} else {
Json.pretty().writeValueAsString(openApi)
} in https://github.com/ePages-de/restdocs-api-spec/blob/master/restdocs-api-spec-openapi3-generator/src/main/kotlin/com/epages/restdocs/apispec/openapi3/ApiSpecificationWriter.kt might do the trick. But first I'd suggest to bump the |
022cfe4 (version bump) seems to have solved it. Before I was getting:
After the version bump:
|
HTTP status in
responses
section is not enclosed in quotation marks as it is required by OpenAPI 3 specification: https://swagger.io/specification/#responses-objectActual:
To be:
The text was updated successfully, but these errors were encountered: