Add flatten property tests for unknown type and read-only properties#3729
Add flatten property tests for unknown type and read-only properties#3729
Conversation
…ties Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
packages/azure-http-specs/specs/azure/client-generator-core/flatten-property/main.tsp
Outdated
Show resolved
Hide resolved
Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
commit: |
|
@copilot add a changeset. |
Co-authored-by: v-jiaodi <80496810+v-jiaodi@users.noreply.github.com>
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
packages/azure-http-specs/specs/azure/client-generator-core/flatten-property/main.tsp
Show resolved
Hide resolved
…om/Azure/typespec-azure into copilot/add-tests-flatten-property
packages/azure-http-specs/specs/azure/client-generator-core/flatten-property/main.tsp
Show resolved
Hide resolved
packages/azure-http-specs/specs/azure/client-generator-core/flatten-property/main.tsp
Show resolved
Hide resolved
packages/azure-http-specs/specs/azure/client-generator-core/flatten-property/main.tsp
Show resolved
Hide resolved
| "name": "foo", | ||
| "solutionId": "solution1", | ||
| "title": "Solution Title", | ||
| "content": "Solution Content" |
There was a problem hiding this comment.
(1) the response body shall be wrapped with properties or propertiesOptional
(2) one little question: is there any real service use flatten pattern of this PR? If yes, pls show the link and python may need also take a look.
There was a problem hiding this comment.
For the first point, I’ll open a PR to fix it.
properties unknown case:https://github.com/Azure/azure-rest-api-specs/blob/main/specification/eventhub/resource-manager/Microsoft.EventHub/Eventhub/models.tsp#L1608
properties readonly case: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/help/resource-manager/Microsoft.Help/Help/back-compatible.tsp#L58
Plan for adding flatten property tests
properties?: unknownfield@Azure.ClientGenerator.Core.Legacy.flattenPropertydecorator@visibility(Lifecycle.Read)fields@azure-tools/typespec-azure-coreimport andusing global.Azure.CoreSummary
Successfully added two new test cases, addressed review feedback, and added a changeset documenting the feature addition.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.