Skip to content

reference name is not displayed to $ref in local file #2178

@SergeyDorozhko

Description

@SergeyDorozhko

There is a simple example:

I have specification:

openapi_test.yaml:

openapi: 3.0.3
info:
  title: test
  description: test
  version: 1.0.0
servers:
  - url: '/'
tags:
  - name: test1
    description: "test"
paths:
  /test/v1/client:
    get:
      tags:
        - test1
      operationId: getClient
      responses:
        "200":
          description: "success"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetClient200Response'


components:
  schemas:
    address:
      $ref: './address.yaml'

    GetClient200Response:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
        address2:
          $ref: '#/components/schemas/address2'
      required:
        - data

    address2:
      type: object
      properties:
        street:
          type: string
        building:
          type: string

./address.yaml:

type: object
properties:
  street:
    type: string
  building:
    type: string

When swagger rendering this spec it looks like:

Image

I want swagger to display referance name for all linked schemas in UI. What I do in wrong way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions