I am in the process of integrating a custom REST API into my app. At the moment I am using the Set Schema From Response option to quickly set the schema for the GET requests (such a great feature!!)
My GET requests include fields like _id, _etag, and _created, which are obviously not relevant for POST/PUT requests.
Unfortunately, it seems that there is no way to copy over the GET schema to POST/PUT and remove these fields. It also seems that AppGyver submits empty fields in POST/PUT requests. Sending empty _id, _etag, and _created to my API throws errors (as it should).
Is there anyway to easily set a custom schema for POST/PUT from the base GET schema without having to create a custom schema??? I am currently looking at a LOT of work to enter custom schema (assuming the schema doesn’t change at all… which I am sure it will)
To me this seems like a common use case and a common API structure/response.
My API does not return a copy of the data that was sent to it for POST and PUT requests. The API only returns the relevant info like Object ID and Etag. Therefore I cannot set the schema from POST and PUT responses.
However, I can easily create a Swagger/OpenAPI endpoint for my API. If I was able to set schema in AppGyver based on a Swagger/OpenAPI spec (file or endpoint) that would be AMAZING.
If your PUSH and PUT return only a few fields, why do you need those to have any more fields in their schema? I don’t see a point for those to have more fields than what they actually have in the response.
About Swagger/OpenAPI: We have thought of this and I’m pretty sure that this will be a feature some way down the line, but no idea about the timetable for that.