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

Fixing enum to have the proper values + reenabling csharp generation. #24538

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

glecaros
Copy link
Contributor

Fixes #24496

@glecaros glecaros requested a review from yangyuan as a code owner June 21, 2023 20:13
@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. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 21, 2023

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    compared swaggers (via Oad v0.10.4)] new version base version
    generated.json 2023-06-01-preview(f986c51) 2023-06-01-preview(main)
    generated.json 2022-12-01(f986c51) 2022-12-01(main)
    generated.json 2023-05-15(f986c51) 2023-05-15(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.3) new version base version
    release_2022_12_01_autogen release_2022_12_01_autogen(f986c51) release_2022_12_01_autogen(main)
    release_2023_05_15_autogen release_2023_05_15_autogen(f986c51) release_2023_05_15_autogen(main)
    release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(f986c51) 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 21, 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 9aec843. 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?

    @ghost ghost added the Cognitive Services label Jun 21, 2023
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jun 21, 2023

    Generated ApiView

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

    @lmazuel lmazuel merged commit 9aec843 into Azure:main Jun 21, 2023
    @glecaros glecaros deleted the glecaros/fix_enum branch June 21, 2023 23:07
    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
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [OpenAI.Inference] Fix csharp emission
    5 participants