cvent / deprecated-json-schema-2-poco

Converts JSON schemas to C# POCOs
18 stars 27 forks source link

Php serialize #29

Closed jwisener closed 8 years ago

jwisener commented 8 years ago

The serialization of the json returned to the sub-objects was not getting projected correctly. There is a serializer that will read ndoc attributes and properly serialize. I had to modify the generator to add the @ for the ndoc on the types. In addition the enums were not in the proper string format. I had to change it to use a properly built enum.

 if (type.IsEnum)
 {
     _output.WriteLine("require_once (dirname(__FILE__) .  '/../../../../../includes/Enum.php');");
     _output.Write("class {0} extends Enum ", type.Name);
                  OutputStartingBrace();

TESTING

I ran this multiple times to ensure the NDoc was generated, I have samples setup to hit all the api, those continued to work.