Open mikeharder opened 1 year ago
25387
Attempted fix, rejected until we better understand the issue.
I searched for similar specs in the repo, and what I found was interesting. Here is the swagger and example for Cdn@2017-10-12:
In Cdn@2019-04-15, the swagger is unchanged, but the example response is changed from "200": { "body": { } }
to "200": { }
:
Here are the swagger and example for EventGrid@2023-06-01:
@johanste, @l0lawrence: Given these examples, do you still think check Swagger ModelValidation
is reporting a false positive for EventGrid? Meaning Swagger ModelValidation
should be updated so the above EventGrid swagger and example is not a violation?
Or perhaps the EventGrid example should be changed from "200": { "body": { } }
to "200": { }
, like how the Cdn sample was changed between the two versions?
Check
Swagger ModelValidation
is failing on EventGrid with this error:https://github.com/Azure/azure-rest-api-specs/pull/25323/checks?check_run_id=15930723858
From @johanste:
I believe this behavior is coded here:
https://github.com/Azure/oav/blob/760a3352a04ebfcd2e9a1d05c7ad4925f20caa2c/lib/swaggerValidator/modelValidator.ts#L744