JSON schema - tailing double quotes for maximum (#6452)

* Fix C/C++ Create<Type>Direct with sorted vectors

If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".

* Changes due to code review

* Improve code readability

* Add generate of JSON schema to string to lib

* option indent_step is supported

* Remove unused variables

* Fix break in test

* Fix style to be consistent with rest of the code

* Fix  double quotes for (u)int8 in json schema

* Fix reference file for JSON schema test

* Fix reference file for JSON schema test
This commit is contained in:
tira-misu
2021-02-10 20:45:34 +01:00
committed by GitHub
parent fee095410b
commit 0f83367f57
3 changed files with 11 additions and 11 deletions

View File

@@ -49,10 +49,10 @@ std::string GenType(BaseType type) {
return "\"type\" : \"integer\", \"minimum\" : " +
NumToString(std::numeric_limits<int8_t>::min()) +
", \"maximum\" : " +
NumToString(std::numeric_limits<int8_t>::max()) + "\"";
NumToString(std::numeric_limits<int8_t>::max());
case BASE_TYPE_UCHAR:
return "\"type\" : \"integer\", \"minimum\" : 0, \"maximum\" :" +
NumToString(std::numeric_limits<uint8_t>::max()) + "\"";
NumToString(std::numeric_limits<uint8_t>::max());
case BASE_TYPE_SHORT:
return "\"type\" : \"integer\", \"minimum\" : " +
NumToString(std::numeric_limits<int16_t>::min()) +