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

jsonschema: allow null to NaN and Inf formats #25

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions connector/metadata/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ type RuntimeFormatSettings struct {
// The serialization format for value
Value ValueFormat `json:"value" yaml:"value" jsonschema:"enum=string,enum=float64,default=string"`
// The serialization format for not-a-number values
NaN any `json:"nan" yaml:"nan" jsonschema:"oneof_type=string;number"`
NaN any `json:"nan" yaml:"nan" jsonschema:"oneof_type=string;number;null"`
// The serialization format for infinite values
Inf any `json:"inf" yaml:"inf" jsonschema:"oneof_type=string;number"`
Inf any `json:"inf" yaml:"inf" jsonschema:"oneof_type=string;number;null"`
// The serialization format for negative infinite values
NegativeInf any `json:"negative_inf" yaml:"negative_inf" jsonschema:"oneof_type=string;number"`
NegativeInf any `json:"negative_inf" yaml:"negative_inf" jsonschema:"oneof_type=string;number;null"`
}

// RuntimeSettings contain settings for the runtime engine
Expand Down
9 changes: 9 additions & 0 deletions jsonschema/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,9 @@
},
{
"type": "number"
},
{
"type": "null"
}
]
},
Expand All @@ -458,6 +461,9 @@
},
{
"type": "number"
},
{
"type": "null"
}
]
},
Expand All @@ -468,6 +474,9 @@
},
{
"type": "number"
},
{
"type": "null"
}
]
}
Expand Down