@ExampleRequestBody to to used like @Example for response
See original GitHub issueSorting
-
I’m submitting a …
- bug report
- feature request
- support request
-
I confirm that I
- used the search to make sure that a similar issue hasn’t already been submit
Expected Behavior
@ExampleRquestBody<MyEndpointRequestBody>({
"type": "a",
"aProp": false
})
@ExampleRquestBody<MyEndpointRequestBody>({
"type": "b",
"bProp": true
})
@ExampleRquestBody<MyEndpointRequestBody>({
"type": "c",
"cProp": false
})
@Post('my-endpoint')
public async myEndpint(
@Body() body: MyEndpointRequestBody,
@Request() request: Request,
).... blar blar blar
Current Behavior
not possible to add example requests, only on response. which isn’t helpful here.
Possible Solution
see expected
Steps to Reproduce
n/a
Context (Environment)
n/a
Detailed Description
@ExampleRequestBody to to used like @Example for response
Breaking change?
n/a
#180 requests this, and then after much confusion, it was closed, and asked to make a new issue, and as far as I can tell, it was never created… so I have added it now…
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Spring's RequestBody and ResponseBody Annotations
In this quick tutorial, we provide a concise overview of the Spring @RequestBody and @ResponseBody annotations.
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 >Specifying examples - Postman Learning Center
Each example includes a request part (method, URL, parameters, headers, and body) and a response part (status code, body, and headers). You ...
Read more >HTTP GET with request body - Stack Overflow
When doing a GET on certain entities, clients can request the contents of the entity. If they want to add some parameters (for...
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 using the API Connector extension...
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
Nope, not even close.
The combination of
@param
and@example
jsdoc tags already covers this use case, yes? As described in this comment on #180