Azure / azure-openapi-validator

Azure Open API Validator
MIT License
44 stars 43 forks source link

Puzzling error about properties of a patch request must not be required: type. [TypeSpec PR] #672

Closed TimLovellSmith closed 3 months ago

TimLovellSmith commented 4 months ago

Before filling a bug

Describe the bug

We're getting an unexpected linter error:

❌ PatchBodyParametersSchema | Properties of a PATCH request body must not be required, property:type.Location: GitHub.Network/stable/2024-04-02/GitHub.Network.json#L303 | RPC-Patch-V1-10

in this typespec PR. https://github.com/Azure/azure-rest-api-specs-pr/pull/17246/checks?check_run_id=22323977604

I can't figure out why. The json looks reasonable to me.

Please provide as much information as you can. This would be:
- OpenAPI files having the issues
- Autorest command used

Expected behavior I didn't expect the error. Am I missing something?

Additional context

mikeharder commented 3 months ago

Dup of https://github.com/Azure/typespec-azure/issues/383