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

fix JTD discriminator with more than 8 properties, fixes #1971 #2194

Merged
merged 2 commits into from
Jan 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
prettier
  • Loading branch information
epoberezkin committed Jan 3, 2023
commit a68b3ad046d54b807c50de34100c777606e78f3d
7 changes: 6 additions & 1 deletion lib/vocabularies/jtd/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,12 @@ export function validateProperties(cxt: KeywordCxt): void {
})
}

function isAdditional(key: Name, props: string[], keyword: string, jtdDiscriminator?: string): Code | true {
function isAdditional(
key: Name,
props: string[],
keyword: string,
jtdDiscriminator?: string
): Code | true {
let additional: Code | boolean
if (props.length > 8) {
// TODO maybe an option instead of hard-coded 8?
Expand Down