Documenting http post request body
See original GitHub issueI am following this code:
receiving(Body.webForm(Strict,
FormField.boolean().required("b", "booleanField"),
FormField.int().optional("i", "intField"),
FormField.string().optional("s", "stringField"),
json.lens(FormField).required("j", "jsonField")
).toLens())
I would like to use this part to document form field of Apple login response:
receiving(Body.webForm(Strict,
FormField.string().required("code", "stringField"),
FormField.string().required("user", "jsonField:" + AppleUserInfo(AppleUserInfoFirstAndLast("Jane", "Doe"), "jane@doe.net"))
).toLens())
This is not ideal as I pass the JSON example as String, without Lens support. However I couldn’t figure out how to do this correctly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
POST - HTTP - MDN Web Docs
The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header....
Read more >Add a Request Body to a POST Request | API Connector
This article describes how to add a request body to a POST , PUT , or PATCH request in the API Connector extension...
Read more >How do I make a POST request? - ReqBin
To make a POST request to an API endpoint, you need to send an HTTP POST request to the server and specify a...
Read more >Describing Request Body - Swagger
Request bodies are typically used with “create” and “update” operations (POST, PUT, PATCH). For example, when creating a resource using POST or PUT,...
Read more >Submitting a POST Request to the REST API | Junos OS
Use an HTTP POST request to send single or multiple RPC requests to the REST API. ... in the URI for POST requests,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. In such case we can close this.
whilst the schema descriptions are supported by OA3 for all.types of parameter, unfortunately there currently isn’t a way to add Json examples for non-body parameters . we only currently support the basic Json primitives (string/Boolean etc) for these parts (query/form.fields etc).
unfortunately I’m pretty sure the changes to the internal to add these would be pretty extensive because of the way in which things are written.