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

Removing unused state + Fixing enum + Adding versioning to DALL-E models #24560

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

glecaros
Copy link
Contributor

@glecaros glecaros commented Jun 23, 2023

This PR removes an unused deleted state from the State enum used for Image LRO. This also fixes the definition of the ChatRole enum and properly mark all image related models with the right version.

@glecaros glecaros requested a review from yangyuan as a code owner June 23, 2023 19:23
@openapi-workflow-bot
Copy link

Hi, @glecaros Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. vscswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 23, 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(5a640e8) 2023-06-01-preview(main)
    generated.json 2022-12-01(5a640e8) 2022-12-01(main)
    generated.json 2023-05-15(5a640e8) 2023-05-15(main)
    Rule Message
    1019 - RemovedEnumValue The new version is removing enum value(s) 'deleted' from the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L1015:9
    Old: inference/preview/2023-06-01-preview/generated.json#L1015:9
    1019 - RemovedEnumValue The new version is removing enum value(s) 'deleted' from the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L1041:9
    Old: inference/preview/2023-06-01-preview/generated.json#L1041:9
    1019 - RemovedEnumValue The new version is removing enum value(s) 'deleted' from the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L1132:5
    Old: inference/preview/2023-06-01-preview/generated.json#L1132:5
    ️️✔️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.3) new version base version
    release_2022_12_01_autogen release_2022_12_01_autogen(5a640e8) release_2022_12_01_autogen(main)
    release_2023_05_15_autogen release_2023_05_15_autogen(5a640e8) release_2023_05_15_autogen(main)
    release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(5a640e8) release_2023_06_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
    ⚠️ 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
    ⚠️ 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#L268
    ⚠️ PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: inference/preview/2023-06-01-preview/generated.json#L274
    ⚠️ SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L311
    ⚠️ SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L346
    ⚠️ SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L359
    ⚠️ PropertyType Property should have a defined type.
    Location: inference/preview/2023-06-01-preview/generated.json#L385
    ⚠️ 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: inference/preview/2023-06-01-preview/generated.json#L503
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L583
    ⚠️ PropertyType Property should have a defined type.
    Location: inference/preview/2023-06-01-preview/generated.json#L587
    ⚠️ Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L681
    ⚠️ 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: inference/preview/2023-06-01-preview/generated.json#L770
    ⚠️ 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: inference/preview/2023-06-01-preview/generated.json#L800
    ⚠️ SchemaDescriptionOrTitle Schema should have a description or title.
    Location: inference/preview/2023-06-01-preview/generated.json#L1106
    ⚠️ SecurityDefinitionDescription Security definition should have a description.
    Location: inference/stable/2022-12-01/generated.json#L46
    ⚠️ SecurityDefinitionDescription Security definition should have a description.
    Location: inference/stable/2022-12-01/generated.json#L51
    ⚠️ OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/stable/2022-12-01/generated.json#L64
    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️️✔️ApiReadinessCheck succeeded [Detail] [Expand]
    ️⚠️~[Staging] ServiceAPIReadinessTest: 0 Warnings warning [Detail]

    API Test is not triggered due to precheck failure. Check pipeline log for details.

    ️️✔️SwaggerAPIView succeeded [Detail] [Expand]
    ️️✔️CadlAPIView 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).
    ️️✔️CadlValidation succeeded [Detail] [Expand]
    Validation passes for CadlValidation.
    ️️✔️TypeSpec Validation succeeded [Detail] [Expand]
    Validation passes for TypeSpec Validation.
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 23, 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 5b269e1. 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]
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 23, 2023

    Generated ApiView

    Language Package Name ApiView Link
    .Net Azure.AI.OpenAI https://apiview.dev/Assemblies/Review/99c1dcdf4e18435f88c846beec3033da

    @ghost ghost added the Cognitive Services label Jun 23, 2023
    @AzureRestAPISpecReview AzureRestAPISpecReview added BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required data-plane labels Jun 23, 2023
    @openapi-workflow-bot
    Copy link

    Hi @glecaros! The automation detected breaking changes in this pull request. As a result, it added the BreakingChangeReviewRequired label.

    You cannot proceed with merging this PR until you complete one of the following action items:

    ACTION ITEM ALTERNATIVE A: Fix the breaking change.
    Please consult the documentation provided in the relevant validation failures.

    ACTION ITEM ALTERNATIVE B: Request approval.
    Alternatively, if you cannot fix the breaking changes, then you can request an approval for them. Please follow the process described in the High-level Breaking Change Process doc.

    ACTION ITEM ALTERNATIVE C: Report false positive.
    If you think there are no breaking changes, i.e. the validation should pass yet it fails, then please explain why in a PR comment and @ the PR assignee.

    @@ -10,16 +10,13 @@ namespace Azure.OpenAI;
    @doc("A description of the intended purpose of a message within a chat completions interaction.")
    enum ChatRole {
    @doc("The role that instructs or sets the behavior of the assistant.")
    @projectedName("json", "system")
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    if we'd like to excise the verbose use of projectedName (I believe feedback was provided to that effect) we should do it across the board, as there's a lot of it. I'd recommend omitting this file's changes from the PR just to keep it simple.

    @lmazuel lmazuel merged commit 5b269e1 into Azure:main Jun 23, 2023
    @glecaros glecaros deleted the glecaros/enum_fix branch June 23, 2023 21:28
    harryli0108 pushed a commit to harryli0108/azure-rest-api-specs that referenced this pull request Jul 28, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required Cognitive Services data-plane
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants