Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MODFQMMGR-150] Add nested object types #36

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<generateApiTests>true</generateApiTests>
<generateApiDocumentation>true</generateApiDocumentation>
<generateModels>true</generateModels>
<modelsToGenerate>entityDataType,arrayType,dateType,entityTypeRelation,objectType,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,columnValues,columnValueGetter,submitQuery,contentsRequest</modelsToGenerate>
<modelsToGenerate>entityDataType,arrayType,dateType,entityTypeRelation,objectType,nestedObjectProperty,entityTypeColumn,enumType,booleanType,entityType,integerType,openUUIDType,stringType,numberType,rangedUUIDType,valueWithLabel,entityTypeDefaultSort,errors,error,parameters,parameter,resultsetPage,queryDetails,queryIdentifier,sourceColumn,columnValues,columnValueGetter,submitQuery,contentsRequest</modelsToGenerate>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>true</generateModelDocumentation>
<generateSupportingFiles>true</generateSupportingFiles>
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/swagger.api/queryTool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ components:
$ref: schemas/entityDataType.json#/EnumType
objectType:
$ref: schemas/entityDataType.json#/ObjectType
objectTypeContainer:
$ref: schemas/entityDataType.json#/ObjectTypeContainer
nestedObjectProperty:
$ref: schemas/entityDataType.json#/NestedObjectProperty
arrayType:
$ref: schemas/entityDataType.json#/ArrayType
entityTypeDefaultSort:
Expand Down
63 changes: 45 additions & 18 deletions src/main/resources/swagger.api/schemas/entityDataType.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"type": "string"
}
},
"required": [
"dataType"
],
"required": ["dataType"],
"discriminator": {
"propertyName": "dataType"
}
Expand Down Expand Up @@ -79,18 +77,6 @@
}
]
},
"ObjectTypeContainer": {
"type": "object",
"properties": {
"objectDefinition": {
"description": "The entity type describing the complex column when the data type is OBJECT.",
"$ref": "entityType.json#/EntityType"
}
},
"required": [
"objectDefinition"
]
},
"ObjectType": {
"description": "Entity field type defined in https://issues.folio.org/browse/UIPQB-10",
"allOf": [
Expand All @@ -102,6 +88,49 @@
}
]
},
"ObjectTypeContainer": {
"type": "object",
"properties": {
"properties": {
"description": "A list of this object's properties",
"type": "array",
"items": {
"$ref": "entityDataType.json#/NestedObjectProperty"
}
}
},
"required": ["properties"]
},
"NestedObjectProperty": {
"type": "object",
"description": "A property within an object",
"properties": {
"name": {
"description": "The name of the property",
"type": "string"
},
"key": {
"description": "The key of the property inside the object",
"type": "string"
},
"labelAlias": {
"description": "The human-readable label for this property; should be unqualified (e.g. 'Name' instead of 'User's Name')",
"type": "string"
},
"dataType": {
"description": "The data type of the property",
"$ref": "entityDataType.json#/EntityDataType"
},
"values": {
"type": "array",
"description": "Array of values for this column",
"items": {
"$ref": "valueWithLabel.json"
}
}
},
"required": ["name", "key", "dataType"]
},
"ArrayTypeContainer": {
"type": "object",
"properties": {
Expand All @@ -110,9 +139,7 @@
"$ref": "entityDataType.json#/EntityDataType"
}
},
"required": [
"itemDataType"
]
"required": ["itemDataType"]
},
"ArrayType": {
"description": "Entity field type defined in https://issues.folio.org/browse/UIPQB-6",
Expand Down
Loading