Jsonschema add prop comments (#6617)

* Add comments for properties

* regenerated test files

* Reverted changes in testfiles generated with generate_code.bat on windows

* fixed formatting in util.cpp because of failed .travis/format_check.sh

* removed the use of tuple

* util.cpp: Fixed format

* idl_gen_json_schema.cpp: removed extra comma in deprecated fields

* Corrected monster_test.schema.json

* idl_gen_json_schema: Inlined Trim function

* Fixed format

* PrepareDescription(): Avoid unnecessary string copy

* fixed formatting
This commit is contained in:
schoetbi
2021-06-21 20:42:07 +02:00
committed by GitHub
parent 962751a6ec
commit c8db1ca5d4
2 changed files with 47 additions and 17 deletions

View File

@@ -162,7 +162,7 @@
},
"MyGame_Example_Monster" : {
"type" : "object",
"description" : " an example documentation comment: \"monster object\"",
"description" : "an example documentation comment: \"monster object\"",
"properties" : {
"pos" : {
"$ref" : "#/definitions/MyGame_Example_Vec3"
@@ -178,7 +178,7 @@
},
"friendly" : {
"type" : "boolean",
"deprecated" : true,
"deprecated" : true
},
"inventory" : {
"type" : "array", "items" : {"type" : "integer", "minimum" : 0, "maximum" :255}
@@ -199,7 +199,8 @@
"type" : "array", "items" : {"type" : "string"}
},
"testarrayoftables" : {
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_Monster"}
"type" : "array", "items" : {"$ref" : "#/definitions/MyGame_Example_Monster"},
"description" : "an example documentation comment: this will end up in the generated code\nmultiline too"
},
"enemy" : {
"$ref" : "#/definitions/MyGame_Example_Monster"