mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
try again for stable map of properties
This commit is contained in:
@ -53,25 +53,25 @@ public class QuerySpecUtils
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
public static RequestBody defineQueryOrCountRequestBody()
|
public static RequestBody defineQueryOrCountRequestBody()
|
||||||
{
|
{
|
||||||
|
Map<String, Schema> properties = new LinkedHashMap<>();
|
||||||
|
properties.put("filter", new Schema()
|
||||||
|
.withDescription("QueryFilter to specify matching records to be returned by the query")
|
||||||
|
.withRef("#/components/schemas/QueryFilter"));
|
||||||
|
properties.put("joins", new Schema()
|
||||||
|
.withDescription("QueryJoin objects to specify tables to be joined into the query")
|
||||||
|
.withType(Type.ARRAY)
|
||||||
|
.withItems(new Schema()
|
||||||
|
.withRef("#/components/schemas/QueryJoin")));
|
||||||
|
properties.put("tableVariant", new Schema()
|
||||||
|
.withDescription("For tables that use variant backends, specification of which variant to use.")
|
||||||
|
.withRef("#/components/schemas/TableVariant"));
|
||||||
|
|
||||||
return new RequestBody()
|
return new RequestBody()
|
||||||
.withContent(Map.of(
|
.withContent(Map.of(
|
||||||
ContentType.APPLICATION_JSON.getMimeType(), new Content()
|
ContentType.APPLICATION_JSON.getMimeType(), new Content()
|
||||||
.withSchema(new Schema()
|
.withSchema(new Schema()
|
||||||
.withType(Type.OBJECT)
|
.withType(Type.OBJECT)
|
||||||
.withProperties(new LinkedHashMap<>(Map.of(
|
.withProperties(properties))
|
||||||
"filter", new Schema()
|
|
||||||
.withDescription("QueryFilter to specify matching records to be returned by the query")
|
|
||||||
.withRef("#/components/schemas/QueryFilter"),
|
|
||||||
"joins", new Schema()
|
|
||||||
.withDescription("QueryJoin objects to specify tables to be joined into the query")
|
|
||||||
.withType(Type.ARRAY)
|
|
||||||
.withItems(new Schema()
|
|
||||||
.withRef("#/components/schemas/QueryJoin")),
|
|
||||||
"tableVariant", new Schema()
|
|
||||||
.withDescription("For tables that use variant backends, specification of which variant to use.")
|
|
||||||
.withRef("#/components/schemas/TableVariant")
|
|
||||||
)))
|
|
||||||
)
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user