Hi,
I am trying to use JSON schema as the REST service definition format. I am working on exposing a tooling for creating REST services. Client side tooling would depend on the service definition for understanding the REST operations.
In LDO for GET requests I generate the following:
{
"rel" : "search",
"href" : "/orders",
"schema" : {
"type" : "object",
"properties" : {
"drink" : {
"type" : "string"
}
}
}
}
As per my understanding, for GET requests, schema properties implicitly define the query parameters. Please correct me if this is not a right way to represent the query parameters.
Now consider a LDO for the PUT operation
{
"title": "Pay for the order",
"rel" : "payment",
"href" : "/payments",
"method" : "POST",
"schema" : {
"type" : "object",
"properties" : {
"drink" : {
"type" : "string"
}
}
}
}
How shall we represent query parameters for PUT operation. PUT request with query parameters may not make sense but as a tool provider I need to allow user to do it. Schema in this case describes the request schema (not the query params unline in GET method)
Appreciate your help.