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 eb2130ed..35262231 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 @@ -24,6 +24,7 @@ package com.kingsrook.qqq.middleware.javalin.specs.v1.utils; import java.io.IOException; import java.util.ArrayList; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import com.kingsrook.qqq.backend.core.context.QContext; @@ -57,7 +58,7 @@ public class QuerySpecUtils ContentType.APPLICATION_JSON.getMimeType(), new Content() .withSchema(new Schema() .withType(Type.OBJECT) - .withProperties(Map.of( + .withProperties(new LinkedHashMap<>(Map.of( "filter", new Schema() .withDescription("QueryFilter to specify matching records to be returned by the query") .withRef("#/components/schemas/QueryFilter"), @@ -69,7 +70,7 @@ public class QuerySpecUtils "tableVariant", new Schema() .withDescription("For tables that use variant backends, specification of which variant to use.") .withRef("#/components/schemas/TableVariant") - )) + ))) ) )); } diff --git a/qqq-middleware-javalin/src/main/resources/openapi/v1/openapi.yaml b/qqq-middleware-javalin/src/main/resources/openapi/v1/openapi.yaml index 3f91da88..61b53975 100644 --- a/qqq-middleware-javalin/src/main/resources/openapi/v1/openapi.yaml +++ b/qqq-middleware-javalin/src/main/resources/openapi/v1/openapi.yaml @@ -1954,7 +1954,47 @@ paths: content: application/json: examples: - TODO: {} + Example: + value: + tableMetaData: + capabilities: + - "TABLE_COUNT" + - "TABLE_GET" + - "TABLE_QUERY" + - "QUERY_STATS" + - "TABLE_INSERT" + - "TABLE_UPDATE" + - "TABLE_DELETE" + deletePermission: true + editPermission: true + fields: + id: + displayFormat: "%s" + isEditable: true + isHeavy: false + isHidden: false + isRequired: false + label: "Id" + name: "id" + type: "INTEGER" + icon: + name: "person_outline" + insertPermission: true + isHidden: false + label: "Person" + name: "person" + primaryKeyField: "id" + readPermission: true + sections: + - fieldNames: + - "id" + hidden: false + icon: + name: "badge" + label: "Identity" + name: "identity" + tier: "T1" + usesVariants: false schema: $ref: "#/components/schemas/TableMetaDataResponseV1" description: "The full table metadata" @@ -1981,10 +2021,6 @@ paths: application/json: schema: properties: - tableVariant: - $ref: "#/components/schemas/TableVariant" - description: "For tables that use variant backends, specification\ - \ of which variant to use." filter: $ref: "#/components/schemas/QueryFilter" description: "QueryFilter to specify matching records to be returned\ @@ -1995,6 +2031,10 @@ paths: items: $ref: "#/components/schemas/QueryJoin" type: "array" + tableVariant: + $ref: "#/components/schemas/TableVariant" + description: "For tables that use variant backends, specification\ + \ of which variant to use." type: "object" required: false responses: @@ -2049,10 +2089,6 @@ paths: application/json: schema: properties: - tableVariant: - $ref: "#/components/schemas/TableVariant" - description: "For tables that use variant backends, specification\ - \ of which variant to use." filter: $ref: "#/components/schemas/QueryFilter" description: "QueryFilter to specify matching records to be returned\ @@ -2063,6 +2099,10 @@ paths: items: $ref: "#/components/schemas/QueryJoin" type: "array" + tableVariant: + $ref: "#/components/schemas/TableVariant" + description: "For tables that use variant backends, specification\ + \ of which variant to use." type: "object" required: false responses: