[OpenAI.Inference] Adding typespec definitions for DALL-E#24382
[OpenAI.Inference] Adding typespec definitions for DALL-E#24382markcowl merged 49 commits intoAzure:mainfrom
Conversation
|
Hi, @glecaros Thanks for your PR. I am workflow bot for review process. Here are some small tips. Any feedback about review process or workflow bot, pls contact swagger and tools team. vscswagger@microsoft.com |
Swagger Validation Report
|
| compared swaggers (via Oad v0.10.4)] | new version | base version |
|---|---|---|
| generated.json | 2023-06-01-preview(8a28131) | 2023-06-01-preview(main) |
| generated.json | 2022-12-01(8a28131) | 2022-12-01(main) |
| generated.json | 2023-05-15(8a28131) | 2023-05-15(main) |
| Rule | Message |
|---|---|
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/preview/2023-06-01-preview/generated.json#L62:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/preview/2023-06-01-preview/generated.json#L113:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/preview/2023-06-01-preview/generated.json#L164:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/preview/2023-06-01-preview/generated.json#L215:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/preview/2023-06-01-preview/generated.json#L266:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/stable/2022-12-01/generated.json#L62:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/stable/2022-12-01/generated.json#L113:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/stable/2023-05-15/generated.json#L62:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/stable/2023-05-15/generated.json#L113:5 |
1038 - AddedPath |
The new version is adding a path that was not found in the old version. New: inference/stable/2023-05-15/generated.json#L164:5 |
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 68 Warnings warning [Detail]
| compared tags (via openapi-validator v2.1.3) | new version | base version |
|---|---|---|
| release_2022_03_01_preview | release_2022_03_01_preview(8a28131) | default(main) |
| release_2022_06_01_preview | release_2022_06_01_preview(8a28131) | default(main) |
| release_2022_12_01 | release_2022_12_01(8a28131) | default(main) |
| release_2022_12_01_autogen | release_2022_12_01_autogen(8a28131) | default(main) |
| release_2023_03_15_preview | release_2023_03_15_preview(8a28131) | default(main) |
| release_2023_05_15 | release_2023_05_15(8a28131) | default(main) |
| release_2023_05_15_autogen | release_2023_05_15_autogen(8a28131) | default(main) |
| release_2023_06_01_preview | release_2023_06_01_preview(8a28131) | default(main) |
| release_2023_06_01_preview_autogen | release_2023_06_01_preview_autogen(8a28131) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
Only 30 items are listed, please refer to log for more details.
| Rule | Message | Related RPC [For API reviewers] |
|---|---|---|
| Security definition should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L46 |
||
| Security definition should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L51 |
||
| OperationId should be of the form 'Noun_Verb' Location: inference/preview/2023-06-01-preview/generated.json#L64 |
||
| Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: inference/preview/2023-06-01-preview/generated.json#L70 |
||
| Parameter should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L77 |
||
| OperationId should be of the form 'Noun_Verb' Location: inference/preview/2023-06-01-preview/generated.json#L115 |
||
| Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: inference/preview/2023-06-01-preview/generated.json#L121 |
||
| Parameter should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L128 |
||
| Operation might be pageable. Consider adding the x-ms-pageable extension. Location: inference/preview/2023-06-01-preview/generated.json#L165 |
||
| OperationId should be of the form 'Noun_Verb' Location: inference/preview/2023-06-01-preview/generated.json#L166 |
||
| Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: inference/preview/2023-06-01-preview/generated.json#L172 |
||
| Parameter should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L179 |
||
| OperationId should be of the form 'Noun_Verb' Location: inference/preview/2023-06-01-preview/generated.json#L217 |
||
| Parameter should have a description. Location: inference/preview/2023-06-01-preview/generated.json#L223 |
||
| OperationId should be of the form 'Noun_Verb' Location: inference/preview/2023-06-01-preview/generated.json#L268 |
||
| Path parameter should specify a maximum length (maxLength) and characters allowed (pattern). Location: inference/preview/2023-06-01-preview/generated.json#L274 |
||
| Schema name should be Pascal case. Location: inference/preview/2023-06-01-preview/generated.json#L311 |
||
| Schema name should be Pascal case. Location: inference/preview/2023-06-01-preview/generated.json#L346 |
||
| Schema name should be Pascal case. Location: inference/preview/2023-06-01-preview/generated.json#L359 |
||
| Property should have a defined type. Location: inference/preview/2023-06-01-preview/generated.json#L385 |
||
| 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 |
||
| Avoid the use of x-nullable. Location: inference/preview/2023-06-01-preview/generated.json#L583 |
||
| Property should have a defined type. Location: inference/preview/2023-06-01-preview/generated.json#L587 |
||
| Avoid the use of x-nullable. Location: inference/preview/2023-06-01-preview/generated.json#L651 |
||
| 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#L740 |
||
| 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 |
||
| Schema should have a description or title. Location: inference/preview/2023-06-01-preview/generated.json#L1076 |
||
| Security definition should have a description. Location: inference/stable/2022-12-01/generated.json#L46 |
||
| Security definition should have a description. Location: inference/stable/2022-12-01/generated.json#L51 |
||
| 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: 0 Errors, 0 Warnings failed [Detail]
️️✔️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.
|
Swagger pipeline restarted successfully, please wait for status update in this comment. |
Generated ApiView
|
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/OpenAI.Inference/models/images.tsp
Outdated
Show resolved
Hide resolved
|
Hi @glecaros, Your PR has some issues. Please fix the CI sequentially by following the order of
|
|
Hi, @glecaros, For review efficiency consideration, when creating a new api version, it is required to place API specs of the base version in the first commit, and push new version updates into successive commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki. Or you could onboard API spec pipeline |
|
Azure Pipelines successfully started running 2 pipeline(s). |
The check for @glecaros: Does this error make sense to you, and do you know how to fix it? @m-nash: Are you the right person to assist here if needed? I am personally not very familiar with the language SDK generation side of things yet. |
|
Check @srnagar: Are you the right person to assist with this error? |
|
Check @deyaaeldeen: Are you the right person to assist with this? |
|
@raych1: Three of the "sdk" checks are failing for this PR. Are these checks expected to be passing now on valid PRs, so if these checks are failing it means something is wrong in the PR? Or are these checks still not working reliably? |
@mikeharder , all the emitter are commented out except autorest. That's why SDK CI checks are skipped. |
| #suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" "Allowed because this is a non-standard status polling operation." | ||
| @doc("Returns the status of the images operation") | ||
| @added(ServiceApiVersions.v2023_06_01_Preview) | ||
| @route("/operations/images/{operationId}") | ||
| op getImageOperationStatus is RpcOperation< | ||
| { | ||
| @doc(".") @path operationId: string; | ||
| }, | ||
| ImageOperationResponse | ||
| >; | ||
|
|
||
| #suppress "@azure-tools/typespec-azure-core/use-standard-operations" "" | ||
| @doc("Starts the generation of a batch of images from a text caption") | ||
| @added(ServiceApiVersions.v2023_06_01_Preview) | ||
| @route("/images/generations:submit") | ||
| @pollingOperation( | ||
| getImageOperationStatus, | ||
| { | ||
| operationId: ResponseProperty<"id">, | ||
| } | ||
| ) | ||
| op startGenerateImage is OaiLongRunningRpcOperation< | ||
| ImageGenerationOptions, | ||
| ImageOperationResponse, | ||
| ImageOperationStatus | ||
| >; |
There was a problem hiding this comment.
Do we have a runtime log on the LRO responses? Or at least give us a response of last LRO poll.
Ask because the LRO may not be correctly defined.
It may need to be written as
op startGenerateImage is OaiLongRunningRpcOperation<
ImageGenerationOptions,
ImageOperationResponse,
ImageResponse
>;
The TStatusResult in template is the model in "result" property. It is a result in status, not a status.
https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-core/lib/foundations.tsp#L37-L51
There was a problem hiding this comment.
Or you may want to use Azure.Core.LongRunningRpcOperation
The emitters were commented out because the CI checks were failing earlier. We decided to merge this PR without the language emitters for now, and we will try to re-enable the language emitters in subsequent PRs, where we will need to investigate any failures. |
* Adding typespec definitions for DALL-E * feedback * Updating api version. * size enum * update * adding missing error * Adding open api. * fixing CI * fixing 'created' type. * generated files * updating examples * fixes * proper target * adding missing examples * fixes * fixing examples * more example updates * more fixes * regenerating files * more fixes * adding temporary fix * Link suppress of "union-unsupported" to tracking issue * tsp format * feedback * enum values * fixing example * renaming ImageResult to ImageLocation * rename * Adding readme * Adding extra files * feedback + linter fixes * generated files * cleanup * fixes * fix * Update specification/cognitiveservices/OpenAI.Inference/routes.tsp Co-authored-by: Johan Stenberg (MSFT) <johan.stenberg@microsoft.com> * feedback * fixes * fixing param name * adding deps * package dir * disabling failing emitters * reenabling csharp * indenting * testing java & ts * disabling back --------- Co-authored-by: Mike Harder <mharder@microsoft.com> Co-authored-by: Johan Stenberg (MSFT) <johan.stenberg@microsoft.com>
fix #24499