elnabo / json2object

Type safe Haxe/JSON (de)serializer
MIT License
66 stars 17 forks source link

Single-line docs are eaten #61

Closed Gama11 closed 5 years ago

Gama11 commented 5 years ago
import json2object.utils.JsonSchemaWriter;

class Main {
    static function main() {
        trace(new JsonSchemaWriter<Config>("\t").schema);
    }
}

typedef Config = {
    /** stuff **/
    var foo:String;
}
"foo": {
   "description": "",
   "type": "string"
}

If the doc comment is made multi-line, it works as expected:

typedef Config = {
    /**
        stuff
    **/
    var foo:String;
}
"foo": {
    "description": "stuff",
    "type": "string"
}