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

[OpenAI] Add error property in ContentFilterResults #25585

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

deyaaeldeen
Copy link
Member

To align with the swagger spec and the documentation

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

@deyaaeldeen deyaaeldeen requested a review from yangyuan as a code owner August 29, 2023 23:17
@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Aug 29, 2023

Next Steps to Merge

⚠️ This is an experimental comment. It may not always be up-to-date. ⚠️

Next steps that must be taken to merge this PR:
  • ❌ Your PR has non-breaking changes (label: NewApiVersionRequired). You must introduce a new API version with these changes instead of modifying existing one. See the PR description for help.
  • ❌ The required check named Swagger BreakingChange has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it. In addition, refer to step 1 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 Aug 29, 2023

Swagger Validation Report

️❌BreakingChange: 3 Errors, 0 Warnings failed [Detail]
compared swaggers (via Oad v0.10.4)] new version base version
generated.json 2023-06-01-preview(6fc00c4) 2023-06-01-preview(main)
generated.json 2023-07-01-preview(6fc00c4) 2023-07-01-preview(main)
generated.json 2023-08-01-preview(6fc00c4) 2023-08-01-preview(main)
Rule Message
1041 - AddedPropertyInResponse The new version has a new property 'error' in response that was not found in the old version.
New: inference/preview/2023-06-01-preview/generated.json#L960:7
Old: inference/preview/2023-06-01-preview/generated.json#L960:7
1041 - AddedPropertyInResponse The new version has a new property 'error' in response that was not found in the old version.
New: inference/preview/2023-07-01-preview/generated.json#L993:7
Old: inference/preview/2023-07-01-preview/generated.json#L993:7
1041 - AddedPropertyInResponse The new version has a new property 'error' in response that was not found in the old version.
New: inference/preview/2023-08-01-preview/generated.json#L1111:7
Old: inference/preview/2023-08-01-preview/generated.json#L1111:7
️️✔️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.4) new version base version
release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(6fc00c4) release_2023_06_01_preview_autogen(main)
release_2023_07_01_preview_autogen release_2023_07_01_preview_autogen(6fc00c4) release_2023_07_01_preview_autogen(main)
release_2023_08_01_preview_autogen release_2023_08_01_preview_autogen(6fc00c4) release_2023_08_01_preview_autogen(main)

The following errors/warnings exist before current PR submission:

Only 30 items are listed, please refer to log for more details.

Rule Message
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L706
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L1172
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L733
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L1243
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L523
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L594
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L851
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-08-01-preview/generated.json#L1361
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L46
⚠️ SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L51
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L64
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L70
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L77
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L115
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L121
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L128
⚠️ PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: inference/preview/2023-06-01-preview/generated.json#L165
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L166
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L172
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L179
⚠️ LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: inference/preview/2023-06-01-preview/generated.json#L215
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L217
⚠️ ParameterDescription Parameter should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L223
⚠️ OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L269
⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L275
⚠️ SchemaNamesConvention Schema name should be Pascal case.
Location: inference/preview/2023-06-01-preview/generated.json#L312
️️✔️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.
️️✔️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]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Aug 29, 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-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs]Release - Generate from 725d908. 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
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-net-track2 not found in swagger-to-sdk
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.AI.OpenAI [View full logs]  [Release SDK Changes]
    info	[Changelog]
️❌ azure-sdk-for-java failed [Detail]
  • Failed [Logs]Release - Generate from 725d908. 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.2.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.2.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-java not found in swagger-to-sdk
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    cmderr	[generate.py]
    cmderr	[generate.py] npm notice New major version of npm available! 8.19.4 -> 9.8.1
    cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.1>
    cmderr	[generate.py] npm notice Run `npm install -g [email protected]` to update!
    cmderr	[generate.py] npm notice
  • azure-ai-openai [View full logs]  [Release SDK Changes]
️🔄 azure-sdk-for-js inProgress [Detail]
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Aug 29, 2023

Generated ApiView

Language Package Name ApiView Link
.Net Azure.AI.OpenAI https://apiview.dev/Assemblies/Review/913a1a466eee42679c33f1de0b9392a1
Java azure-ai-openai https://apiview.dev/Assemblies/Review/245c477008004ca69e55023882f3f33b

@lmazuel lmazuel merged commit 725d908 into main Aug 30, 2023
@lmazuel lmazuel deleted the openai/content-filter-error branch August 30, 2023 23:04
@openapi-pipeline-app
Copy link

Swagger pipeline restarted successfully, please wait for status update in this comment.

jnlycklama pushed a commit that referenced this pull request Nov 8, 2023
* [OpenAI] Add error property in ContentFilterResults

* add missing import

* use fully qualified path

* update generated swaggers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants