-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[TypeSpec] Update formatting of existing specs #24041
Conversation
Hi, @mikeharder 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
|
Rule | Message |
---|---|
"How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR." | |
"How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR." | |
"How to fix":"Check the detailed log and verify if the TypeSpec emitter is able to create API review file for the changes in PR." |
️️✔️
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: 8 Errors, 32 Warnings failed [Detail]
Only 30 items are listed, please refer to log for more details.
Rule | Message |
---|---|
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." |
InConsistentSwagger |
"details":"The generated swagger file 2022-09-02-preview/fleets.json from typespec specification/containerservice/Fleet.Management is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2022-09-02-preview/fleets.json' in PR, please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log." |
InConsistentSwagger |
"details":"The generated swagger file 2023-03-15-preview/fleets.json from typespec specification/containerservice/Fleet.Management is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/preview/2023-03-15-preview/fleets.json' in PR, please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log." |
MissingExamplesDirectory |
"details":"The 'examples' directory is missing in the typespec folder specification/eventgrid/Azure.Messaging.EventGrid, please ensure the 'examples' is added in the PR." |
InConsistentSwagger |
"details":"The generated swagger file EventGrid.json from typespec specification/eventgrid/Azure.Messaging.EventGrid is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2017-06-15-preview/EventGrid.json' in PR, please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log." |
InConsistentSwagger |
"details":"The generated swagger file 2023-05-01-preview/TrafficController.json from typespec specification/servicenetworking/ServiceNetworking.Management is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2023-05-01-preview/TrafficController.json' in PR, please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log." |
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 |
|
The shared option is deprecated, use the @sharedRoute decorator instead.Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L174 |
|
The shared option is deprecated, use the @sharedRoute decorator instead.Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L199 |
|
Azure services must not have properties of type unknown .Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L65 |
|
The names of Property types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L68 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L174 |
|
Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L174 |
|
Request body should not be of raw array type. Consider creating a container model that can add properties over time to avoid introducing breaking changes. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L217 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L199 |
|
Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L199 |
|
Request body should not be of raw array type. Consider creating a container model that can add properties over time to avoid introducing breaking changes. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L217 |
|
Request body should not be of raw array type. Consider creating a container model that can add properties over time to avoid introducing breaking changes. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L217 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L224 |
|
Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L224 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L249 |
|
Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L249 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L273 |
|
Operations defined using RpcOperation should not have path parameters. Consider using ResourceAction or ResourceCollectionAction instead. Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L273 |
|
The names of Operation types must use camelCase Location: specification/eventgrid/Azure.Messaging.EventGrid/main.tsp#L297 |
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Swagger Generation Artifacts
|
Generated ApiView
|
/azp run specs - typespec - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
dfccd50
to
66bfa04
Compare
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.
Formatting change looks good, can't spot any weird formatting
@header | ||
location: string; | ||
@body result: AnomalyDetectionModel; |
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.
@timotheeguerin: Why is @header
split onto two lines but @body
stays on one line?
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.
one decorator can be inlined(it should keep your decision), more than one it will split lines
@body | ||
options: MultivariateBatchDetectionOptions |
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.
@timotheeguerin: Why is @body
split onto multiple lines here but not above?
@doc("Azure Messaging EventGrid Client") | ||
@versioned(ServiceApiVersions) | ||
namespace Azure.Messaging.EventGrid { | ||
|
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.
@timotheeguerin: What caused all these comments to move?
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.
did those get duplicated?
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.
oh I see there were all moved to the top, yeah thats a bug. Comments are always having weird formatting issue
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.
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.
If this is a bug do we need to revert the formatting check (and the changes to this file) until this is fixed?
No description provided.