Forum Discussion

MythosAPI's avatar
MythosAPI
New Contributor
4 years ago
Solved

OAS 3.0.3 request schema for an empty JSON body

I am attempting to create an OAS schema for an empty JSON body:     { }     I am trying to get the documentation to show an empty JSON body, and have that autogenerated. The API defines this...
  • MythosAPI's avatar
    4 years ago

    Solved.

          requestBody:
            required: true
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/EmptyBody'
    
    # # # # # # 
    
         EmptyBody:
              type: object
              nullable: true