Feature/lab 2131 update open api spec for cm template api#169
Merged
pasha-zayko merged 24 commits intoMay 13, 2026
Conversation
…-Add-OpenAPI-specs-for-PATCH-publish-template-endpoint LAB-2151: Update OpenAPI specs for new publish template endpoint
…-cm-post-template-update Lab 2150 cm post template update
- Add templateId to CloudMatrix assessment schemas and examples. - Switch /Api/CloudMatrix/Template path parameter from templateName to templateId and update operationId/parameter refs. - Rename CloudMatrix.Type to CloudMatrix.TemplateType and update related refs. - Expand and normalize CloudMatrix.TemplateMetadata: rename timestamps (createdOn -> createdAt), add id, createdBy, updatedBy, isPublished and version fields (major/minor/patch), adjust required properties and examples, and update endpoint descriptions/summaries. - Update sample payload keys to include templateId, audit and versioning fields.
Refine Cloud Matrix template metadata schema and examples: update templateId description; rename the 'type' field to 'templateType' in required fields and examples; change major/minor/patch version types from number to integer (int32) with minimum 0; rename example property 'templateId' to 'id'; and add a response schema $ref to #/components/schemas/CloudMatrix.TemplateMetadata to ensure consistent typing and schema validation.
…e/LAB-2174_Update-TemplateMetaData-Schema LAB-2174:- TemplateId and update CloudMatrix metadata
There was a problem hiding this comment.
Pull request overview
This PR updates the Data Gateway OpenAPI specification to enhance Cloud Matrix template management, including introducing a templateId path parameter, adding template publishing support, and extending template metadata/versioning fields. It also bumps the TypeScript Data Gateway SDK package version accordingly.
Changes:
- Added
templateIdparameter usage for template retrieval and introduced a newPATCH /Api/CloudMatrix/Template/{templateId}/Publishendpoint. - Expanded Cloud Matrix template upload and metadata schemas to support template type, update type, publishing state, and semantic version fields.
- Updated the TypeScript SDK package version and lockfile metadata to reflect the spec changes.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/dataGateway/TypeScript/package.json | Bumps the Data Gateway TypeScript SDK version. |
| src/dataGateway/TypeScript/package-lock.json | Updates lockfile for the new SDK version; includes platform-metadata changes for optional native deps. |
| specs/Data-Gateway.json | Adds templateId-based endpoints, publish operation, and extends Cloud Matrix template schemas/metadata. |
Files not reviewed (1)
- src/dataGateway/TypeScript/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Bump SHI - Data Gateway spec version from 3.2.1 to 3.2.2 and rename sample response properties for value assessment template upload from "major/minor/patch" to "majorVersion/minorVersion/patchVersion" to match the updated schema naming. Also includes an auto-generated package-lock.json update.
Delete the 'templateName' path parameter from specs/Data-Gateway.json. The CloudMatrix.TemplateName parameter (including its schema reference and example value) was removed; the API now relies on the templateId path parameter instead to identify templates, avoiding URL-encoding of template names.
…52_add_spec_for_new_endpoint_to_update_replace_template Lab 2152 add spec for new endpoint to update replace template
JonnyPound90
approved these changes
May 12, 2026
pasha-zayko
requested changes
May 12, 2026
Contributor
There was a problem hiding this comment.
And there is repeated missing reference to include new templateId field:
- /Api/CloudMatrix/Assessment POST request, example at Data-Gateway.json:9924: nested correlation is missing templateId
- /Api/CloudMatrix/Assessment POST response, example at Data-Gateway.json:10118: nested correlation is missing templateId
- /Api/CloudMatrix/Account/{accountId}/Correlation/{correlationId} PATCH request, example at Data-Gateway.json:10336: nested correlation is missing templateId
- /Api/CloudMatrix/Account/{accountId}/Correlation/{correlationId} PATCH response, example at Data-Gateway.json:10530: nested correlation is missing templateId
- /Api/CloudMatrix/Account/{accountId}/Correlation/{correlationId} GET, example at Data-Gateway.json:10747: the correlation record is missing templateId
- /Api/CloudMatrix/Correlation/{correlationId} GET, example at Data-Gateway.json:10796: the correlation record is missing templateId
- /Api/CloudMatrix/Correlation/{correlationId}/Data GET, example at Data-Gateway.json:10846: nested correlation is missing templateId
- /Api/CloudMatrix/Account/{accountId}/Correlation/{correlationId}/Data GET, example at Data-Gateway.json:11175: nested correlation is missing templateId
Updated as request in this commit :- 0d7d32e
- Refine CloudMatrix template POST documentation in specs/Data-Gateway.json: clarify the endpoint description and sample request text; add a 415 Unsupported Media Type response; remove 401/403 response refs from one responses block; simplify sample payloads by emptying userProfiles and displacements arrays; and add templateId fields to multiple sample objects. - These changes improve accuracy of the API examples and response descriptions for template uploads.
In specs/Data-Gateway.json, add provenance metadata to a version object by introducing createdAt ("2026-05-08T12:34:56Z") and createdBy ("bbab2907-c781-4bf1-b912-b91510853052") fields alongside the existing major/minor/patchVersion properties to record timestamp and creator for the version record.
pasha-zayko
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request makes several significant updates to the
specs/Data-Gateway.jsonOpenAPI specification, primarily enhancing support for Cloud Matrix template management. The changes introduce new fields and endpoints for template versioning, publishing, and metadata, as well as improvements to the schema for clarity and completeness.Cloud Matrix Template Management Enhancements:
templateIdparameter and updated relevant endpoints to usetemplateIdinstead oftemplateName, improving template identification and retrieval./Api/CloudMatrix/Template/{templateId}/Publishto allow publishing of Cloud Matrix assessment templates.Schema and Metadata Improvements:
CloudMatrix.TemplateMetadataschema to include fields for versioning (majorVersion,minorVersion,patchVersion), publication status (isPublished), audit fields (createdBy,updatedBy), and unique identifier (id). The schema description and required fields were also updated for clarity.CloudMatrix.TemplateTypeandCloudMatrix.UpdateTypeto support template categorization and update tracking.Template Operations and Examples:
/Api/CloudMatrix/Templateendpoint to requiretemplateTypeandupdateType, and improved the response to return template metadata, including a sample response example.Required Properties and Consistency:
templateId,templateType, andupdateType, ensuring data integrity for template management.These changes collectively enhance the API's ability to manage, version, and publish Cloud Matrix templates in a more robust and auditable manner.