-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Adding Models to Typespec for CLU #24376
Adding Models to Typespec for CLU #24376
Conversation
Swagger pipeline can not start as the pull request has merge conflicts. |
Hi, @Zach-King2 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. [email protected] |
Swagger pipeline can not start as the pull request has merge conflicts. |
Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment. |
…ec' into typespec
Swagger Validation Report
|
compared tags (via openapi-validator v2.1.3) | new version | base version |
---|---|---|
default | default(64bc7e1) | default(feature-cognitiveservices-Language.Conversations-typespec) |
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
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.
️️✔️
PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️
SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️
CadlValidation succeeded [Detail] [Expand]
Validation passes for CadlValidation.
️❌
TypeSpec Validation: 4 Errors, 14 Warnings failed [Detail]
Rule | Message |
---|---|
SwaggerNotExistInPRBranch |
"details":"The generated swagger file @azure-tools/typespec-autorest/azure.ai.language.conversations.json from typespec specification/cognitiveservices/Language.Conversations is not on the branch." |
MissingExamplesDirectory |
"details":"The 'examples' directory is missing in the typespec folder specification/cognitiveservices/OpenAI.Inference, please ensure the 'examples' is added in the PR." |
SwaggerNotExistInPRBranch |
"details":"The generated swagger file 2022-12-01/openapi.json from typespec specification/cognitiveservices/OpenAI.Inference is not on the branch." |
SwaggerNotExistInPRBranch |
"details":"The generated swagger file 2023-03-15-preview/openapi.json from typespec specification/cognitiveservices/OpenAI.Inference is not on the branch." |
The names of Namespace types must use PascalCase Location: specification/cognitiveservices/Language.Conversations/main.tsp#L13 |
|
The names of Model types must use PascalCase Location: specification/cognitiveservices/Language.Conversations/main.tsp#L30 |
|
The names of Model types must use PascalCase Location: specification/cognitiveservices/Language.Conversations/main.tsp#L34 |
|
ConversationItemBase should not use 'extends Record'. Use 'extends Record' instead. Location: specification/cognitiveservices/Language.Conversations/main.tsp#L86 |
|
LuisParameters should not use 'extends Record'. Use 'extends Record' instead. Location: specification/cognitiveservices/Language.Conversations/main.tsp#L126 |
|
Don't use 'object'. Location: specification/cognitiveservices/Language.Conversations/common.tsp#L79 |
|
InnerErrorModel should not use 'extends Record'. Use 'extends Record' instead. Location: specification/cognitiveservices/Language.Conversations/common.tsp#L22 |
|
Current spec is not exposing any routes. This could be to not having the service namespace marked with @service. Location: [azure-rest-api-specs/blob/64bc7e13a8c465d43bdd00dbec7c18874ebd3245/#L1](https://github.com/Azure/azure-rest-api-specs/blob/64bc7e13a8c465d43bdd00dbec7c18874ebd3245/#L1) |
|
Unions cannot be emitted to OpenAPI v2 unless all options are literals of the same type. Location: cognitiveservices/OpenAI.Inference/models/completions.create.tsp#L198 |
|
Unions cannot be emitted to OpenAPI v2 unless all options are literals of the same type. Location: cognitiveservices/OpenAI.Inference/models/chat.completions.tsp#L162 |
|
Unions cannot be emitted to OpenAPI v2 unless all options are literals of the same type. Location: cognitiveservices/OpenAI.Inference/models/completions.create.tsp#L198 |
|
Unions cannot be emitted to OpenAPI v2 unless all options are literals of the same type. Location: cognitiveservices/OpenAI.Inference/models/chat.completions.tsp#L162 |
|
"details":"The configuration 'output-file' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Inference, please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'." |
|
"details":"The configuration 'azure-resource-provider-folder' for '@azure-tools/typespec-autorest' is missing in the tspconfig.yaml under folder specification/cognitiveservices/OpenAI.Inference, please ensure it is added in the configuration of the emitter '@azure-tools/typespec-autorest'." |
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Swagger Generation Artifacts
|
Generated ApiView
|
specification/cognitiveservices/Language.Conversations/main.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/main.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/main.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/main.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/main.tsp
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.
Much better. Just one suggested change. Basically, don't define it as a model but "inline" and the model should be elided.
...Conversations/tsp-output/@azure-tools/typespec-autorest/azure.ai.language.conversations.json
Show resolved
Hide resolved
...Conversations/tsp-output/@azure-tools/typespec-autorest/azure.ai.language.conversations.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.
After resolving comments, could we maybe merge and start a new topic branch/PR?
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
Yes that sounds great, I just made the requested changes. |
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
specification/cognitiveservices/Language.Conversations/common.tsp
Outdated
Show resolved
Hide resolved
...Conversations/tsp-output/@azure-tools/typespec-autorest/azure.ai.language.conversations.json
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.
Looking great! There's one build validation error that makes me think the swagger wasn't regenerated with your last TypeSpec update. Can you double check in your local branch and see if it gets updated?
189c09f
into
Azure:feature-cognitiveservices-Language.Conversations-typespec
* setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * adding models * added models * resolved comments * added AADToken * defined AADToken as model * added common.tsp * edited formatting * fixed syntax * resolved comments * removed required property * changed ErrorResponse to a model * model updates
* setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * adding models * added models * resolved comments * added AADToken * defined AADToken as model * added common.tsp * edited formatting * fixed syntax * resolved comments * removed required property * changed ErrorResponse to a model * model updates
…#27392) * Adding example TypeSpec definition for CLU (#24309) * setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * Adding Models to Typespec for CLU (#24376) * setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * adding models * added models * resolved comments * added AADToken * defined AADToken as model * added common.tsp * edited formatting * fixed syntax * resolved comments * removed required property * changed ErrorResponse to a model * model updates * Adding Path Object to Typespec for CLU (#24597) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * Model Changes in TypeSpec for CLU (#24866) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * TypeSpec updates for SDK generation (#24973) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * fixed spacing * updating config * spacing fix * modified service-dir path * removed csharp * tsp config changes * removed autorest import * LuisTargetIntentResult model update * added csharp emitter * model change * removed autorest * model property change * modified model property * useauth change * capitalized endpoint * changed endpoint to lowercase * back to uppercase * Added @convientAPI decorator for SDK Generation (#25179) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * fixed spacing * updating config * spacing fix * modified service-dir path * removed csharp * tsp config changes * removed autorest import * LuisTargetIntentResult model update * added csharp emitter * model change * removed autorest * model property change * modified model property * useauth change * capitalized endpoint * changed endpoint to lowercase * back to uppercase * sdk generation fix * Removed discriminator from AnalyzeConversationTaskResult model (#25250) * model change for sdk * modified result property * Added 2023-04-01 and 2023-04-15-preview version models to TypeSpec for Analyze Conversations (#24899) Added 2023-04-01 and 2023-04-15-preview version models to TypeSpec for Analyze Conversations --------- Co-authored-by: Quentin Robinson <[email protected]> * moved to nonstandard LRO and general fixes * fixed tsp * added AnalyzeConversationPiiTask * first commit for text analytics tsp * second commit * fixed refactoring errors * refactor analyzetext * fixed routes * added 2023-04-01 ga version * cleanup * Cleanup * general fixes * updated tsp config and eng folder to match main * Adding example TypeSpec definition for CLU (#24309) * setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * Adding Models to Typespec for CLU (#24376) * setup * modified CODEOWNERS * new changes * new changes * new changes * fixing validation errors * adding models * added models * resolved comments * added AADToken * defined AADToken as model * added common.tsp * edited formatting * fixed syntax * resolved comments * removed required property * changed ErrorResponse to a model * model updates * Adding Path Object to Typespec for CLU (#24597) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * Model Changes in TypeSpec for CLU (#24866) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * TypeSpec updates for SDK generation (#24973) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * fixed spacing * updating config * spacing fix * modified service-dir path * removed csharp * tsp config changes * removed autorest import * LuisTargetIntentResult model update * added csharp emitter * model change * removed autorest * model property change * modified model property * useauth change * capitalized endpoint * changed endpoint to lowercase * back to uppercase * Added @convientAPI decorator for SDK Generation (#25179) * added route * added examples to path object * fixed example file paths * route changes * removed union * fixes * fixes * fixes * fixes * fixed example file paths * removed example * updated route * rebase * rebase * rebase * added examples to path object * fixed example file paths * rebase * edited config * added comment * removed import * added team as codeowners * removed examples * added version enum and edited tspconfig * added doc decorators to enums * added more doc decorators to enums * validation fixes * lint diff fix * suppressed warnings * supressed enum warnings and removed '/language' from hostTemplate * added projectedname decorator to some properties * edits to models in common.tsp * edited model properties in main.tsp * fixed spacing * updating config * spacing fix * modified service-dir path * removed csharp * tsp config changes * removed autorest import * LuisTargetIntentResult model update * added csharp emitter * model change * removed autorest * model property change * modified model property * useauth change * capitalized endpoint * changed endpoint to lowercase * back to uppercase * sdk generation fix * Removed discriminator from AnalyzeConversationTaskResult model (#25250) * model change for sdk * modified result property * Added 2023-04-01 and 2023-04-15-preview version models to TypeSpec for Analyze Conversations (#24899) Added 2023-04-01 and 2023-04-15-preview version models to TypeSpec for Analyze Conversations --------- Co-authored-by: Quentin Robinson <[email protected]> * moved to nonstandard LRO and general fixes * fixed tsp * added AnalyzeConversationPiiTask * first commit for text analytics tsp * second commit * fixed refactoring errors * refactor analyzetext * added 2023-04-01 ga version * general fixes * cleanup * Cleanup * updated tsp config and eng folder to match main * reset som eng/* and package files to main * update eng files * reset files to main * reset codeowners to main * Add support for version 2023-11-15-preview in Language.AnalyzeText * Added exmaples and updated added a language interface * Add scriptCode property to DetectedLanguage model * Fix general Typespec errors * Remove exampleValidation.txt file * revert file deletions * Update entity recognition documentation * Fix general typespec errors * Update language detection examples * removed unused refrences and fix errors * updated LanguageConversations * fix openapi pipeline errors * fix more pipeline errors * fixed typespec compile warnings * remove examples from typespec for sdk generation * tsv fixes * Update SentimentResponse model and analyzetext.json for document response * Update healthcare and summarization models * Update SentimentResponseWithDocumentDetectedLanguage model * fixed prettier checks * TSV validation fixes * Prettier fixes * Rename C# project to AnalyzeText * Add query parameter for generating summary * ypeSpec Validation fixes * fixed server endpoint * fixed missing comma * Remove x-ms-examples from analyzeconversations.json and analyzetext.json * mitigate some breaking changes * fixed some breaking changes * breaking change fix * more breaking change fixes * fixed more breaking changes * fixed breaking changes * fixed more breaking changes * fixed breaking change * breaking changes * reset unintended changes * added examples back * tsv fixes * fixed examples * Update Language.Conversations version 2023-11-15-preview doc * fixed models and removed unneeded file * fixed breaking changes * fix breaking change * more breaking changes * fix breaking changes * breaking chagnes fix * commented examples due to not working with autorest * quote autorest flavor * removed flavor * add clientname for Association * rename for csharp * rename for csharp * bug fix on TemporalSpanMetadata * removed invalid extends * fix more bad extends * Add docs for common.models.tsp * Updated for entities and language * remove the base object Record<Unknown> * tsv fixes * spell check and projectedName to encodedName * fixed encodedname * add docs to healthcare tsp * Few more missing docs * fix tsv errors * tsv fixes * Some more missing docs * spec * missing docs * fixing typespec validation * tsv fixes * Fix swagger spell check errors * fix type validation * typo in /common.models.tsp * Add @doc decorators to the Summarization typespec file * More * Add Keyphrase and sentiment * . * Update custom-words.txt to contain picometers * Fix tsv error * Rename the operation IDs in the examples to match * Update examples for analyze-conversations * tsv compile * fix exclude parameter * run tsv compile * Address comments * Some more changes * remove 2023-04-15-preview * remove @needsRoute * Remove readme * addressed PR comments * removed @clientname from models * revert removing QnA from analyze-conversations * Add some docs * Address doc comments * fix spellcheck * Remove Record<Unknown> * small change * fix analyze-conv sync * fix km * removing unnecessary QnA reference from analyze-conversations * Update specification/cognitiveservices/Language.Conversations/main.tsp Co-authored-by: catalinaperalta <[email protected]> * Update specification/cognitiveservices/Language.AnalyzeText/client.tsp Co-authored-by: catalinaperalta <[email protected]> * Address comments * Add client.tsp * fx tsp * tsv compile * remove extra impor * Update specification/cognitiveservices/Language.AnalyzeText/tspconfig.yaml Co-authored-by: catalinaperalta <[email protected]> * make enable?:true * fix tsp * address comment * remaining comments * use Azure.Core.Foundations.ErrorResponse * Address comments of LuisResult * Update doc comments * tsv compile --------- Co-authored-by: Zach-King2 <[email protected]> Co-authored-by: Bidisha Chakraborty <[email protected]> Co-authored-by: Dimitry Vislov <[email protected]> Co-authored-by: Bidisha Chakraborty <[email protected]> Co-authored-by: Mohamed Abbas <[email protected]> Co-authored-by: catalinaperalta <[email protected]>
@heaths @quentinRobinson