Skip to content

Display the Model/schema for object and array[object] parameters #4581

@hkosova

Description

@hkosova

This is a follow-up to #3558 and also related to #3641.

As an API consumer,
I want to see the schema of object parameters (individual property types, descriptions, etc.),
so that I can better understand how to use the API.

Q&A (please complete the following information)

  • OS: any
  • Browser: any
  • Method of installation: dist
  • Swagger-UI version: 3.15.0
  • Swagger/OpenAPI version: OpenAPI 3.0.0

Demonstration API definition

openapi: 3.0.1
info:
  version: 0.0.0
  title: test

servers:
  - url: http://httpbin.org

paths:
  /anything/foo{params}:
    get:
      parameters:
        - in: path
          name: params
          required: true
          schema:
            type: object
            properties:
              lat:
                type: number
                description: Latitude (north-south position)
                minimum: -90
                maximum: 90
                example: 50
              long:
                type: number
                description: Longitude (west-east position)
                minimum: -180
                maximum: 180
                example: 20
              scale:
                type: integer
                example: 32000
          style: matrix
          explode: true
      responses:
        '200':
          description: OK

Is your feature request related to a problem?

#3558 added a JSON editor for object-type parameters, which is great. However, it requires clicking "try it out" to see a sample object, and even after doing that, the parameter model descriptions and property descriptions are still not displayed anywhere in the UI.

Request bodies and responses have the "Model" tab - can it be reused for object parameters?

object-parameter-schemas

Describe the solution you'd like

Maybe reuse the "Model" component for object parameters?

Describe alternatives you've considered

N/a

Additional context

N/a

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions