-
Notifications
You must be signed in to change notification settings - Fork 51
[BodyTopLevelProperties] Add "managedByExtended" to allowed list of top-level properties #810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
14
commits into
main
Choose a base branch
from
copilot/update-allowed-body-properties
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 6 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ff8bafa
Initial plan
Copilot 2d11108
Add managedByExtended to allowed body top level properties
Copilot c99fb08
Add test case for managedByExtended property support
Copilot 4454482
Update error message to include all allowed properties
Copilot 98c34eb
Fix documentation casing for extendedLocation property
Copilot be580a7
Add missing kind and zones properties to documentation
Copilot 90d4543
Update existing test file instead of creating new one for managedByEx…
Copilot cab0d67
Add Rush change file for managedByExtended feature
Copilot 5cb9e21
Update package.json to v2.2.1 and CHANGELOG.md directly
Copilot b0e6127
Apply suggestion from @mikeharder
mikeharder 6056f7d
Merge branch 'main' into copilot/update-allowed-body-properties
mikeharder ad0471d
Increment patch version from 2.2.1 to 2.2.2
Copilot 98aee25
Increment patch version from 2.2.2 to 2.2.3
Copilot bec2729
Merge branch 'main' into copilot/update-allowed-body-properties
mikeharder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
285 changes: 285 additions & 0 deletions
285
...ages/rulesets/src/native/tests/resources/body-top-level-properties-managedByExtended.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,285 @@ | ||
| { | ||
| "swagger": "2.0", | ||
| "info": { | ||
| "title": "Test managedByExtended is allowed as a top level property", | ||
| "description": "Test case for managedByExtended property.", | ||
| "version": "2024-01-01" | ||
| }, | ||
| "host": "management.azure.com", | ||
| "schemes": [ | ||
| "https" | ||
| ], | ||
| "basePath": "/", | ||
| "produces": [ | ||
| "application/json" | ||
| ], | ||
| "consumes": [ | ||
| "application/json" | ||
| ], | ||
| "paths": { | ||
| "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Test/testResources/{resourceName}": { | ||
| "put": { | ||
| "operationId": "TestResources_CreateOrUpdate", | ||
| "summary": "Create or update test resource", | ||
| "description": "Creates or updates a test resource with managedByExtended property.", | ||
| "parameters": [ | ||
| { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Subscription ID" | ||
| }, | ||
| { | ||
| "name": "resourceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource group name" | ||
| }, | ||
| { | ||
| "name": "resourceName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource name" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| }, | ||
| "description": "The parameters to provide for the test resource." | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| } | ||
| }, | ||
| "201": { | ||
| "description": "Created", | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "get": { | ||
| "operationId": "TestResources_Get", | ||
| "summary": "Get test resource", | ||
| "description": "Gets a test resource.", | ||
| "parameters": [ | ||
| { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Subscription ID" | ||
| }, | ||
| { | ||
| "name": "resourceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource group name" | ||
| }, | ||
| { | ||
| "name": "resourceName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource name" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "delete": { | ||
| "operationId": "TestResources_Delete", | ||
| "summary": "Delete test resource", | ||
| "description": "Deletes a test resource.", | ||
| "parameters": [ | ||
| { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Subscription ID" | ||
| }, | ||
| { | ||
| "name": "resourceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource group name" | ||
| }, | ||
| { | ||
| "name": "resourceName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource name" | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK" | ||
| }, | ||
| "204": { | ||
| "description": "No Content" | ||
| } | ||
| } | ||
| }, | ||
| "patch": { | ||
| "operationId": "TestResources_Update", | ||
| "summary": "Update test resource", | ||
| "description": "Updates a test resource.", | ||
| "parameters": [ | ||
| { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Subscription ID" | ||
| }, | ||
| { | ||
| "name": "resourceGroupName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource group name" | ||
| }, | ||
| { | ||
| "name": "resourceName", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "Resource name" | ||
| }, | ||
| { | ||
| "name": "parameters", | ||
| "in": "body", | ||
| "required": true, | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| }, | ||
| "description": "The parameters to provide for the test resource." | ||
| } | ||
| ], | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK", | ||
| "schema": { | ||
| "$ref": "#/definitions/TestResource" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "/providers/Microsoft.Test/operations": { | ||
| "get": { | ||
| "operationId": "Operations_List", | ||
| "summary": "List operations", | ||
| "description": "Lists all operations.", | ||
| "responses": { | ||
| "200": { | ||
| "description": "OK" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "definitions": { | ||
| "TestResource": { | ||
| "description": "Test resource with managedByExtended property", | ||
| "properties": { | ||
| "location": { | ||
| "type": "string", | ||
| "description": "Resource location" | ||
| }, | ||
| "tags": { | ||
| "type": "object", | ||
| "additionalProperties": { | ||
| "type": "string" | ||
| }, | ||
| "description": "Resource tags" | ||
| }, | ||
| "managedByExtended": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "string" | ||
| }, | ||
| "description": "The fully qualified resource IDs of the resources that manage this resource" | ||
| }, | ||
| "properties": { | ||
| "$ref": "#/definitions/TestResourceProperties" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "location" | ||
| ], | ||
| "allOf": [ | ||
| { | ||
| "$ref": "#/definitions/Resource" | ||
| } | ||
| ] | ||
| }, | ||
| "TestResourceProperties": { | ||
| "description": "Properties of the test resource", | ||
| "properties": { | ||
| "provisioningState": { | ||
| "type": "string", | ||
| "description": "Provisioning state", | ||
| "readOnly": true | ||
| } | ||
| } | ||
| }, | ||
| "Resource": { | ||
| "properties": { | ||
| "id": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Resource Id" | ||
| }, | ||
| "name": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Resource name" | ||
| }, | ||
| "type": { | ||
| "readOnly": true, | ||
| "type": "string", | ||
| "description": "Resource type" | ||
| } | ||
| }, | ||
| "x-ms-azure-resource": true | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "SubscriptionIdParameter": { | ||
| "name": "subscriptionId", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "test subscription id" | ||
| }, | ||
| "ApiVersion": { | ||
| "name": "api-version", | ||
| "in": "path", | ||
| "required": true, | ||
| "type": "string", | ||
| "description": "test api version" | ||
| } | ||
| } | ||
| } |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot instead of creating a new json file for the test , can you just update one of the existing files to include these tests ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated! I've added the
managedByExtendedproperty to the existingbody-top-level-properties-real-swagger.jsonfile instead of creating a new test file. The separate test file has been removed and the test case now uses the updated existing file. All tests pass. (commit 90d4543)