-
Notifications
You must be signed in to change notification settings - Fork 172
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
Curl example does not respect non-JSON encType when using POST #296
Comments
I think this was just a naive, good-enough solution since we only happen to use json bodies. I'd be open to discussing a PR that uses this info to make choices about how to format the examples. I suspect we should just maintain json as the default for backwards compatibility. |
How about switching the example when either That is, if If
If both are provided, prefer using schema (maintaining the current implementation). Alternatively, there could be an option to either override or omit the curl example. |
Hmm. I worry that leaves a lot to implied behavior, could we just explicitly check/rely upon the contents of encType instead of presence/absence of other data? |
Switching on the I'm not quite sure what to do if you say something like
|
Yeah, maybe we could just do things if encType and example are both present? But maybe it should try to do something with the schema. Yeah, the spec does point to GET query, POST body, but I think you can also put form encoded stuff in the body and be valid? |
I think the greater issue is that
encType
for links is just not supported, but this is the specific problem I ran into.In the Hyper-Schema spec, there is a snippet that looks like this.
In my case, I'm essentially trying the same thing, but instead with
method=POST
. The curl example from the outputted Markdown shows a JSON body.The text was updated successfully, but these errors were encountered: