Skip to content
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] Address comments of sdk languages on GA #26353

Merged
merged 22 commits into from
Nov 21, 2023

Conversation

JieZhou000
Copy link
Contributor

@JieZhou000 JieZhou000 commented Oct 24, 2023

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
  • 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.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Oct 24, 2023

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).

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Oct 24, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
compared swaggers (via Oad v0.10.4)] new version base version
contentsafety.json 2023-10-01(343a71a) 2023-10-01(main)
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 0 Warnings warning [Detail]
compared tags (via openapi-validator v2.1.6) new version base version
package-2023-10-01 package-2023-10-01(343a71a) package-2023-10-01(main)

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
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#L406
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#L464
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L46
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L51
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L63
⚠️ 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/stable/2023-10-01/contentsafety.json#L194
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L298
⚠️ PathParameterSchema Path parameter should specify characters allowed (pattern).
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L480
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L517
⚠️ 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/stable/2023-10-01/contentsafety.json#L681
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L744
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L778
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L791
⚠️ SchemaDescriptionOrTitle Schema should have a description or title.
Location: ContentSafety/stable/2023-10-01/contentsafety.json#L1042
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️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]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Oct 24, 2023

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking


️⚠️ azure-sdk-for-python-track2 warning [Detail]
  • ⚠️Warning [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    warn		specification/cognitiveservices/ContentSafety/tspconfig.yaml skipped due to azure-sdk-for-python-track2 not found in tspconfig.yaml
    command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
    cmderr	[automation_generate.sh] npm notice
    cmderr	[automation_generate.sh] npm notice New major version of npm available! 9.8.1 -> 10.2.4
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[automation_generate.sh] npm notice
    warn	No file changes detected after generation
    warn	No package detected after generation
️❌ azure-sdk-for-net-track2 failed [Detail]
  • Failed [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	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
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/Invoke-GenerateAndBuildV2.ps1:131
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 131 | �[0m               �[36;1mGeneratePackage `�[0m
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m               ~~~~~~~~~~~~~~~~~
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to build sdk. exit code: False
    cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
  • Azure.AI.ContentSafety [View full logs]  [Preview SDK Changes]
    info	[Changelog]
️⚠️ azure-sdk-for-java warning [Detail]
  • ⚠️Warning [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	./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 -> 23.3.1
    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 -> 23.3.1
    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 [View full logs]  [Preview SDK Changes]
️⚠️ azure-sdk-for-js warning [Detail]
  • ⚠️Warning [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	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 [View full logs]  [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 [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. Schema Automation 14.0.0
    command	.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 major version of npm available! 8.19.4 -> 10.2.4
    cmderr	[initScript.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>
    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	Skip detect changed packages
️❌ azure-powershell failed [Detail]
  • Pipeline Framework Failed [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	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
    SSL error: syscall failure: Broken pipe
    Error: SSL error: syscall failure: Broken pipe
  • ⚠️Az.cognitiveservices.DefaultTag [View full logs
    error	Fatal error: SSL error: syscall failure: Broken pipe
    error	The following packages are still pending:
    error		Az.cognitiveservices.DefaultTag
️⚠️ azure-sdk-for-python warning [Detail]
  • ⚠️Warning [Logs] Generate from 4539708e7024bad1fcf4854bb1d852f856e2813a. SDK Automation 14.0.0
    command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: azure-devtools 1.2.1 does not provide the extra 'ci-tools'
    cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
    warn		specification/cognitiveservices/data-plane/ContentSafety/readme.md skipped due to azure-sdk-for-python not found in swagger-to-sdk
    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] npm notice New major version of npm available! 9.8.1 -> 10.2.4
    cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.4>
    cmderr	[automation_generate.sh] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[automation_generate.sh] npm notice
  • ️✔️azure-ai-contentsafety [View full logs]  [Preview SDK Changes]
    info	[Changelog] data-plan skip changelog generation temporarily
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Oct 24, 2023

@MaryGao
Copy link
Member

MaryGao commented Oct 31, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@MaryGao
Copy link
Member

MaryGao commented Nov 1, 2023

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@microsoft-github-policy-service microsoft-github-policy-service bot added the TypeSpec Authored with TypeSpec label Nov 8, 2023
@zhaiyutong
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@JieZhou000 JieZhou000 marked this pull request as ready for review November 17, 2023 03:08
Copy link

Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

@weidongxu-microsoft
Copy link
Member

Let me know when you need it merged.

@MaryGao if you have comment for JS, let Yutong know.

@weidongxu-microsoft weidongxu-microsoft merged commit 164375e into Azure:main Nov 21, 2023
28 of 30 checks passed
@zhaiyutong zhaiyutong deleted the zhojie/csharp_0 branch February 2, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-plane TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants