Description
Use Cases or Problem Statement
In my case a creation of the resource has only a POST method without a requestBody
. The object is generated randomly on the server side and returned in the response body.
I can see DESIGN.md specifies clearly, that create with request body is the only schema required for resources.
When trying to generate the code, the resource is skipped due to above requirement - missing requestBody
.
Proposal
To my understanding, as long as there's a schema body in either request or response the resource mapping shall work.
The proposal is to modify resource_mapper::generateResourceSchema
function:
- for create request body - in case of missing schema do not return error, but set createRequestAttributes to empty list
- for create response body - leave as it is
- merge two sets of attributes and return error if the merged set is empty.
Additional Information
I have a limited knowledge about the context, it's probably not seeing a big picture / all implications. It would be great if you could explain the rationale behind this requirement if it is a hard requirement.
Code of Conduct
- I agree to follow this project's Code of Conduct