We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema type incorrectly set when omitted and enums given
Swagger-parser version: 2.0.31
Sample spec:
openapi: 3.0.3 info: title: openapi 3.0.3 sample spec description: sample spec for testing openapi functionality, built from json schema tests for draft6 version: 0.0.1 paths: {} components: schemas: SimpleEnumValidation: enum: - 1 - 2 - 3 HeterogeneousEnumValidation: enum: - 6 - foo - [] - true - foo: 12 HeterogeneousEnumWithNullValidation: enum: - 6 - null EnumWithEscapedCharacters: enum: - 'foo bar' - "foo\rbar" EnumWithFalseDoesNotMatch0: enum: - false EnumWithTrueDoesNotMatch1: enum: - true EnumWith0DoesNotMatchFalse: enum: - 0 EnumWith1DoesNotMatchTrue: enum: - 1 NulCharactersInStrings: enum: - "hello\0there"
When parsing the above schema, type should be unset on all components When one checks
The text was updated successfully, but these errors were encountered:
This bug prevents spec writers from making enums with any type (unset type)
Sorry, something went wrong.
This has been fixed in #1768 with usage of new inferSchemaType option. By setting it to false type will not be anymore inferred
inferSchemaType
false
No branches or pull requests
Schema type incorrectly set when omitted and enums given
Swagger-parser version: 2.0.31
Sample spec:
When parsing the above schema, type should be unset on all components
When one checks
The text was updated successfully, but these errors were encountered: