Ken*_*yer 1 swagger swagger-2.0 swagger-codegen
我有一个典型的RESTful端点,它返回一组模型,但生成的Ruby SDK返回一个新模型,Matters而不是模型数组.我可以破解生成的源代码返回,Array<Matter>但这是一个维护问题.如何指定我想Array<Matter>在YAML中返回?
paths:
/matters:
get:
...
responses:
200:
schema:
$ref: "#/definitions/Matters"
...
definitions:
Matter:
type: "object"
properties:
id:
type: "string"
description: "Database identifier of the object."
caseId:
type: "string"
description: "Database identifier of the Case object."
clientMatterNumber:
type: "string"
description: "Client/matter billing code."
judge:
type: "string"
description: "Initials of the presiding judge."
caseNumber:
type: "string"
description: "Canonical case number."
caseTitle:
type: "string"
description: "Canonical case title."
natureOfSuit:
type: "string"
description: "Judicial Conference designation of the case."
docketEntries:
type: "integer"
description: "The count of docket entries in the case."
activityAt:
type: "string"
format: "date-time"
description: "The time of last activity in the case. "
Matters:
description: "A collection of matters"
type: "array"
items:
$ref: "#/definitions/Matter"
Run Code Online (Sandbox Code Playgroud)
弄清楚了...
responses:
200:
description: "200 response"
schema:
type: "array"
items:
$ref: "#/definitions/Matter"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1490 次 |
| 最近记录: |