When exporting a datacontract to jsonschema it seems to drop the minimum and maximum field traits if they are set to 0.
Example:
[...]
models:
my_model:
description: testing minmax
type: table
fields:
mintest:
type: number
minimum: 0
maximum: 100
description: Testing minimum on zero
maxtest:
type: number
minimum: -100
maximum: 0
description: Testing maximum on zero
onlyminimum:
type: number
minimum: 0
onlymaximum:
type: number
maximum: 0
all:
type: number
minimum: 0
maximum: 0
description: Both on zero
[...]
As you can see the minimum and maximum values that are set to zero are removed.
After taking a look at the source I wonder if this if-statement in the jsonconverter might resolve to a falsy value, causing it to not be included in the output.
if field.minimum:
property["minimum"] = field.minimum
When exporting a datacontract to jsonschema it seems to drop the minimum and maximum field traits if they are set to 0.
Example:
Executed command:
datacontract export --format jsonschema
Expected result:
Actual result:
As you can see the minimum and maximum values that are set to zero are removed.
After taking a look at the source I wonder if this if-statement in the jsonconverter might resolve to a falsy value, causing it to not be included in the output.