Open
Description
Check Swagger ModelValidation
is failing on EventGrid with this error:
##[error]Validating "examples" and "x-ms-examples" in specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json:
error :
code: INVALID_TYPE
message: Expected type but found type object
schemaUrl: >-
specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json
exampleUrl: >-
specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/examples/publish.json
schemaPosition:
line: 82
column: 22
schemaJsonPath: !<tag:yaml.org,2002:js/undefined> ''
examplePosition:
line: 24
column: 16
exampleJsonPath: $response.200/body
severity: 0
source: response
operationId: PublishCloudEvents
level: error
https://github.com/Azure/azure-rest-api-specs/pull/25323/checks?check_run_id=15930723858
From @johanste:
It looks to me like validation of examples of APIs that return an empty object may be incorrect. There is (or at least was) some ambiguity between not returning anything and returning an empty object in x-ms-examples. For the longest time it didn't matter, but at some point it was decided by the REST API review board that returning nothing was bad and empty object preferred.
I believe this behavior is coded here:
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
📋 Backlog