-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML Generation does not calculate root tag name correctly #1982
Comments
@bodnia can you please look at that? |
@JessieAMorris I tried schema you provided, please see the results I got:
and then referring to it in schema:
As per specification on top level in schema object there are following properties supported:
So the correctly schema would appear in case of adding
to define a root node name of xml example. @webron Does this make sense? |
@bodnia it does, but I seem to be getting something else when trying: paths:
# This is a path endpoint. Change it.
/authenticate:
# This is a HTTP operation
post:
# Describe this verb here. Note: you can use markdown
description: |
Authenticates a user. Returns a `Authentication` object.
consumes:
- application/x-www-form-encoded
produces:
- application/xml
parameters:
# An example parameter that is in query and is required
-
name: username
in: formData
description: User's username
required: true
type: string
format: string
-
name: password
in: formData
description: User's password
required: true
type: string
format: string
-
name: app_id
in: formData
description: |
Identification string used to uniquely identify application, platform, and version of the client making the authentication request. (Example: 1554381236 represents Mvelopes for iPhone version 1.0.0.)
required: true
type: number
format: int
-
name: unique_device_id
in: formData
description: |
The manufacturer-provided unique ID assigned to this device. (UDID for Apple devices.)
required: true
type: string
format: string
# Expected responses for this operation:
responses:
# Response code
200:
description: Successful response
# A schema describing your response object.
# Use JSON Schema format
schema:
$ref: '#/definitions/Authentication'
definitions:
Authentication:
type: object
properties:
response_code:
type: integer
message:
type: string
token:
type: string Can you try that? |
@webron I see the issue, the same in "other" responses comes. It used to be fixed but looks like it was lost during some merge. I'll fix this |
Thanks! |
Is this broken again ?? I am having the same issue mentioned originally where xml generation fails if xml node name is not specified. Please advise. |
If I create a response schema to be used for XML then Swagger UI shows an error that:
This is despite having my schema named.
For example, the following schema does not work:
but if I add the xml name to it it works correctly:
The text was updated successfully, but these errors were encountered: