Skip to content

Markdown missing a newline after simple response types #27

Closed
@karadaisy

Description

@karadaisy

When a response either has no content or is a reference to a response schema, the newline after it is getting stripped. Here's a small example:

openapi: 3.0.0
info:
  title: Test
  description: Demonstrate newline bug
  version: 0.0.0
paths:
  /cats:
    get:
      summary: Get a list of cats
      responses:
        "200":
          $ref: "#/components/responses/GetCatsResponse"
    post:
      summary: Create a new cat
      responses:
        "200":
          description: Success
    delete:
      summary: Delete a cat
      responses:
        "200":
          description: Success

components:
  responses:
    GetCatsResponse:
      description: List of cats

Renders markdown like this

❯ oad gen-docs -s openapi.yaml -d output.md --style MARKDOWN
...
### GET /cats
Get a list of cats

### Response 200 OK
Refer to the common response description: [GetCatsResponse](#getcatsresponse)### POST /cats
Create a new cat

### Response 200 OK### DELETE /cats
Delete a cat

### Response 200 OK
...

i.e., ### POST and ### DELETE are not on their own line.

Thanks for taking a look!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions