Skip to content

Commit

Permalink
MODFQMMGR-392:Add endpoint to upgrade a provided query
Browse files Browse the repository at this point in the history
  • Loading branch information
kjain110 committed Aug 13, 2024
1 parent 2b6c72d commit 3283bc4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/main/resources/swagger.api/mod-fqm-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ paths:
operationId: getFqmVersion
tags:
- fqmVersion
description: Get version of the fqm.
description: Get version of the fqm
responses:
'200':
description: 'Version of the fqm'
Expand All @@ -79,7 +79,23 @@ paths:
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'

/fqm/migrate:
post:
operationId: fqmMigrate
tags:
- fqmVersion
description: perform a migration of the FQM from the legacy version to the updated version.
responses:
'200':
description: 'FQM version updated successfully'
content:
application/json:
schema:
$ref: '#/components/schemas/fqmMigrateResponse'
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
components:
parameters:
entity-type-id:
Expand Down Expand Up @@ -137,6 +153,8 @@ components:
type: array
items:
type: string
fqmMigrateResponse:
$ref: schemas/FqmMigrate.json

responses:
badRequestResponse:
Expand Down
27 changes: 27 additions & 0 deletions src/main/resources/swagger.api/schemas/FqmMigrate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Entity Upgrade Request",
"description": "Schema for a request to upgrade an entity payload, including an entity type ID, FQL query, and list of fields.",
"type": "object",
"properties": {
"entityTypeId": {
"description": "ID of the entity type to be upgraded",
"type": "string",
"format": "UUID"
},
"fqlQuery": {
"description": "FQL query string to be used for the upgrade",
"type": "string"
},
"fields": {
"description": "List of fields to be included in the upgrade",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"entityTypeId"
]
}

0 comments on commit 3283bc4

Please sign in to comment.