-
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
[Cognitive Services - Azure AI Content Safety] GA Restful API #25498
Conversation
Next Steps to Merge✔️ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM). |
Swagger Validation Report
|
compared swaggers (via Oad v0.10.4)] | new version | base version |
---|---|---|
contentsafety.json | 2023-10-01(7994379) | 2023-04-30-preview(main) |
The following breaking changes are detected by comparison with the latest preview version:
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌
LintDiff: 2 Errors, 8 Warnings failed [Detail]
compared tags (via openapi-validator v2.1.6) | new version | base version |
---|---|---|
package-2023-10-01 | package-2023-10-01(7994379) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
Rule | Message | Related RPC [For API reviewers] |
---|---|---|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L404 |
|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L462 |
|
Security definition should have a description. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L51 |
||
Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L63 |
||
Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L298 |
||
Parameter should have a description. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L315 |
||
Parameter should have a description. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L369 |
||
Path parameter should specify characters allowed (pattern). Location: ContentSafety/stable/2023-10-01/contentsafety.json#L478 |
||
Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L515 |
||
Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L685 |
The following errors/warnings exist before current PR submission:
Rule | Message |
---|---|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L110 |
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L150 |
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L194 |
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextBlocklists' 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: ContentSafety/stable/2023-10-01/contentsafety.json#L256 |
Security definition should have a description. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L46 |
|
'PATCH' operation 'TextBlocklists_CreateOrUpdateTextBlocklist' should use method name 'Update'. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L194 |
|
Schema name should be Pascal case. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L748 |
|
Schema name should be Pascal case. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L782 |
|
Schema name should be Pascal case. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L795 |
|
Schema should have a description or title. Location: ContentSafety/stable/2023-10-01/contentsafety.json#L1046 |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
SwaggerAPIView succeeded [Detail] [Expand]
️️✔️
TypeSpecAPIView succeeded [Detail] [Expand]
️❌
ModelValidation: 2 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
OBJECT_MISSING_REQUIRED_PROPERTY |
Missing required property: blocklistItemId Url: ContentSafety/stable/2023-10-01/contentsafety.json#L962:26 ExampleUrl: stable/2023-10-01/examples/AddOrUpdateBlocklistItems.json#L7:13 |
OBJECT_MISSING_REQUIRED_PROPERTY |
Missing required property: blocklistItemId Url: ContentSafety/stable/2023-10-01/contentsafety.json#L962:26 ExampleUrl: stable/2023-10-01/examples/AddOrUpdateBlocklistItems.json#L7:13 |
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️
PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️
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).
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️
Automated merging requirements met succeeded [Detail] [Expand]
Swagger Generation Artifacts
|
Generated ApiView
|
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.
Looks good! 👍
Please fix ModelValidation CI. It all about example JSON. The 2 in LintDiff about operationId can be suppressed. |
OK, I see, the ModelValidation probably another issue of mismatch of TSP and Swagger. In this case, I am wondering whether we should remove |
I used to removed "blocklistItemId", but ModelValidation still report errors that required field missing. I think I can remove them, but can we ignore the required field missing error? In service implementation, even user set blocklistItemId in request, we will still ignore this field. |
Swagger Validation Report
|
Rule | Message |
---|---|
OBJECT_MISSING_REQUIRED_PROPERTY |
Missing required property: blocklistItemId Url: ContentSafety/stable/2023-10-01/contentsafety.json#L962:26 ExampleUrl: stable/2023-10-01/examples/AddOrUpdateBlocklistItems.json#L7:13 |
OBJECT_MISSING_REQUIRED_PROPERTY |
Missing required property: blocklistItemId Url: ContentSafety/stable/2023-10-01/contentsafety.json#L962:26 ExampleUrl: stable/2023-10-01/examples/AddOrUpdateBlocklistItems.json#L7:13 |
️️✔️
SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️⌛
PoliCheck pending [Detail]
️️✔️
PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️🔄
SpellCheck inProgress [Detail]
️🔄
Lint(RPaaS) inProgress [Detail]
️⌛
PR Summary pending [Detail]
️️✔️
Automated merging requirements met succeeded [Detail] [Expand]
Swagger Generation Artifacts
|
I will suppress the LintDiff, as it is about name of operationId; the ModelValidation, as it is a false alert on both "required" and "readonly" property (that not valid in Swagger). |
Swagger pipeline restarted successfully, please wait for status update in this comment. |
* Add ga contract for Content Safety * Update examples for 2023-10-01 * Resolve ModelValidation SpellCheck and Avocado * Fix typo * Fix minor errors in example and readme * Fix example * remove the 0430 content * update readme * re-format markdowm * Fix example * update blocklist example * Add eight severity levels
* Add ga contract for Content Safety * Update examples for 2023-10-01 * Resolve ModelValidation SpellCheck and Avocado * Fix typo * Fix minor errors in example and readme * Fix example * remove the 0430 content * update readme * re-format markdowm * Fix example * update blocklist example * Add eight severity levels
Data Plane API - Pull Request
API Info: The Basics
Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.
Is this review for (select one):
Change Scope
This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.
Viewing API changes
For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the
Generated ApiView
comment added to this PR. You can use ApiView to show API versions diff.Suppressing failures
If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.
❔Got questions? Need additional info?? We are here to help!
Contact us!
The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.
Click here for links to tools, specs, guidelines & other good stuff
Tooling
Guidelines & Specifications
Helpful Links
fix azure-sdk/TestingForEngagementExperience#298