Search code examples
swaggerdocumentationopenapi

Swagger/OpenAPI 3.0 RequestBody Description not shown


I am creating an API-Documentation in Swagger. I directly tried openapi 3.0. I somehow cannot get the description for my request body to work.

requestBody:
    content:
      application/x-www-form-urlencoded:
        schema:
          type: object
          properties:
            name:
              description: The username of the user to be registered.
              type: string
            email:
              description: The E-Mail address of the user to be registered.
              type: string
            password:
              description: The password of the user to be registered.
              type: string
          required:
            - name
            - email
            - password

But the descriptions won't show up:

enter image description here

I want to get something like Swagger 2 was generating. Below is how the same code converted to Swagger 2

enter image description here


Solution

  • This issue was fixed in Swagger UI 3.18.2.