Forum Discussion
HKosova
Alumni
6 years agoOpenAPI 3.0 supports the description field in the requestBody itself, the requestBody schema, and individual schema fields.
openapi: 3.0.2
...
paths:
/login:
post:
requestBody:
required: true
description: A JSON object containing the username and password # <----
content:
application/json:
schema:
type: object
description: An object containing the username and password # <----
properties:
username:
type: string
description: Your username # <----
password:
type: string
description: Your password # <----
required:
- username
- password
responses:
200:
description: Successful login
Please see Describing Request Body for more examples.