-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Azure AI Vision - Image Analysis TypeSpec files #26146
Conversation
Next Steps to Merge✔️ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM). |
Swagger Validation Report
|
compared tags (via openapi-validator v2.1.6) | new version | base version |
---|---|---|
package-2023-10-01 | package-2023-10-01(bb44cbd) | default(main) |
default | default(bb44cbd) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
Rule | Message | Related RPC [For API reviewers] |
---|---|---|
Security definition should have a description. Location: ImageAnalysis/stable/2023-10-01/generated.json#L42 |
||
OperationId should be of the form 'Noun_Verb' Location: ImageAnalysis/stable/2023-10-01/generated.json#L52 |
||
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: ImageAnalysis/stable/2023-10-01/generated.json#L133 |
||
Parameter name 'gender-neutral-caption' should be camel case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L134 |
||
Parameter name 'smartcrops-aspect-ratios' should be camel case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L143 |
||
Parameter name 'model-version' should be camel case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L156 |
||
Don't use x-ms-paths except where necessary to support legacy APIs. Location: ImageAnalysis/stable/2023-10-01/generated.json#L206 |
||
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: ImageAnalysis/stable/2023-10-01/generated.json#L287 |
||
Schema name should be Pascal case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L360 |
||
Schema name should be Pascal case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L394 |
||
Schema name should be Pascal case. Location: ImageAnalysis/stable/2023-10-01/generated.json#L407 |
️️✔️
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.
️️✔️
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]
Swagger Generation Artifacts
|
Generated ApiView
|
...ion/cognitiveservices/data-plane/ImageAnalysis/preview/2023-04-01-preview/ImageAnalysis.json
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please delete redundant file ImageAnalysis.json
6e310f9
to
96ac4dc
Compare
Swagger Validation Report
|
compared tags (via openapi-validator v2.1.6) | new version | base version |
---|---|---|
package-2023-04-01-preview | package-2023-04-01-preview(e59b62b) | default(main) |
[must fix]The following errors/warnings are introduced by current PR:
️️✔️
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: 1 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
OBJECT_ADDITIONAL_PROPERTIES |
Additional properties not allowed: $ref JsonUrl: ImageAnalysis/preview/2023-04-01-preview/ImageAnalysis.json |
️⌛
PoliCheck pending [Detail]
️❌
PrettierCheck: 5 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
HowToFix |
Code style issues found path: ImageAnalysis/preview/2023-04-01-preview/ImageAnalysis.json |
HowToFix |
Code style issues found path: preview/2023-04-01-preview/examples/AnalyzeFromUrl_MaximumSet_Gen.json |
HowToFix |
Code style issues found path: preview/2023-04-01-preview/examples/AnalyzeFromUrl_MinimumSet_Gen.json |
HowToFix |
Code style issues found path: preview/2023-04-01-preview/examples/SegmentFromStream_MaximumSet_Gen.json |
HowToFix |
Code style issues found path: preview/2023-04-01-preview/examples/SegmentFromStream_MinimumSet_Gen.json |
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️⌛
PR Summary pending [Detail]
️⌛
Automated merging requirements met pending [Detail]
92f8c8d
to
1136817
Compare
8a44ec4
to
a485ff0
Compare
/azp run SDK azure-sdk-for-python |
No pipelines are associated with this pull request. |
/azp run openapi-pipeline-app |
No pipelines are associated with this pull request. |
/azp run |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
### Packages impacted by this PR @Azure/imageAnalysis ### Issues associated with this PR N/A ### Describe the problem that is addressed by this PR Initial add of ImageAnalysis RLC, opening PR to get gates run to start knocking those problems down... ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? A DPG client... ### Are there test cases added in this PR? _(If not, why?)_ Yes ### Provide a list of related PRs _(if any)_ TyepSpec PR: Azure/azure-rest-api-specs#26146 ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [ ] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
* First version * Add x-ms-examples to Swagger file * Rename OpenAPI file, add readme.md * Add generated.json * Another fix to overcome tool bug? * Referene genereted.json in readme.md (will be removed later on) * Remove 'Swagger to SDK' section in readme.md' * rename generated.json and don't reference it in readme.md * Fixes after running `npx prettier` - new line at end of files * Attempt to fix error in SemanticValidation --> AzureApiValication * Attempt to fix another SemanticValidation -> AzureApiValidation error * Return definition of visualFeatures, but without description field * No luck, revert last commit. I still get an error * Remove two ?api-version={apiVersion} * Copy examples from data-plane to Vision.ImageAnalysis * Fix error by adding linter line to tspconfig.yaml * Fix error by adding doc element to shared query in models.tsp * remove examples folder due to Java emitter bug * Remove manual fixing of auto-gen swagger * Check in generated.json. Remove duplicate examples * Fix TypeSpec Validation errors * Add examples folder in the TypeSpec folder. Not real one, for now, just a copy of the auto-gen min/max examples from data-plane folder * Fix another TypeSpec Validation error * More TypeSpec Validation errors * More TypeSpec Validation fixes * More * Recreate generated.json following Swagger update * overcome bug in OAV example generation tool * Add client.tsp to enable operator overloads in C# * Add new line at end of file * change SDK output folder to sdk/vision instead of sdk/cognitiveservices * Generate tests and metadata * set `partial-update: true` for Java * Move TypeSpec files to \vision\image-analysis * change folder from image-analysis to ImageAnalysis * Forgot to fix folder name in tspconfig.yaml * Fix casing in segmentationMode * Remove @action and @actionSeparator, per ask from Johan Stenberg * Update generated autorest with typespec hotfixes * Add Python SDK version * Remove package-version from tspconfig.yml. Use alias instead of model for shared query params * tsp format * Update generated autorest * Add missing examples * Fix imageContent in example * npx prettier * Update generated swagger * Fix examples * Update generated swagger * npx prettier * Workaround bug in oav generating examples * Remove redundant package-mode field * Update name of method argument from `mode` to `segmentationMode`, to match the object type name * Update generated autorest * Add min/max values. Update service name * Fix confidence values in examples to be in the range [0,1] * Change to RLC * Don't gen metadata and tests every time * Generate metadata and dummy tests * Post first SDK review: Update some property names. Add model-version query param * New auto-generated swagger * Updated swagger examples * Add min length to string query params * Update examples * Fix swagger validation failure * Updates after running 'npx prettier --write **/*.json` * Use @@access instead of @@internal in client.tsp * reg-ex for model-version * Fix examples * Forgot to copy examples... * More example fixes * More fixes to examples * Remove custom-model & segmentation * Update with example * update * Another attempt * Move restoring internal model classes to the TSP * Replace analyzeFromStream with analyzeFromBuffer * Add examples * Move to an internal visual features enum to enable a flags enum in C# * Add/update ref-doc comments * Ref-doc fix * Move location of TypeSpec files under ai\ImageAnalysis * TypeSpec updates to support new OCR result * Update service API version * Add generated.json * Add swagger examples * npx prettier --write **/*.json * Make Java models public again. Replace pages with blocks * Update example * After running npx prettier --write **/*.json * Sort @@access by a b c * TypeSpec validation fixes * Remove metadata section from TypeScript section to let magic happen * Update to GA endpoint * Generate examples * Fix examples * Fix TypeSpec validation * Fix Avocado error * Add analyzeFromUrl example (it was not automaticly created for some reason) * Fix title in new example * Fix from npx prettier * Use real example * Copy new examples to ImageAnalysis/examples/2023-10-01 * Fixes from npx --no tsv specification/ai/ImageAnalysis --------- Co-authored-by: Ryan Hurey <rhurey@microsoft.com> Co-authored-by: Mike Harder <mharder@microsoft.com>
Data Plane API - Pull Request
We are creating new auto-generated SDKs for Image Analysis REST APIs 4.0, currently in public preview (link to REST spec and public docs). This is the first draft PR for checking in the relevant TypeSpec files. I will publish the PR after addressing any errors/warnings.
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.
Is this review for (select one):
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.
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