Skip to content

Using schema reference for request body doesn't show request object #416

@jloosli

Description

@jloosli

When using a schema reference for the request body, Redoc isn't showing the object, just the name. For example, with a path definition that looks roughly like this:

/path/to/endpoint:
  post:
    parameters:
      - in: body
        name: body
        schema:
          '$ref': '#/definitions/Appointment'

The redoc documentation shows

REQUEST BODY
Appointment (object)

instead of

REQUEST BODY
{
  "appointment_info_1": "detail",
  "appointment_info_2": "other detail"
.
.
.
}

If I add the object details directly to the request, it works as expected. My definitions are all in separate files, but ReDoc seems to find those just fine (e.g. if I put a typo in the definition pointer, I get an error). There are no errors that show up when viewing this.

Is this a bug, or am I using this incorrectly?

The link to the ReDoc documentation is here:

https://us-central1-tcs-appointments.cloudfunctions.net/docs/#tag/Appointments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions