From 395f94081f25d79a61d8f96faf7897c70d5e872e Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 29 May 2025 15:27:25 -0500 Subject: [PATCH] try again for stable map of properties --- .../specs/v1/utils/QuerySpecUtils.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/qqq-middleware-javalin/src/main/java/com/kingsrook/qqq/middleware/javalin/specs/v1/utils/QuerySpecUtils.java b/qqq-middleware-javalin/src/main/java/com/kingsrook/qqq/middleware/javalin/specs/v1/utils/QuerySpecUtils.java index 35262231..bc50547d 100644 --- a/qqq-middleware-javalin/src/main/java/com/kingsrook/qqq/middleware/javalin/specs/v1/utils/QuerySpecUtils.java +++ b/qqq-middleware-javalin/src/main/java/com/kingsrook/qqq/middleware/javalin/specs/v1/utils/QuerySpecUtils.java @@ -53,25 +53,25 @@ public class QuerySpecUtils ***************************************************************************/ public static RequestBody defineQueryOrCountRequestBody() { + Map 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() .withContent(Map.of( ContentType.APPLICATION_JSON.getMimeType(), new Content() .withSchema(new Schema() .withType(Type.OBJECT) - .withProperties(new LinkedHashMap<>(Map.of( - "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") - ))) - ) + .withProperties(properties)) )); }