如何解决位置响应标头中的引用服务器 URL
在服务器对象中我定义了一个 URL:
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$
是否可以从 Location 响应标头的示例中引用服务器 URL?
解决方法
example
关键字需要一个文字示例值,所以不,您不能在那里引用另一个关键字。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。