[PatchBodyParameterSchema] Improve error message from nested properties
@mikeharder is already working on this.
Since Jun 12, 2024.
Assessment
This issue has not been assessed yet.
Description
If rule PatchBodyParameterSchema fails, the error message only includes the name of the property and the top-level reference that contains the nested property:
❌ PatchBodyParametersSchema Properties of a PATCH request body must not be required, property:type.
Location: Microsoft.AVS/stable/2023-09-01/vmware.json#L489 RPC-Patch-V1-10
❌ PatchBodyParametersSchema Properties of a PATCH request body must not be required, property:name.
Location: Microsoft.AVS/stable/2023-09-01/vmware.json#L489 RPC-Patch-V1-10
❌ PatchBodyParametersSchema Properties of a PATCH request body must not be required, property:name.
Location: Microsoft.AVS/stable/2023-09-01/vmware.json#L1609 RPC-Patch-V1-10https://github.com/Azure/azure-rest-api-specs/pull/28023/checks?check_run_id=22174134612
This can be very difficult to debug, especially if the property is nested multiple levels or is under common-types which spec authors asssume are 100% correct.
Can the rule be improved to show the original source location of the violation? Or a "call stack" of $refs?
I'm unsure if this behavior is specific to PatchBodyParameterSchema, or applies to many (or all) rules.
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/azure-openapi-validator
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Azure/azure-openapi-validator#235 ·
-
Azure/azure-openapi-validator#849 · 1 assignee ·
-
Azure/azure-openapi-validator#835 · 1 assignee ·
-
Azure/azure-openapi-validator#812 · 3 comments · 1 assignee ·
-
Azure/azure-openapi-validator#809 · 2 comments · 1 assignee ·
All issues in Azure/azure-openapi-validator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
fullcalendar/fullcalendar#8106 ·