You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.0
servers:
- url: "https://ex-ample.com"
x-format-version: "1.0"
info:
title: Five
description: Issue repro 5
contact:
email: [email protected]
version: 0.0.0
paths: {}
components:
schemas:
AModel:
description: Yet another self descriptive explanation
type: object
required:
- identifier
properties:
identifier:
type: string
a_date:
description: a date
type: date
example: 2020-05-11
Run
$ yarn spectral lint repro/output.openapi.yaml -o repro/log.txt -f json -q
yarn run v1.15.2
C:\REDACTED\node_modules\.bin\spectral lint repro/output.openapi.yaml -o repro/log.txt -f json -q
Encountered error when running rule 'valid-example' on node at path '$,components,schemas,AModel,properties,a_date':
Error: schema is invalid: data/type should be equal to one of the allowed values, data/type should be array, data/type should match some schema in
anyOf
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This should be resolved with the greater work being done in #243, but progress has halted. Valid examples are complex. I will try and get somebody to work on this soon.
Describe the bug
Following yaml seems weirdly parsed by Spectral
To Reproduce
repro/output.openapi.yaml
Run
repro/log.txt
Expected behavior
date
type/components/schemas/AModel should have required property '$ref'
(which wording seems a tad weird ;-) )Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: