Feature/lab 1915 cm update open api to support multi template - #152
Conversation
…-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
…plate' into LAB-1921_add_new_endpoint_for_get_template_list
There was a problem hiding this comment.
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-gatewayversion from3.2.0to3.2.1 - Add
templateNamepath 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.
…21_add_new_endpoint_for_get_template_list LAB-1921_get_list _available_templates
Document that templateName is sent as a path segment and must be URL-encoded (update parameter description and example to use "Microsoft%20Enterprise"). Also tighten the documented required permission for template-related endpoints to only `CloudMatrix.Read` for /Api/CloudMatrix/Template/{templateName} and /Api/CloudMatrix/TemplateMetadata/List.
Pasha Zayko (pasha-zayko)
left a comment
There was a problem hiding this comment.
A couple of additional observations:
- in Data-Gateway.json file there is also reference to version (that should ideally match whats in the package,json) - around line 4793 - that should also be changed to the same incremented value
- after changing package.json run "npm install" so the same version change is reflected in package-lock.json file and commit it (when this is the only change there, it is intended change to push in lock file)
- in Data-Gateway.json file, confirm the actual endpoint to get the list of templates, as I believe it is being changed
…21B_correct_TemplateMetadata_endpoint_name fix TemplateMetadata endpoint name
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
specs/Data-Gateway.json:9341
- The GET
/Api/CloudMatrix/Template/{templateName}operation still only documents200and500responses. Since this endpoint takes a required path parameter, it should also include the standard400response (and any other standard errors you expect) for invalidtemplateNameinputs, consistent with other Cloud Matrix GET endpoints (e.g./Api/CloudMatrix/Account/{accountId}/Dashboard).
"responses": {
"200": {
"description": "The requested assessment template object.",
"content": {
"application/json": {
"examples": {
"Named Template Output": {
"description": "Returns the requested template stored in blob storage. This has been trimmed to contain one element for brevity.",
"summary": "Named Template Output",
"value": {
"title": "CloudMatrix Value Assessment",
"description": "MICROSOFT CLOUD ADOPTION MATRIX v5.0",
"version": "5.0.14",
"valueAssessment": {
"actionPlan": {
"accountName": "AstraZeneca",
"discoveryDate": "2026-01-01T00:00:00Z",
"accountManager": "John Smith",
"consultant": "MSAG Consultant",
"licensingExecutive": "Jane Doe",
"customerSuccessManager": "John Doe",
"notesAndObjectives": "Sample notes and objectives for the account.",
"accountId": "fd9a6a53-594d-41aa-950a-b21ff41d4688",
"createdDate": "2026-01-01T00:00:00Z",
"modifiedDate": "2026-01-01T00:00:00Z",
"primaryPublisher": "Microsoft"
},
"userProfiles": [
{
"id": "00000000-0000-0000-0000-000000000001",
"name": "Profile Details",
"details": [
{
"name": "Profile Details",
"values": [
{
"name": "Profile Name",
"value": "Knowledge Worker"
}
]
}
]
}
],
"assessments": [
{
"metadata": {
"name": "M365 Apps for Enterprise - Mobile/Online",
"breakoutId": null,
"category": "USER EXPERIENCE",
"subCategory": "Productivity",
"help": "Brief: Common applications available through a browser used for business purposes typically bundled together by software vendors like Microsoft and Google. i.e., spreadsheets, slide presentations, word processor, etc.",
"licensingProduct": "M365 Mobile Apps",
"licensingProductHelp": "Mobile Apps The Microsoft 365 mobile app combines Word, Excel, and PowerPoint into a single app for iOS and Android devices. It offers features like creating, editing, and sharing documents on the go, scanning and signing PDFs, and using voice commands for quick tasks. You can also connect your email accounts and calendars in one convenient spot1.\n\nWeb Apps Microsoft 365 for the web includes online versions of Word, Excel, PowerPoint, OneNote, and Outlook. These web apps allow you to create, edit, and share documents directly from your browser without needing to install any software. You can access your documents from anywhere with an internet connection, making it easy to collaborate with others in real-time2.",
"isAddon": false,
"isStrategicAddon": false,
"isTenantBased": false,
"availability": null,
"notes": "",
"startYearConfig": {
"value": null,
"userProfileIds": null,
"isDeepDive": false,
"altProduct": null,
"publisher": null,
"useCase": null
},
"yearPlusOneConfig": {
"value": null,
"userProfileIds": null,
"isDeepDive": false,
"altProduct": null,
"publisher": null,
"useCase": null
},
"yearPlusTwoConfig": {
"value": null,
"userProfileIds": null,
"isDeepDive": false,
"altProduct": null,
"publisher": null,
"useCase": null
},
"yearPlusThreeConfig": {
"value": null,
"userProfileIds": null,
"isDeepDive": false,
"altProduct": null,
"publisher": null,
"useCase": null
},
"sourceValue": 0.0
},
"profiles": [
{
"name": "Microsoft E5",
"abbreviation": "ME5P",
"value": 5.0
}
],
"features": [
{
"licensing": "M365 SMB",
"products": [
{
"product": "PS",
"value": "na",
"comment": ""
}
]
}
]
}
],
"displacements": [
{
"name": "Example displacement opportunity",
"currentProvider": {
"name": "Microsoft",
"terms": "5 Years",
"contractNumber": "C12345678",
"expiryDate": "2026-01-01T00:00:00Z",
"costs": {
"monthlyCost": 5001,
"annualCost": 5002,
"contractValue": 5003
}
},
"displacement": {
"name": "Google",
"terms": "3 Years",
"contractNumber": "C87654321",
"expiryDate": "2026-01-01T00:00:00Z",
"costs": [
{
"monthlyCost": 5001,
"annualCost": 5002,
"contractValue": 5003
}
],
"replacementDate": "2026-12-31T00:00:00Z"
},
"notes": "Example notes"
}
]
},
"breakouts": [
{
"title": "PORTAL APPS",
"breakoutId": "f1ebe6ab-1164-4ab8-8970-2d561ee7634f",
"breakoutName": "BREAKOUT -Portal Apps",
"features": [
{
"roadmapElementPath": "User Experience /Productivity Apps/Extended Productivity App Ecosystem",
"elementSubdimension": "Productivity Apps",
"roadmapProduct": "Platform Only",
"feature": "Viva Insights - Personal",
"description": "Microsoft Lists is a Microsoft 365 app that helps you track information and organize work with customizable lists for tasks, projects, and more.",
"publisherLink": "",
"subscriptionFeatures": [
{
"licensing": "M365 FLW",
"products": [
{
"product": "F1",
"value": "na",
"comment": ""
},
{
"product": "F3",
"value": "na",
"comment": ""
}
]
}
]
}
]
}
]
}
}
},
"schema": {
"$ref": "#/components/schemas/CloudMatrix.BulkCloudMatrix"
}
}
}
},
"500": {
"$ref": "#/components/responses/500"
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
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.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated no new comments.
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.
Elliot Huffman (elliot-huffman)
left a comment
There was a problem hiding this comment.
looks good
@shi-corp/sdk-data-gatewaypackage, incrementing its version from 3.2.0 to 3.2.1.