swagger-parser
swagger-parser copied to clipboard
reference name is not displayed to $ref in local file
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:
I want swagger to display referance name for all linked schemas in UI. What I do in wrong way?