【发布时间】:2018-03-05 15:52:09
【问题描述】:
我正在使用 swagger 来记录我的 REST API 服务。 我有我提供给服务的特定输入。 我正在使用 swagger 编辑器自己创建 YAML 代码。我面临的问题是我无法将输入类型作为 XML,默认情况下它采用 JSON。 我的 yaml 代码中是否有任何问题。代码如下:
swagger: "2.0"
info:
title: Order Update to Dealers
description: API description in Markdown.
version: 1.0.0
host: #Host name cannot be specified here
basePath: /api/OrderUpdate
schemes:
- http
paths:
/GetFullOrderAcknowlegement:
post:
summary: Returns a list of users.
consumes:
- application/xml
produces:
- text/plain
parameters:
- in: body
name: DealerInput
description: Optional extended description in Markdown.
schema:
properties:
DealerID:
type: string
PONumber:
type: string
responses:
201:
description: Created
200:
schema: {}
description: OK
401:
schema: {}
description: Authorization information is missing or invalid.
【问题讨论】: