[Azure AI Content Safety] 2024-04-15-preview Public Preview Contract
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.
- Link to API Spec engagement record issue:
Is this review for (select one):
- [ ] a private preview
- [x] a public preview
- [ ] GA release
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.
- Design Document:
- Previous API Spec Doc:
- Updated paths:
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.
- 💬 Teams Channel
Click here for links to tools, specs, guidelines & other good stuff
Tooling
- Open API validation tools were run on this PR. Go here to see how to fix errors
- Spectral Linting
- Open API Hub
Guidelines & Specifications
Helpful Links
Checks stuck in `queued` state?
If the PR CI checks appear to be stuck in `queued` state, please add a comment with contents `/azp run`. This should result in a new comment denoting a `PR validation pipeline` has started and the checks should be updated after few minutes.
Next Steps to Merge
Next steps that must be taken to merge this PR:- ❌ This is the public specs repo
mainbranch which is not intended for iterative development.
You must acknowledge that you understand that after this PR is merged, you won't be able to stop your changes from being published to Azure customers.
If this is what you intend, addPublishToCustomerslabel to your PR.
Otherwise, retarget this PR onto a feature branch, i.e. with prefixrelease-(see aka.ms/azsdk/api-versions#release--branches). - ❌ The required check named
TypeSpec Validationhas failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide
Swagger Validation Report
️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
| Compared specs (v0.10.7) | new version | base version |
|---|---|---|
| contentsafety.json | 2024-04-15-preview(b656f4d) | 2023-10-01(main) |
| contentsafety.json | 2024-04-15-preview(b656f4d) | 2024-02-15-preview(main) |
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️❌LintDiff: 6 Errors, 67 Warnings failed [Detail]
| Compared specs (v2.2.0) | new version | base version |
|---|---|---|
| package-2024-04-15-preview | package-2024-04-15-preview(b656f4d) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
Only 30 items are listed, please refer to log for more details.
| Rule | Message | Related RPC [For API reviewers] |
|---|---|---|
AvoidAnonymousTypes |
Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L360 |
|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'ImageIncidentOperation' 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/preview/2024-04-15-preview/contentsafety.json#L515 |
|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'AutoReviewerOperations' 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/preview/2024-04-15-preview/contentsafety.json#L865 |
|
AvoidAnonymousTypes |
Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L1529 |
|
AvoidAnonymousTypes |
Inline/anonymous models must not be used, instead define a schema with a model name in the 'definitions' section and refer to it. This allows operations to share the models. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L1918 |
|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'TextIncidentOperation' 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/preview/2024-04-15-preview/contentsafety.json#L2073 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L63 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L107 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L146 |
|
| :warning: PatchInOperationName | 'PATCH' operation 'ImageIncidents_CreateOrUpdateIncident' 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/preview/2024-04-15-preview/contentsafety.json#L147 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L203 |
|
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L241 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L241 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L290 |
|
| :warning: LongRunningOperationsOptionsValidator | A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L335 |
RPC-Async-V1-05 |
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L336 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L412 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L465 |
|
| :warning: PathParameterSchema | Path parameter should specify characters allowed (pattern). Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L482 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L514 |
|
| :warning: PathParameterSchema | Path parameter should specify characters allowed (pattern). Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L522 |
|
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L600 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L600 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L641 |
|
| :warning: ListInOperationName | Since operation response has model definition in array type, it should be of the form '_list'. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L684 |
|
| :warning: PageableOperation | Based on the response model schema, operation 'AutoReviewerOperations_GetAutoReviewer' might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L684 |
|
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L684 |
|
| :warning: XmsExamplesRequired | Please provide x-ms-examples describing minimum/maximum property set for response/request payloads for operations. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L684 |
|
| :warning: PathParameterSchema | Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L691 |
|
| :warning: ConsistentResponseBody | Response body schema does not match create response body schema. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L710 |
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/preview/2024-04-15-preview/contentsafety.json#L905 |
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/preview/2024-04-15-preview/contentsafety.json#L945 |
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/preview/2024-04-15-preview/contentsafety.json#L989 |
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/preview/2024-04-15-preview/contentsafety.json#L1051 |
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/preview/2024-04-15-preview/contentsafety.json#L1201 |
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/preview/2024-04-15-preview/contentsafety.json#L1259 |
| :warning: SecurityDefinitionDescription | Security definition should have a description. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L46 |
| :warning: SecurityDefinitionDescription | Security definition should have a description. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L51 |
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L554 |
| :warning: PatchInOperationName | '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/preview/2024-04-15-preview/contentsafety.json#L989 |
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L1093 |
| :warning: PathParameterSchema | Path parameter should specify characters allowed (pattern). Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L1275 |
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L2112 |
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L2240 |
| :warning: PaginationResponse | Operation might be pageable. Consider adding the x-ms-pageable extension. Location: ContentSafety/preview/2024-04-15-preview/contentsafety.json#L2419 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L2769 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L2787 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L2861 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L3586 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L3827 |
| :warning: EnumInsteadOfBoolean | 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/preview/2024-04-15-preview/contentsafety.json#L4245 |
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️❌ModelValidation: 70 Errors, 0 Warnings failed [Detail]
Only 30 items are listed, please refer to log for more details.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️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
️️✔️ApiDocPreview succeeded [Detail] [Expand]
Please click here to preview with your @microsoft account.
️⚠️ azure-sdk-for-python warning [Detail]
⚠️Warning in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. SDK Automation 14.0.0command sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json cmderr [automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed. command sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json cmderr [automation_generate.sh] cmderr [automation_generate.sh] New patch version of npm available! 10.5.0 -> 10.5.2 cmderr [automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.2> cmderr [automation_generate.sh] npm notice Run `npm install -g [email protected]` to update! cmderr [automation_generate.sh] npm notice
️✔️azure-ai-contentsafety [Preview SDK Changes]- azure_ai_contentsafety-1.0.0-py3-none-any.whl
- azure-ai-contentsafety-1.0.0.zip
info [Changelog] data-plan skip changelog generation temporarily
️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
️✔️Succeeded in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. SDK Automation 14.0.0command pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json command pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
️✔️Azure.AI.ContentSafety [Preview SDK Changes] Breaking Change Detected- Azure.AI.ContentSafety.1.1.0-alpha.20240416.1.nupkg
info [Changelog] Breaking Changes:
Parse Suppression File Errors No suppression file added.
Please refer to https://aka.ms/azsdk/sdk-suppression for more information.
️❌ azure-sdk-for-java failed [Detail]
❌Failed in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. SDK Automation 14.0.0command ./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json cmderr [init.sh] [notice] A new release of pip is available: 23.0.1 -> 24.0 cmderr [init.sh] [notice] To update, run: pip install --upgrade pip cmderr [init.sh] [notice] A new release of pip is available: 23.0.1 -> 24.0 cmderr [init.sh] [notice] To update, run: pip install --upgrade pip command ./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json warn No file changes detected after generation warn No package detected after generation
❌azure-ai-contentsafety [Preview SDK Changes]- pom.xml
- azure-ai-contentsafety-1.1.0-beta.1.jar
- azure-ai-contentsafety-1.1.0-beta.1-sources.jar
️❌ azure-sdk-for-js failed [Detail]
❌Failed in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. SDK Automation 14.0.0command sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json warn File azure-sdk-for-js_tmp/initOutput.json not found to read command sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json warn No file changes detected after generation warn No package detected after generation
❌@azure-rest/ai-content-safety [Preview SDK Changes]info [Changelog] error breakingChangeTracking is enabled, but version or changelogItem is not found in output.
️⚠️ azure-resource-manager-schemas warning [Detail]
⚠️Warning in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. Schema Automation 14.0.0command .sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json cmderr [initScript.sh] npm notice cmderr [initScript.sh] npm notice New patch version of npm available! 10.5.0 -> 10.5.2 cmderr [initScript.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.5.2> cmderr [initScript.sh] npm notice Run `npm install -g [email protected]` to update! cmderr [initScript.sh] npm notice warn File azure-resource-manager-schemas_tmp/initOutput.json not found to read command .sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json warn No file changes detected after generation warn Skip detect changed packages
️⚠️ azure-powershell warning [Detail]
⚠️Warning in generating from eef9a0fd6ac13871ffb13d5547149fee0d45aee8. SDK Automation 14.0.0command sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json warn specification/cognitiveservices/ContentSafety/tspconfig.yaml skipped due to azure-powershell not found in tspconfig.yaml command pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
⚠️Az.cognitiveservices.DefaultTag [Preview SDK Changes]
Generated ApiView
| Language | Package Name | ApiView Link |
|---|---|---|
| Python | azure-ai-contentsafety | https://apiview.dev/Assemblies/Review/b1ce525b31904c30a20c3aa2b734590b?revisionId=2c07aed274fd4a3c8868fc714e024da1 |
| Java | azure-ai-contentsafety | https://apiview.dev/Assemblies/Review/85abc443e88f4c26b278ef14dd4c2365?revisionId=566b1cf9cb3543ec8d4cfc0d9dea3a3f |
| .Net | Azure.AI.ContentSafety | https://apiview.dev/Assemblies/Review/691f0761a725401a9075ac85acb58dc5?revisionId=dc666179d9594ba38c7ac9ed319c4b60 |
| TypeSpec | ContentSafety | https://apiview.dev/Assemblies/Review/3664b8944c2b4ad288655f7e805b7476?revisionId=eebb279b26834607a31935d55cc204dc |
| Swagger | ContentSafety | https://apiview.dev/Assemblies/Review/65310c3dcf564395a750314444a9fbb6?revisionId=00a718916f594126a638b564400b2263 |