When parsing the document, these errors are incorrectly thrown:
| Error count: 6, Warning count: 0
Errors:
-attribute components.schemas.ConstWithArray.const is not of type `string`
-attribute components.schemas.ConstWithAFalseDoesNotMatchA0.const is not of type `string`
-attribute components.schemas.ConstWithObject.const is not of type `string`
-attribute components.schemas.ConstWithATrueDoesNotMatchA1.const is not of type `string`
-attribute components.schemas.ConstWithFalseDoesNotMatch0.const is not of type `string`
-attribute components.schemas.ConstWithTrueDoesNotMatch1.const is not of type `string`
v3.1.0 parsing of a document that contains valid const values is incorrectly throwing errors
swagger-parser version: 2.1.1
For this spec:
When parsing the document, these errors are incorrectly thrown:
This blocks compliance to json schema 2020-12, required by openapi v3.1.0 This came up when writing: https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/pull/241
Related: https://github.com/swagger-api/swagger-parser/issues/1966