Skip to content
New issue

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

parseSchema in schema-parser.js doesn't support boolean schemas #769

Open
paztis opened this issue Jun 10, 2024 · 0 comments
Open

parseSchema in schema-parser.js doesn't support boolean schemas #769

paztis opened this issue Jun 10, 2024 · 0 comments

Comments

@paztis
Copy link

paztis commented Jun 10, 2024

Boolean are valid schemas
false is the equivalent of never and true the equivalent of anything:

components:
schemas:
AnyType:
true

But when I use this, I have an exception in parseSchema method

TypeError: Cannot use 'in' operator to search for 'content' in true
    at SchemaParser.parseSchema (./node_modules/swagger-typescript-api/src/schema-parser/schema-parser.js:218:19)
    at SchemaParserFabric.parseSchema (./node_modules/swagger-typescript-api/src/schema-parser/schema-parser-fabric.js:102:25)
    at ./node_modules/swagger-typescript-api/src/code-gen-process.js:127:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant