Swagger创建API文档:Swagger编辑器

问题描述 投票:0回答:1

我正在使用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.
swagger swagger-editor
1个回答
0
投票

qagxswpoi在Swagger Editor 3.3.0和Swagger UI 3.11.0中。它在编辑器3.3.1和UI 3.12.0(2018年3月4日发布)中得到修复。

作为一种解决方法,您可以通过在浏览器中打开This was a bug文件来download Editor v3.2.9并在本地运行它。

© www.soinside.com 2019 - 2024. All rights reserved.