Skip to content

Feature/lab 1915 cm update open api to support multi template#152

Draft
JagdishKhunti wants to merge 6 commits intomainfrom
feature/LAB-1915_CM-Update-OpenAPI-To-Support-Multi-Template
Draft

Feature/lab 1915 cm update open api to support multi template#152
JagdishKhunti wants to merge 6 commits intomainfrom
feature/LAB-1915_CM-Update-OpenAPI-To-Support-Multi-Template

Conversation

@JagdishKhunti
Copy link
Copy Markdown
Contributor

@JagdishKhunti JagdishKhunti commented Apr 15, 2026

  • Added a new endpoints description to support CM template features. (Post new template and get the list of available templates from the storage account).
  • Updated the existing CM “Get Default Template” endpoint to make it parameterized.This pull request makes a minor
  • Update to the @shi-corp/sdk-data-gateway package, incrementing its version from 3.2.0 to 3.2.1. No other changes are included.

ferrywlto and others added 6 commits April 9, 2026 12:25
…-add-open-api-specification-for-the-get-template-list-endpoint

LAB-1920 Add POST Cloud Matrix Assessment template endpoint specification.
- Update OpenAPI spec to support retrieving Cloud Matrix templates by name:
- Add a required path parameter `templateName`, change the GET path to `/Api/CloudMatrix/Template/{templateName}` (with updated operationId, descriptions and examples), and adjust response summaries.
- Preserve the POST endpoint for creating/updating templates.
- Also bump the TypeScript SDK package version from 3.2.0 to 3.2.1.
…e/LAB-1922A_Update-Get-Template-EndPoint

LAB-1922A: Added templateName GET route and bump SDK version
Copilot AI review requested due to automatic review settings April 15, 2026 15:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Data Gateway OpenAPI spec to support multiple Cloud Matrix templates (named retrieval + upload), and bumps the TypeScript SDK package version.

Changes:

  • Bump @shi-corp/sdk-data-gateway version from 3.2.0 to 3.2.1
  • Add templateName path parameter and new schemas for template naming/upload requests
  • Replace the CloudMatrix template GET route with a templated route and add a POST endpoint for uploading/overwriting templates

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/dataGateway/TypeScript/package.json Bumps SDK version to publish updated generated client/spec changes.
specs/Data-Gateway.json Adds multi-template support in CloudMatrix API (named GET, upload POST, new parameter/schemas).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread specs/Data-Gateway.json
Comment on lines +9097 to +9101
"/Api/CloudMatrix/Template/{templateName}": {
"get": {
"description": "Get a default assessment schema object as schema structure reference. \n\nThis endpoint requires the `CloudMatrix.Read`, `CloudMatrix.Read.Del`, `CloudMatrix.Read.All`, `CloudMatrix.ReadWrite`, or `CloudMatrix.ReadWrite.All` scope (permission).",
"operationId": "/Api/CloudMatrix/Template/Get",
"description": "Retrieves the specified Cloud Matrix assessment template by template name. \n\nThis endpoint requires the `CloudMatrix.Read`, `CloudMatrix.Read.Del`, `CloudMatrix.Read.All`, `CloudMatrix.ReadWrite`, or `CloudMatrix.ReadWrite.All` scope (permission).",
"operationId": "/Api/CloudMatrix/Template/:templateName/Get",
"parameters": [
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the GET route from /Api/CloudMatrix/Template to /Api/CloudMatrix/Template/{templateName} (and leaving /Api/CloudMatrix/Template without a GET) is a breaking API change for any existing clients that retrieve the default template. Consider keeping the original GET endpoint for the default template (or aliasing it) and adding the new templated route in addition, rather than replacing it.

Copilot uses AI. Check for mistakes.
Comment thread specs/Data-Gateway.json
Comment on lines +168 to +182
"templateName": {
"description": "Name of the Cloud Matrix template to retrieve.",
"in": "path",
"name": "templateName",
"required": true,
"schema": {
"$ref": "#/components/schemas/CloudMatrix.TemplateName"
},
"examples": {
"Valid Template Name": {
"summary": "Example Valid Template Name",
"description": "An example string of a valid template name.",
"value": "Microsoft Enterprise"
}
}
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

templateName is a path parameter, but the provided example value contains a space ("Microsoft Enterprise"). This is valid only if clients URL-encode it, which is easy to miss and can cause interoperability issues in generated SDKs. Consider clarifying in the parameter description/examples that the value must be URL-encoded in the path (or use a URL-safe identifier such as a templateId/slug).

Copilot uses AI. Check for mistakes.
Comment thread specs/Data-Gateway.json
Comment on lines 9106 to +9108
"responses": {
"200": {
"description": "The default assessment schema object.",
"description": "The requested assessment template object.",
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CloudMatrix GET endpoint only documents 200 and 500 responses. Other CloudMatrix GET endpoints in this spec include a 400 response (e.g., /Api/CloudMatrix/Dashboard at specs/Data-Gateway.json:8999-9004). For consistency and to document invalid input cases (such as an invalid templateName), add the standard 400 response reference here too.

Copilot uses AI. Check for mistakes.
Comment on lines 2 to 4
"name": "@shi-corp/sdk-data-gateway",
"version": "3.2.0",
"version": "3.2.1",
"type": "module",
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the only change is a version bump, but this PR also includes substantial OpenAPI spec changes (new CloudMatrix template endpoints/schemas). Please update the PR description to reflect the API/spec changes, or split the version bump into a separate PR.

Copilot uses AI. Check for mistakes.
{
"name": "@shi-corp/sdk-data-gateway",
"version": "3.2.0",
"version": "3.2.1",
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SDK version is being bumped as a patch (3.2.0 → 3.2.1), but the OpenAPI spec changes in this PR appear to be breaking (the GET endpoint moved from /Api/CloudMatrix/Template to /Api/CloudMatrix/Template/{templateName} and the old path no longer supports GET). Either restore backwards compatibility (e.g., keep the original GET endpoint) or bump the package version according to semver for a breaking change.

Suggested change
"version": "3.2.1",
"version": "4.0.0",

Copilot uses AI. Check for mistakes.
@JagdishKhunti JagdishKhunti marked this pull request as draft April 15, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants