-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Code samples versus body payloads #91
Comments
This is basically done for economy of vertical space. + both JSON payload example and code samples are related to request. But layout is not fixed in stone :) so any suggestions about how to organise it better are welcome |
I will think about it and come up with a suggestion ;) But is it correct that code samples don't work for GET requests or am I doing something wrong? |
@dvh are you trying the code samples from demo page? They are just placeholders and are not supposed to work. |
No, I meant that code samples don't seem to work for GET operations, but that probably is fixed by issue #93. |
Yes, you're right. Fix should be easy so expect this in the next release. |
Fixed together with #93 |
I think the
x-code-samples
are meant to help developers getting started with certain requests, right? If so, I find it confusing that these samples are rendered in the request samples area, which already contains the body payload. See http://rebilly.github.io/ReDoc/ for example. The 'Add a new pet to the store' call contains JSON, C# and PHP samples. However, JSON is the actual body which needs to be POSTed to the API, where the C# and PHP samples do something else. I'd expect that a sample code could also be added to a GET operation, describing how to create the actual call. Also I'd say that Open APIs nativebody
parameters have a different behaviour than thex-code-samples
extension. Any thoughts on this?The text was updated successfully, but these errors were encountered: