OpenAPI-Specification
OpenAPI-Specification copied to clipboard
openapi batch post or put
hi, I just wanna know, Are the batch operations such as put, post allowed in the openapi? supposed that, if I put/post some objects in a batch operation, and during the process, some data are failed to put/post in the api, then all the data will be rollback? and if the data are large in the batch operation, that can also be a problem
I'm also interested in a similar question - currently looking to migrate from openapi 2 to 3 in nodejs/express.
Is it possible to post an array of objects some of which pass validation and some that don't. Then have the validator return a batch of reject error message for objects that didn't pass while allow the valid objects to pass through to the controller code? I don't want the error objects to prevent processing of the valid objects.
The OpenAPI Specification doesn't enforce back-end implementation of things like rollback. The HTTP specification requires PUT to be atomic, so PUT operations need to handle that (whether they are described by OpenAPI or not). POST has no such guarantees, and OpenAPI does not impose constraints beyond what HTTP requires.
As for partial validation, you can do that in general, but again it is not someting that OpenAPI is aware of. It describes the HTTP interface, not what happens behind it.
This issue has been labeled with No recent activity
because there has been no recent activity. It will be closed if no further activity occurs within 28 days. Please re-open this issue or open a new one after this delay if you need to.