Swagger 在位置响应头中引用服务器URL
在服务器对象中,我定义了一个URL:Swagger 在位置响应头中引用服务器URL,swagger,documentation,openapi,redoc,Swagger,Documentation,Openapi,Redoc,在服务器对象中,我定义了一个URL: servers: - url: https://localhost:8088/abc 在响应定义中,我要引用此服务器URL: /test-sub-url: post: requestBody: required: true content: application/json: schema: type: object properti
servers:
- url: https://localhost:8088/abc
在响应定义中,我要引用此服务器URL:
/test-sub-url:
post:
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
id:
description: Some ID
type: string
responses:
'201':
description: Created
headers:
Location:
required: true
schema:
type: string
format: url
example: $reference server URL here$
是否可以引用位置响应头示例中的服务器URL?关键字需要一个文本示例值,因此不能引用其他关键字