Skip to content
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

Any plans for support xml samples for request/response ? #171

Closed
it-subscriptions opened this issue Dec 21, 2016 · 3 comments
Closed

Any plans for support xml samples for request/response ? #171

it-subscriptions opened this issue Dec 21, 2016 · 3 comments

Comments

@it-subscriptions
Copy link

If an operation has consumes and/or produces value of application/xml it would be nice to have the samples show accordingly.

For request I can make a code sample, but ideally it would be auto generated like the JSON.

As for responses I can't really think of any workaround.

@it-subscriptions it-subscriptions changed the title Any plans for support xml samples for request/response Any plans for support xml samples for request/response ? Dec 21, 2016
@RomanHotsiy
Copy link
Member

@it-subscriptions there are no plans to bring auto-generated XML examples in the near future (if nobody would contribute)

But OpenAPI(Swagger) has an Example Object using which you can provide response samples for different mime-types.
Right now only application/json is displayed in ReDoc but I can implement displaying xml sample if it's present. This should be much cheaper than implementing XML sample generation.

So in the end you will be able to provide request samples using code samples and responses using native swagger response samples .
Would it work for you?

@it-subscriptions
Copy link
Author

That would be great. Code samples for request is fine with me, so adding support for application/xml mime type in responses would work well as a quick solution.

Thanks!

@RomanHotsiy
Copy link
Member

Closing in favour of #492

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants