ErikWittern / openapi-snippet

Generates code snippets for given Swagger / Open API documents
MIT License
116 stars 67 forks source link

Support $ref in requestBody #49

Closed rohit-gohri closed 4 years ago

rohit-gohri commented 4 years ago

Currently $refs are only resolved in parameters and inside schema.

I have a $ref inside requestBody:

  '/ticket/':
    post:
      operationId: createTicket
      summary: Create Ticket
      requestBody:
        $ref: '../ticket/ticket.v0.yaml#/paths/~1ticket~1create/post/requestBody'

This is not resolved and leads to empty body in samples. But redoc and other tools resolve this successfully