azure-rest-api-specs
azure-rest-api-specs copied to clipboard
Fix for undefined arm-id format type
Choose a PR Template
Switch to "Preview" on this description then select one of the choices below.
Click here to open a PR for a Data Plane API.
Click here to open a PR for a Control Plane (ARM) API.
Hi, @Joeleniqs! Thank you for your pull request. To help get your PR merged:
Generated ApiView
comment added to this PR. You can use ApiView to show API versions diff.
Swagger Validation Report
️❌
BreakingChange: 7 Errors, 0 Warnings failed [Detail]
compared swaggers (via Oad v0.10.4)] | new version | base version |
---|---|---|
types.json | 4.0(6e7f6e8) | 4.0(main) |
️️✔️
Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️
CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️
LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
️️✔️
Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️
ApiReadinessCheck succeeded [Detail] [Expand]
️️✔️
~[Staging] ServiceAPIReadinessTest succeeded [Detail] [Expand]
Validation passes for ServiceAPIReadinessTest.
️❌
SwaggerAPIView: 1 Errors, 0 Warnings failed [Detail]
Rule | Message |
---|---|
Failed to generate swagger APIView. The readme file format is invalid and the tag is not defined. Use the provided readme template for guidance readme template. For more details, please check the detail log. |
"How to fix":"Check the readme file and make sure the readme file format is valid and the tag is defined. Use the provided readme template" |
️️✔️
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] [Expand]
Validation passes for TypeSpec Validation.
️️✔️
PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️⌛
Please ignore, experimental check pending [Detail]
Swagger Generation Artifacts
️️✔️
ApiDocPreview succeeded [Detail] [Expand]
Please click here to preview with your @microsoft account.
️️✔️
SDK Breaking Change Tracking succeeded [Detail] [Expand]
Breaking Changes Tracking
Swagger pipeline restarted successfully. If there is ApiView generated, it will be updated in this comment.
Hi @Joeleniqs! The automation detected breaking changes in this pull request. As a result, it added the BreakingChangeReviewRequired
label.
You cannot proceed with merging this PR until you complete one of the following action items:
ACTION ITEM ALTERNATIVE A: Fix the breaking change.
Please consult the documentation provided in the relevant validation failures.
ACTION ITEM ALTERNATIVE B: Request approval.
Alternatively, if you cannot fix the breaking changes, then you can request an approval for them. Please follow the process described in the High-level Breaking Change Process doc.
ACTION ITEM ALTERNATIVE C: Report false positive.
If you think there are no breaking changes, i.e. the validation should pass yet it fails, then proceed as explained in ACTION ITEM ALTERNATIVE B.
This applies even if the breaking change tool fails with internal runtime error. In such case a manual breaking change review is necessary.
This PR introduces a fix for PR (#24301) , considering arm-id format type isn't defined and any swagger validator doesn't export that format type, code generators doesn't resolve it and ignores any class that has any reference to it.
This PR defines a arm-resource-id format type and introduces a regex pattern for validation. This regex is not perfect but sufficient all our used cases , cases covered can be found at : https://regex101.com/r/96g3K5/1
Previously approved breaking change from https://github.com/Azure/azure-rest-api-specs-pr/pull/12897 should be sufficient.
CodeGen don't support some definitions in v4 & v5 common types, here is an issue https://github.com/Azure/autorest.csharp/issues/3537 opened to fix this problem.
For Azure Communication Service OpenApi spec use case , we would provide a custom format in the autorest md , to narrow scope of usage until proper fix is available.