fix: non_neg_integer() translated to minimum = 1 in bridge-api-en.json

The schema type non_neg_integer() should be translated to minimum 0 and
not 1 when generating the bridge-api-en.json file.

Fixes:
https://emqx.atlassian.net/browse/EMQX-9714
This commit is contained in:
Kjell Winblad 2023-05-08 12:38:16 +02:00
parent 1d64d343e0
commit a711ee21f3
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ typename_to_spec("float()", _Mod) ->
typename_to_spec("integer()", _Mod) -> typename_to_spec("integer()", _Mod) ->
#{type => number}; #{type => number};
typename_to_spec("non_neg_integer()", _Mod) -> typename_to_spec("non_neg_integer()", _Mod) ->
#{type => number, minimum => 1}; #{type => number, minimum => 0};
typename_to_spec("number()", _Mod) -> typename_to_spec("number()", _Mod) ->
#{type => number}; #{type => number};
typename_to_spec("string()", _Mod) -> typename_to_spec("string()", _Mod) ->