I am using swagger for documenting my REST API service. I have an specific input that I provide to the service. I am creating YAML code by myself using swagger editor. The issue I am facing is I am not able to get the input type as XML, it by default takes JSON. Is there any issue in my yaml code. The code is given below:
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.
This was a bug in Swagger Editor 3.3.0 and Swagger UI 3.11.0. It was fixed in Editor 3.3.1 and UI 3.12.0 (released on March 4, 2018).
As a workaround, you can download Editor v3.2.9 and run it locally by opening the
index.html
file in your browser.