-
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
Update contract for anomaly detector #12487
Conversation
Hi, @guinao 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] |
Swagger Validation Report
|
Rule | Message |
---|---|
"readme":"cognitiveservices/data-plane/AnomalyDetector/readme.md", "tag":"release_1_0", "details":"Checking for duplicate schemas, this could take a (long) while. Run with --verbose for more detail." |
|
"readme":"cognitiveservices/data-plane/AnomalyDetector/readme.md", "tag":"release_1_0", "details":"The enum schema 'AnomalyDetectorErrorCodes' with an undefined type and enum values is ambigious. This has been auto-corrected to 'type:string'" |
️️✔️
[Staging] PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
[Staging] SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
Swagger Generation Artifacts
|
Hi, @guinao your PR are labelled with WaitForARMFeedback. A notification email will be sent out shortly afterwards to notify ARM review board([email protected]). cc @jhendrixMSFT |
Hi @guinao, 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. |
specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json
Outdated
Show resolved
Hide resolved
@@ -359,6 +417,15 @@ | |||
"type": "boolean", | |||
"x-nullable": false | |||
} | |||
}, | |||
"severity": { | |||
"type": "array", |
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.
If this is a value returned by your service, consider marking it as 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.
Should other fileds also be marked as readOnly as well?
In reply to: 560688590 [](ancestors = 560688590)
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.
Yes, if they are set by your service, see 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.
According to the following rule, I changed the property of our output model object to readOnly and removed the 'required' property.
R2056 RequiredReadOnlyProperties
Category : SDK Error
Applies to : ARM and Data plane OpenAPI(swagger) specs
Output Message: Property '{0}' is a required property. It should not be marked as 'readonly'.
Description: A model property cannot be both readOnly and required. A readOnly property is something that the server sets when returning the model object while required is a property to be set when sending it as a part of the request body.
Why the rule is important: SDK generation fails when this rule is violated.
How to fix the violation: Ensure that the given property is either marked as readonly: true or required but not both.
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.
Correct, if a customer sets the value, then it cannot be readonly (you can enforce setting the value by specifying required but nothing else), readonly: true is set on properties that your service sets an example is ProvisioningState, this value is set by your service (Running, Provisioning, Succeeded | Failed, etc.) so just add readonly: true to those properties that your service sets.
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.
Thanks just updated the PR.
@@ -411,6 +478,11 @@ | |||
"isPositiveAnomaly": { | |||
"type": "boolean", | |||
"description": "Anomaly status in positive direction of the latest point. True means the latest point is an anomaly and its real value is larger than the expected one." | |||
}, | |||
"severity": { |
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.
Your service is in preview, but consider marking properties as readOnly where needed, follow this doc.
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.
Actually our service is going to GA. We just have another PR to change 'preview' to 'stable' #12472.
specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json
Outdated
Show resolved
Hide resolved
Hi @guinao, Your PR has some issues. Please fix the CI sequentially by following the order of
|
Can you please fix the prettier check CI failure? |
Fixed. |
@guinao looks good from SDK perspective. Does anybody from your team need to review/approve? |
We are requesting the review board to review this change. This PR could be merged once we get sign off from them. |
…anularity and make timestamp optional
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.
@jhendrixMSFT we have completed the review of the PR with review board, it is ok to merge :)
specification/cognitiveservices/data-plane/AnomalyDetector/preview/v1.0/AnomalyDetector.json
Show resolved
Hide resolved
specification/cognitiveservices/data-plane/AnomalyDetector/readme.go.md
Outdated
Show resolved
Hide resolved
…into fix_resource_multiapi_submodule * 'master' of https://github.com/Azure/azure-rest-api-specs: (452 commits) Dev cost management microsoft.cost management 2020 12 01 preview new (Azure#12259) Edit securityContact swagger for 2020-01-01 (Azure#12265) [Hub Generated] Review request for Microsoft.Insights to add version stable/2020-10-01 (Azure#11579) [Hub Generated] Review request for Microsoft.Media to add version stable/2020-05-01 (Azure#12681) Fix TimeSeriesInsights swagger issues (Azure#12204) Fixing error in lastModifiedAt description (Azure#12854) Update comment.yml (Azure#12910) Fixing RI s360 Flagged corrections in 2019-10-01 version (Azure#12777) [Hub Generated] Review request for Microsoft.Web to add version stable/2020-10-01 (Azure#11636) [Ready For Review] New version 20210101 (Azure#12111) Update scheduledQueryRule_API.json (Azure#12895) Remove UserAssigned MSI (Azure#12900) Update library.json (Azure#12922) KeyVault: Feature/update security domain spec (Azure#12863) Fixes ExampleId type and incorrect ArmTokenParameter name (Azure#12896) Update contract for anomaly detector (Azure#12487) [NetAppFiles] Urgent bug fix, backup response, remove systemData(not in response yet) (Azure#12852) [AML] Add PipelineEndpoint with version and DataPathAssignments fields in AzureMLExecutePipeline (Azure#12744) remove duplicated schema (Azure#12779) [Web] Add Swagger for Service Principal (Azure#12780) ...
* update contract for anomaly detector * make severity optional * contract update * update according to PR * update values * update * prettier fix * split the PR into two parts, this pr adds two enum values into the granularity and make timestamp optional * change preview to stable * update to stable version * fix build failure * update * update Co-authored-by: [email protected] <[email protected]>
MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.
Changes Made.
Add 'none' and 'microsecond' enum value into the 'granularity' field. Change 'timestamp' filed in 'series' from required to optional.
Validation.
According to the meeting with @JeffreyRichter , @johanste ,
Tests against all the following sdks, none of them break.
Changelog
Please ensure to add changelog with 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
Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.
Please 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 there are following updates in the PR, ensure to request an approval from API 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.