Closed farshidtz closed 4 years ago
Validation can be done in one of the following ways (motivated from this thread:
Provide a separate endpoint POST /dry-run-td
so that a client can validate its TD. Here the POST method becomes idempotent which is not RESTFul
Use the same endpoint, but pass a flag to indicate it as a dry run. e.g.
POST /td?dry-run=true
where the dry-run defaults to false when not givenPOST /td?exec=false
or POST /td?commit=false
where the dry-run defaults to true when not given.
This method complicates the existing endpointDo not perform dry run at all and leave it to the client. This has the problem that the client can not sync up always with the server about the schema unless the server exposes it.
Use GET /validation
with body but some clients may not support a body in GET request.
It would be nice to have an endpoint to validate TDs against the TD schema.
What should the operation/endpoint look like?
POST /validation
is not very RESTful.GET /validation
is idempotent but some clients may not support a body in GET request.POST /td?dryrun
.