Skip to content

Commit

Permalink
jsonschema: allow null to NaN and Inf formats (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac authored Oct 12, 2024
1 parent 7a19117 commit 347d930
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
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

0 comments on commit 347d930

Please sign in to comment.