Skip to content

Handle non-string enum values#82

Open
P0lip wants to merge 1 commit intoatlassian:mainfrom
stoplightio:non-string-enum-values
Open

Handle non-string enum values#82
P0lip wants to merge 1 commit intoatlassian:mainfrom
stoplightio:non-string-enum-values

Conversation

@P0lip
Copy link
Copy Markdown
Contributor

@P0lip P0lip commented Oct 5, 2020

No description provided.

@atlassian-cla-bot
Copy link
Copy Markdown

atlassian-cla-bot Bot commented Oct 5, 2020

Hooray! All contributors have signed the CLA.


const bestMatch = allowedValues
const matches = allowedValues
.filter(value => typeof value === 'string')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allowedValues can be numbers too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it produce anything reasonable for numbers, though?
If we don't filter out number here, we will also need to adjust the condition above (line 64)

orgads pushed a commit to orgads/better-ajv-errors that referenced this pull request Dec 3, 2023
chore(deps): update jest monorepo to v29 (major)
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

Successfully merging this pull request may close these issues.

2 participants