-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
attestation: fixing the segment attestationProvider
to be attestationProviders
which matches the API
#16355
attestation: fixing the segment attestationProvider
to be attestationProviders
which matches the API
#16355
Conversation
…ionProvider` which matches the API Using the API Version in the Portal (2020-10-01): Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ``` --- Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ```
Hi, @tombuildsstuff Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vsswagger@microsoft.com |
[Call for Action] To better understand Azure service dev/test scenario, and support Azure service developer better on Swagger and REST API related tests in early phase, please help to fill in with this survey https://aka.ms/SurveyForEarlyPhase. It will take 5 to 10 minutes. If you already complete survey, please neglect this comment. Thanks. |
Swagger Validation Report
|
Rule | Message |
---|---|
1005 - RemovedPath |
The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProvider/{providerName}/privateEndpointConnections' removed or restructured? Old: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L270:5 |
1005 - RemovedPath |
The new version is missing a path that was found in the old version. Was path '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProvider/{providerName}/privateEndpointConnections' removed or restructured? Old: Microsoft.Attestation/stable/2020-10-01/attestation.json#L270:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L270:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: Microsoft.Attestation/stable/2020-10-01/attestation.json#L270:5 |
️⚠️
LintDiff: 0 Warnings warning [Detail]
- Linted configuring files (Based on source branch, openapi-validator v1.10.1 , classic-openapi-validator v1.1.10 )
- Linted configuring files (Based on target branch, openapi-validator v1.10.1 , classic-openapi-validator v1.1.10 )
Only 30 items are listed, please refer to log for more details.
Rule | Message |
---|---|
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L316 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L359 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L316 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_Create' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L359 |
R4018 - OperationsApiResponseSchema |
The response schema of operations API '/providers/Microsoft.Attestation/operations' does not match the ARM specification. Please standardize the schema. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L30 |
R4018 - OperationsApiResponseSchema |
The response schema of operations API '/providers/Microsoft.Attestation/operations' does not match the ARM specification. Please standardize the schema. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L30 |
R4036 - ImplementPrivateEndpointAPIs |
The private endpoint API: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Attestation/attestationProviders/{providerName}/privateLinkResources is missing. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L29 |
R4037 - MissingTypeObject |
The schema 'OperationList' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L612 |
R4037 - MissingTypeObject |
The schema 'AttestationProvider' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L665 |
R4037 - MissingTypeObject |
The schema 'CloudError' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L721 |
R4037 - MissingTypeObject |
The schema 'CloudErrorBody' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L730 |
R4037 - MissingTypeObject |
The schema 'AttestationProviderListResult' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L744 |
R4037 - MissingTypeObject |
The schema 'AttestationServicePatchParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L761 |
R4037 - MissingTypeObject |
The schema 'AttestationServiceCreationParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L774 |
R4037 - MissingTypeObject |
The schema 'AttestationServiceCreationSpecificParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L799 |
R4037 - MissingTypeObject |
The schema 'OperationList' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L654 |
R4037 - MissingTypeObject |
The schema 'AttestationProvider' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L707 |
R4037 - MissingTypeObject |
The schema 'CloudError' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L767 |
R4037 - MissingTypeObject |
The schema 'CloudErrorBody' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L776 |
R4037 - MissingTypeObject |
The schema 'AttestationProviderListResult' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L790 |
R4037 - MissingTypeObject |
The schema 'AttestationServicePatchParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L807 |
R4037 - MissingTypeObject |
The schema 'AttestationServiceCreationParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L834 |
R4037 - MissingTypeObject |
The schema 'AttestationServiceCreationSpecificParams' is considered an object but without a 'type:object', please add the missing 'type:object'. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L859 |
Consider using x-ms-client-flatten to provide a better end user experience Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L793 |
|
Consider using x-ms-client-flatten to provide a better end user experience Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L818 |
|
Consider using x-ms-client-flatten to provide a better end user experience Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L853 |
|
The operation 'AttestationProviders_Delete' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation. Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L222 |
|
The operation 'AttestationProviders_Delete' returns 202 status code, which indicates a long running operation, please enable 'x-ms-long-running-operation. Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L222 |
|
A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'AttestationProviders_Create' Request Model: 'AttestationServiceCreationParams' Response Model: 'AttestationProvider' Location: Microsoft.Attestation/stable/2020-10-01/attestation.json#L108 |
|
A PUT operation request body schema should be the same as its 200 response schema, to allow reusing the same entity between GET and PUT. If the schema of the PUT request body is a superset of the GET response body, make sure you have a PATCH operation to make the resource updatable. Operation: 'AttestationProviders_Create' Request Model: 'AttestationServiceCreationParams' Response Model: 'AttestationProvider' Location: Microsoft.Attestation/preview/2021-06-01-preview/attestation.json#L108 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
Cross-Version Breaking Changes succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️
[Staging] SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation
- The following tags are being changed in this PR
️️✔️
[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
[Staging] Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
Swagger Generation Artifacts
|
Thank you for your contribution tombuildsstuff! We will review the pull request and get back to you soon. |
attestationProvider
to be attestationProvider
which matches the APIattestationProvider
to be attestationProviders
which matches the API
Hi @tombuildsstuff, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review. |
NewApiVersionRequired reason: |
Per the original description whilst this is a breaking change, the Swagger currently doesn't work - as such this isn't a breaking change as these endpoints are documented incorrectly |
ping @msyyc |
Hi @tombuildsstuff Please notice the bot advice. You need to pass the following CI and then I could merge it |
@msyyc as above:
So this is a false positive |
Hi @tombuildsstuff I get it but you should still follow the workflow. Otherwise merge is blocked. |
@msyyc since the endpoints referenced here don't exist in the RP (and so these are incorrectly defined / have never worked) - which is what this PR is trying to fix - how do you propose fixing that in a backwards-compatible manner? |
Hi @tombuildsstuff Please follow the bot advice to ask for approval from @JeffreyRichter |
@msyyc unfortunately I can't do that: @JeffreyRichter any chance you could take a look at this one? The endpoint defined in the Swagger is incorrect/doesn't exist in ARM (see the payloads in the description above) - so this PR isn't a breaking change insofar as the endpoints defined in the Swagger have never worked |
Since the swagger never worked correctly, I approved this "breaking change". |
…ionProvider` which matches the API (Azure#16355) Using the API Version in the Portal (2020-10-01): Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2020-10-01'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2020-10-01" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ``` --- Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the `attestationProvider` resource type cannot be found: ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProvider/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidResourceType","message":"The resource type could not be found in the namespace 'Microsoft.Attestation' for api version '2021-06-01-preview'."}}) ``` Updating this to `attestationProviders` fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider): ``` $ az rest --method get --uri "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tom-dev/providers/Microsoft.Attestation/attestationProviders/tomdevaccprov/privateEndpointConnections?api-version=2021-06-01-preview" Not Found({"error":{"code":"InvalidOperation","message":"PrivateEndpointConnection is not found."}}) ```
Using the API Version in the Portal (2020-10-01):
API Version 2020-10-01
Using API Version 2020-10-01 and a valid AttestationProvider with this endpoint returns an error that the
attestationProvider
resource type cannot be found:Updating this to
attestationProviders
fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):API Version 2021-06-01-preview
Using API Version 2021-06-01-preview and a valid AttestationProvider with this endpoint returns an error that the
attestationProvider
resource type cannot be found:Updating this to
attestationProviders
fixes this (and correctly returns a 404 that there is no PrivateEndpointConnection for this Attestation Provider):