Forum Discussion

lnash94's avatar
lnash94
Occasional Contributor
3 years ago

Swagger Operation Request body definition map for any payload type

Hi Team,

 

I'm looking for writing OpenAPI specification for ballerina service which has any type of request payload. Could you please let me know how can I represent accepted any type of payload from OpenAPI specification ?

 

Cloud you please let me know the definition for below openapi scenarios?

 

  1. scenario 01:  content with wild card with schema object - here swagger UI gives example as {}

 

paths:
  /:
    post:
      operationId: operation_post
      requestBody:
        content:
          '*/*':
            schema:
              type: object

 

  •  
  • scenario 02: content with wild card with schema empty - here swagger UI gives example as string

 

paths:
  /:
    post:
      operationId: operation_post
      requestBody:
        content:
          '*/*':
            schema:{}

 

  •  
  • scenario 03: content with wild card without schema

 

paths:
  /:
    post:
      operationId: operation_post
      requestBody:
        content:
          '*/*':
            example:
              summary: Any type of entity body

 

No RepliesBe the first to reply