-
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
Migrating Sphere to latest TypeSpec #24420
Conversation
Hi, @allenjzhang 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 Validation Report
|
compared swaggers (via Oad v0.10.4)] | new version | base version |
---|---|---|
azuresphere.json | 2022-09-01-preview(7c52935) | 2022-09-01-preview(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 |
---|---|---|
package-2022-09-01-preview | package-2022-09-01-preview(7c52935) | package-2022-09-01-preview(main) |
The following errors/warnings exist before current PR submission:
Rule | Message |
---|---|
OperationIdNounVerb |
Per the Noun_Verb convention for Operation Ids, the noun 'Devices' should not appear after the underscore. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Location: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L2474 |
Since operation response has model definition in array type, it should be of the form '_list'. Location: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L2975 |
|
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: Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json#L3490 |
️️✔️
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]
Rule | Message |
---|---|
InConsistentSwagger |
"details":"The generated swagger file 2022-09-01-preview/azuresphere.json from typespec specification/sphere/Sphere.Management is not the same as the '/mnt/vss/_work/1/azure-rest-api-specs/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json' in PR, please make sure the swagger is consistent with the generated swagger. You can find the difference in the pipeline log." |
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
Swagger Generation Artifacts
|
Generated ApiView
|
…into migrationSphere
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.
This should be failing CI, because the folder added to eng/pipeline/typespec-ci.yml
is incorrect. However, CI is ignoring this error rather than failing, which is a bug in CI I will fix: #24448
After this bug is fixed, I'd like to verify this PR fails CI as-is, then I will fix the folder name in typespec-ci.yml
.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
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.
Failing CI due to several instances of this error:
/mnt/vss/_work/1/s/specification/sphere/Sphere.Management/common.tsp:102:27
error deprecated: Deprecated: object is deprecated. Please use {} for an empty model,
`Record<unknown>` for a record with unknown property types, `unknown[]` for an array.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
* WIP migrating Sphere * Adding to CI * Add trailing newline * Fix path to spec in eng/pipelines/typespec-ci.yml * Fixed deprecation & documentation on enums * tsp format * Fix spelling * Add PR trigger for specification/sphere --------- Co-authored-by: Mike Harder <[email protected]>
No description provided.