Problem statement:
After generating openapi.yaml successfully, I tried to load the data in swagger editor. Got error: can not read a block mapping entry; a multiline key may not be an implicit key. This blocks the loading of the file.
Further investigating the file, there are properties where full text with newline wrapped correctly. Wherever newline got placed as literally as \n worked fine. In the example below, responses.description worked fine. The error is in responses.content.schema.description (bolded for easy viewing)
, where the new line wrapped the text to next line. Same module (enunciate-openapi) interpreted the same data differently. Can this be fixed?
responses:
"204":
description: "JAXBElement for API version 30.0 or greater, 204 no_content for older API\nversions"
content:
"/":
schema:
description: JAXBElement for API version 30.0 or greater, 204 no_content for older API
versions
type: string
format: binary
Swagger editor version: open api 3, swagger 2
Problem statement: After generating openapi.yaml successfully, I tried to load the data in swagger editor. Got error: can not read a block mapping entry; a multiline key may not be an implicit key. This blocks the loading of the file.
Further investigating the file, there are properties where full text with newline wrapped correctly. Wherever newline got placed as literally as \n worked fine. In the example below, responses.description worked fine. The error is in responses.content.schema.description (bolded for easy viewing) , where the new line wrapped the text to next line. Same module (enunciate-openapi) interpreted the same data differently. Can this be fixed?
responses: "204": description: "JAXBElement for API version 30.0 or greater, 204 no_content for older API\nversions"
content:
"/":
schema:
description: JAXBElement for API version 30.0 or greater, 204 no_content for older API
versions
type: string
format: binary
See the highlighted text below in the screen shot