mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-19 05:30:43 +00:00
Rebuild with tableMetaData example, and now stable content map for query & count
This commit is contained in:
@ -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")
|
||||
))
|
||||
)))
|
||||
)
|
||||
));
|
||||
}
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user