-
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
Add xms-ids for mediaservices #17742
Add xms-ids for mediaservices #17742
Conversation
Hi, @LinglingTong 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. [email protected] |
[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 |
---|---|
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateLinkResources_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1221 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_Get' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1315 |
R4009 - RequiredReadOnlySystemData |
The response of operation:'PrivateEndpointConnections_CreateOrUpdate' is defined without 'systemData'. Consider adding the systemData to the response. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1363 |
Per the Noun_Verb convention for Operation Ids, the noun 'Jobs' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Media/stable/2021-06-01/Encoding.json#L3125 |
|
Since operation 'Assets_GetEncryptionKey' response has model definition 'array', it should be of the form '_list'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.Media/stable/2021-06-01/AssetsAndAssetFilters.json#L844 |
|
Consider using x-ms-client-flatten to provide a better end user experience Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L299 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1124 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1177 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1221 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1271 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1315 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1363 |
|
The summary and description values should not be same. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1420 |
|
Based on the response model schema, operation 'Operations_List' might be pageable. Consider adding the x-ms-pageable extension. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L809 |
|
Based on the response model schema, operation 'PrivateLinkResources_List' might be pageable. Consider adding the x-ms-pageable extension. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1177 |
|
Based on the response model schema, operation 'PrivateEndpointConnections_List' might be pageable. Consider adding the x-ms-pageable extension. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L1271 |
|
The child tracked resource, 'accountFilters' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/AccountFilters.json#L197 |
|
The child tracked resource, 'assets' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/AssetsAndAssetFilters.json#L224 |
|
The child tracked resource, 'assetFilters' with immediate parent 'Asset', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/AssetsAndAssetFilters.json#L412 |
|
The child tracked resource, 'contentKeyPolicies' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/ContentKeyPolicies.json#L769 |
|
The child tracked resource, 'transforms' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/Encoding.json#L1779 |
|
The child tracked resource, 'jobs' with immediate parent 'Transform', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/Encoding.json#L2395 |
|
The child tracked resource, 'streamingPolicies' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/StreamingPoliciesAndStreamingLocators.json#L380 |
|
The child tracked resource, 'streamingLocators' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/StreamingPoliciesAndStreamingLocators.json#L642 |
|
The child tracked resource, 'liveOutputs' with immediate parent 'LiveEvent', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/streamingservice.json#L1209 |
|
The child tracked resource, 'liveEvents' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/streamingservice.json#L1709 |
|
The child tracked resource, 'streamingEndpoints' with immediate parent 'MediaService', must have a list by immediate parent operation. Location: Microsoft.Media/stable/2021-06-01/streamingservice.json#L1943 |
|
Guid used in model definition 'MediaServiceProperties' for property 'mediaServiceId'. Usage of Guid is not recommanded. If GUIDs are absolutely required in your service, please get sign off from the Azure API review board. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L409 |
|
Guid used in model definition 'MediaServiceIdentity' for property 'principalId'. Usage of Guid is not recommanded. If GUIDs are absolutely required in your service, please get sign off from the Azure API review board. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L593 |
|
Guid used in model definition 'UserAssignedManagedIdentity' for property 'clientId'. Usage of Guid is not recommanded. If GUIDs are absolutely required in your service, please get sign off from the Azure API review board. Location: Microsoft.Media/stable/2021-06-01/Accounts.json#L619 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
~[Staging] ApiReadinessCheck succeeded [Detail] [Expand]
️❌
ModelValidation: 2 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
LRO_RESPONSE_HEADER |
Long running operation should return location or azure-AsyncOperation in header but not provided Url: Microsoft.Media/stable/2021-06-01/streamingservice.json#L216:22 ExampleUrl: stable/2021-06-01/examples/liveevent-update.json |
LRO_RESPONSE_HEADER |
Long running operation should return location or azure-AsyncOperation in header but not provided Url: Microsoft.Media/stable/2021-06-01/streamingservice.json#L888:22 ExampleUrl: stable/2021-06-01/examples/streamingendpoint-update.json |
️️✔️
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.
️️✔️
SDK Track2 Validation succeeded [Detail] [Expand]
Validation passes for SDKTrack2Validation
- The following tags are being changed in this PR
️️✔️
PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
Swagger Generation Artifacts
|
This PR is to add the missing x-ms-identifiers metadata: http://azure.github.io/autorest/extensions/#x-ms-identifiers for mediaservices. |
Hi @LinglingTong, Your PR has some issues. Please fix the CI sequentially by following the order of
|
@@ -162,6 +162,7 @@ | |||
"items": { | |||
"$ref": "#/definitions/FilterTrackPropertyCondition" | |||
}, | |||
"x-ms-identifiers": [], | |||
"description": "The track selections." |
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.
There is one more array in this file, AccountFilterCollection->value. does this not need x-ms-identifiers?
@@ -187,6 +187,9 @@ | |||
"items": { | |||
"$ref": "#/definitions/MetricDimension" | |||
}, | |||
"x-ms-identifiers": [ | |||
"name" | |||
], | |||
"description": "The metric dimensions.", | |||
"readOnly": true |
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.
Same here MediaServiceProperties - > storageAccounts is also an array. does this not need x-ms-idenitfiers. Can you explain a little on which scenario should we be adding this new property?
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.
The type object of storageAccounts, which is sotrageAccount in this case, has a property named "id" already, which is the default value expected when x-ms-identifiers is not specified.
Same reason for AccountFilterCollection.
Hope this helps :)
@@ -2296,6 +2323,9 @@ | |||
"items": { | |||
"$ref": "#/definitions/JobOutput" | |||
}, | |||
"x-ms-identifiers": [ | |||
"label" |
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.
label in the definition and a few other places, is not a required property. does it make sense to keep the array empty here?
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.
Yeah totally. If there is no property can be used as an identifier, we can keep the x-ms-identifiers array empty.
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.
I have pushed a new commit for removing the not required label property from xms-ids. Please take a look.
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.
Is this change needed urgently? all our swaggers are auto generated from code. If we make this change now directly to swagger, in the next release, I have to manually manage these. I rather they be added in our service code, so they are added properly.
Another question, is changing these identifiers considered breaking change?
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.
The check for x-ms-identifiers will be turned on after the whole initial work is done. I am sorry that this may add more work to you. @yantang-msft this could be a generic problem for teams that auto-generate their swaggers. What would be your suggestions on this?
AFAIK, changing these identifiers in the future should not be a breaking change.
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.
Hi @giakas, I checked with my team and unfortunately you team would probably have to manually add these annotations to the autogenerated swagger next time you generate them, or update the code generation tool to include this new annotation, which are what some other teams that have autogenerated swagger will be doing. I think for now we can check in this change first if you don't have any more code change request, which eliminates any unexpected error around x-ms-identifiers of your swaggers, and if you have any concerns or suggestions about how to make the work
better, please do feel free to reach out to me at ltong at microsoft.com or my team changeanalysisteam at microsoft.com, we would be more than happier to listen and chat about it over there.
@allenjzhang Girish (@giakas) just chatted with me offline and has signed off on the PR. Could you please help with merging it? |
The model validation failure is interesting. It correctly pointed out the example files is missing "location" or "azure-asyncOperation" header. But similar operations examples in streaming are missing these as well but not reported. |
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.
AMS is doing follow-up direct from source x-ms-identifier generation via API framework. Model validation errors will be fixed then.
* add xms-ids for mediaservices * remove label as xms-ids on Encoding.json
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changelog
Add a changelog entry for this PR by answering the following questions:
Contribution checklist:
If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist
Otherwise your PR may be subject to ARM review requirements. Complete the following:
Check this box if any of the following apply to the PR so that label "WaitForARMFeedback" will be added automatically to begin ARM API Review. Failure to comply may result in delays to the manifest.
-[ ] To review changes efficiently, ensure you are using OpenAPIHub to initialize the PR for adding a new version. More details, refer to the wiki.
Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.
If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Breaking Change Review Checklist
If any of the following scenarios apply to the PR, request approval from the Breaking Change Review Board as defined in the Breaking Change Policy.
Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.