lnash94
3 years agoOccasional Contributor
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?
- 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