azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

Azure OpenAI: incorporate TypeSpec feedback from 2023-07-01-preview .NET PR feedback

Open trrwilson opened this issue 1 year ago • 7 comments

See: https://github.com/Azure/azure-sdk-for-net/pull/37539

  • All created timestamps standardized to appropriate encode as unix epoch seconds and share the same @projectedName definitions
  • ChatMessage.content updated for to accurately be a required, nullable string (previously optional)
  • Formatted/compiled
  • Validated via sparse-spec in the above PR

trrwilson avatar Jul 14 '23 22:07 trrwilson

Hi, @trrwilson! Thank you for your pull request. To help get your PR merged:

  • Ensure you reviewed the checklists in the PR description.
  • Know that PR assignee is the person auto-assigned and responsible for your current PR review and approval.
  • 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.
  • Swagger Validation Report

    ️❌BreakingChange: 26 Errors, 0 Warnings failed [Detail]
    compared swaggers (via Oad v0.10.4)] new version base version
    generated.json 2023-06-01-preview(e0e38d8) 2023-06-01-preview(main)
    generated.json 2023-07-01-preview(e0e38d8) 2023-07-01-preview(main)
    generated.json 2022-12-01(e0e38d8) 2022-12-01(main)
    generated.json 2023-05-15(e0e38d8) 2023-05-15(main)
    Rule Message
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-06-01-preview/generated.json#L493:9
    Old: inference/preview/2023-06-01-preview/generated.json#L493:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-06-01-preview/generated.json#L705:9
    Old: inference/preview/2023-06-01-preview/generated.json#L703:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-06-01-preview/generated.json#L422:9
    Old: inference/preview/2023-06-01-preview/generated.json#L422:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-06-01-preview/generated.json#L1167:9
    Old: inference/preview/2023-06-01-preview/generated.json#L1165:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-07-01-preview/generated.json#L493:9
    Old: inference/preview/2023-07-01-preview/generated.json#L493:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-07-01-preview/generated.json#L732:9
    Old: inference/preview/2023-07-01-preview/generated.json#L730:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-07-01-preview/generated.json#L422:9
    Old: inference/preview/2023-07-01-preview/generated.json#L422:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/preview/2023-07-01-preview/generated.json#L1238:9
    Old: inference/preview/2023-07-01-preview/generated.json#L1236:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/stable/2022-12-01/generated.json#L272:9
    Old: inference/stable/2022-12-01/generated.json#L272:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/stable/2023-05-15/generated.json#L315:9
    Old: inference/stable/2023-05-15/generated.json#L315:9
    1023 - TypeFormatChanged The new version has a different format than the previous one.
    New: inference/stable/2023-05-15/generated.json#L513:9
    Old: inference/stable/2023-05-15/generated.json#L511:9
    1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: inference/preview/2023-06-01-preview/generated.json#L609:7
    Old: inference/preview/2023-06-01-preview/generated.json#L609:7
    1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: inference/preview/2023-07-01-preview/generated.json#L621:7
    Old: inference/preview/2023-07-01-preview/generated.json#L621:7
    1025 - RequiredStatusChange The 'required' status changed from the old version('False') to the new version('True').
    New: inference/stable/2023-05-15/generated.json#L422:7
    Old: inference/stable/2023-05-15/generated.json#L422:7
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L534:11
    Old: inference/preview/2023-06-01-preview/generated.json#L534:11
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L455:9
    Old: inference/preview/2023-06-01-preview/generated.json#L455:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L470:9
    Old: inference/preview/2023-06-01-preview/generated.json#L470:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-06-01-preview/generated.json#L606:5
    Old: inference/preview/2023-06-01-preview/generated.json#L606:5
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-07-01-preview/generated.json#L534:11
    Old: inference/preview/2023-07-01-preview/generated.json#L534:11
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-07-01-preview/generated.json#L455:9
    Old: inference/preview/2023-07-01-preview/generated.json#L455:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-07-01-preview/generated.json#L470:9
    Old: inference/preview/2023-07-01-preview/generated.json#L470:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/preview/2023-07-01-preview/generated.json#L618:5
    Old: inference/preview/2023-07-01-preview/generated.json#L618:5
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/stable/2023-05-15/generated.json#L347:11
    Old: inference/stable/2023-05-15/generated.json#L347:11
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/stable/2023-05-15/generated.json#L282:9
    Old: inference/stable/2023-05-15/generated.json#L282:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/stable/2023-05-15/generated.json#L297:9
    Old: inference/stable/2023-05-15/generated.json#L297:9
    1034 - AddedRequiredProperty The new version has new required property 'content' that was not found in the old version.
    New: inference/stable/2023-05-15/generated.json#L419:5
    Old: inference/stable/2023-05-15/generated.json#L419:5
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️❌LintDiff: 11 Errors, 3 Warnings failed [Detail]
    compared tags (via openapi-validator v2.1.3) new version base version
    release_2022_12_01_autogen release_2022_12_01_autogen(e0e38d8) release_2022_12_01_autogen(main)
    release_2023_05_15_autogen release_2023_05_15_autogen(e0e38d8) release_2023_05_15_autogen(main)
    release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(e0e38d8) release_2023_06_01_preview_autogen(main)
    release_2023_07_01_preview_autogen release_2023_07_01_preview_autogen(e0e38d8) release_2023_07_01_preview_autogen(main)

    [must fix]The following errors/warnings are introduced by current PR:

    Rule Message Related RPC [For API reviewers]
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-06-01-preview/generated.json#L422
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-06-01-preview/generated.json#L493
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-06-01-preview/generated.json#L705
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-06-01-preview/generated.json#L1167
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-07-01-preview/generated.json#L422
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-07-01-preview/generated.json#L493
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-07-01-preview/generated.json#L732
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/preview/2023-07-01-preview/generated.json#L1238
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/stable/2022-12-01/generated.json#L272
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/stable/2023-05-15/generated.json#L315
    IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
    Location: inference/stable/2023-05-15/generated.json#L513
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L617
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-07-01-preview/generated.json#L629
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/stable/2023-05-15/generated.json#L430


    The following errors/warnings exist before current PR submission:

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

    Rule Message
    :warning: SecurityDefinitionDescription Security definition should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L46
    :warning: SecurityDefinitionDescription Security definition should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L51
    :warning: OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/preview/2023-06-01-preview/generated.json#L64
    :warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: inference/preview/2023-06-01-preview/generated.json#L70
    :warning: ParameterDescription Parameter should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L77
    :warning: OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/preview/2023-06-01-preview/generated.json#L115
    :warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: inference/preview/2023-06-01-preview/generated.json#L121
    :warning: ParameterDescription Parameter should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L128
    :warning: PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
    Location: inference/preview/2023-06-01-preview/generated.json#L165
    :warning: OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/preview/2023-06-01-preview/generated.json#L166
    :warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: inference/preview/2023-06-01-preview/generated.json#L172
    :warning: ParameterDescription Parameter should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L179
    :warning: OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/preview/2023-06-01-preview/generated.json#L217
    :warning: ParameterDescription Parameter should have a description.
    Location: inference/preview/2023-06-01-preview/generated.json#L223
    :warning: OperationId OperationId should be of the form 'Noun_Verb'
    Location: inference/preview/2023-06-01-preview/generated.json#L268
    :warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
    Location: inference/preview/2023-06-01-preview/generated.json#L274
    :warning: SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L311
    :warning: SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L345
    :warning: SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L358
    :warning: SchemaNamesConvention Schema name should be Pascal case.
    Location: inference/preview/2023-06-01-preview/generated.json#L372
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L467
    :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: inference/preview/2023-06-01-preview/generated.json#L593
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L676
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L686
    :warning: Nullable Avoid the use of x-nullable.
    Location: inference/preview/2023-06-01-preview/generated.json#L786
    :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: inference/preview/2023-06-01-preview/generated.json#L867
    :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: inference/preview/2023-06-01-preview/generated.json#L896
    :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: inference/preview/2023-06-01-preview/generated.json#L946
    :warning: PropertyType Property should have a defined type.
    Location: inference/preview/2023-06-01-preview/generated.json#L1172
    :warning: SecurityDefinitionDescription Security definition should have a description.
    Location: inference/preview/2023-07-01-preview/generated.json#L46
    ️️✔️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.
    ️⌛Please ignore, experimental check pending [Detail]
    Posted by Swagger Pipeline | How to fix these errors?

    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 failed [Detail]
    • Failed [Logs]Release - Generate from 6bad11503a1ebb3305c676b13bf3106d28b321f6. 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
      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
      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 packe sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [31;1mGet-ChildItem: [0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:805
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [36;1m 805 | [0m … rtifacts += [36;1mGet-ChildItem $artifactsPath -Filter *.nupkg -exclude *.s[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [36;1m     | [31;1m               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [31;1m[36;1m     | [31;1mCannot find path
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [36;1m     | [31;1m'/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/packages/Debug/' because
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [36;1m     | [31;1mit does not exist.
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
      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 generate sdk artifact
      cmderr	[Invoke-GenerateAndBuildV2.ps1] [0m
    • Azure.AI.OpenAI [View full logs]  [Release SDK Changes]
      info	[Changelog]
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from 6bad11503a1ebb3305c676b13bf3106d28b321f6. 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
      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
      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.0
      cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.8.0>
      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]
    Posted by Swagger Pipeline | How to fix these errors?

    Generated ApiView

    Language Package Name ApiView Link
    Java azure-ai-openai https://apiview.dev/Assemblies/Review/44caa139001e47fd9f69d7eafd8b44b9

    Hi @trrwilson! 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 proceed as explained in ACTION ITEM ALTERNATIVE B.
    This applies even if the breaking change tool fails with internal runtime error. In such case a manual breaking change review is necessary.

    Hi @trrwilson! Your PR has some issues. Please fix the CI issues, if present, in following order: Avocado, SemanticValidation, ModelValidation, Breaking Change, LintDiff.

    TaskHow to fixPriority
    AvocadoFix-AvocadoHigh
    Semantic ValidationFix-SemanticValidation-ErrorHigh
    Model ValidationFix-ModelValidation-ErrorHigh
    LintDiffFix-LintDiffHigh

    If you need further help, please reach out on the Teams channel aka.ms/azsdk/support/specreview-channel.

    CI failure notes:

    • SDK automation failure existing and expected, will be fixed by complementary .NET PR that this PR is intended for: https://github.com/Azure/azure-sdk-for-net/pull/37539
    • Breaking change notes expected, as we've corrected an optionality vs. nullability in the specification and properly refined the data type used for timestamps

    trrwilson avatar Jul 14 '23 23:07 trrwilson