Look at sway https://github.com/apigee-127/sway
On Tuesday, December 12, 2017 at 5:08:21 PM UTC-5, [email protected] wrote: > > I am using Nodejs with swagger and need an easy way to convert a swagger > model definition to a valid json structure. Like in the swagger us when you > do the 'try it' feature the example is populated. Is there some simple > code to do that translation? > > > For example given the following model: > > { > id integer($int64) > category Category{ > id integer($int64) > name string} > name* string > example: doggie > photoUrls* [ > xml: OrderedMap { "name": "photoUrl", "wrapped": true }string] > tags [ > xml: OrderedMap { "name": "tag", "wrapped": true }Tag{ > id integer($int64) > name string}] > status string > > pet status in the store > Enum: > Array [ 3 ]} > > I need nodejs code that will produce : > > { > "id": 0, > "category": { > "id": 0, > "name": "string" > }, > "name": "doggie", > "photoUrls": [ > "string" > ], > "tags": [ > { > "id": 0, > "name": "string" > } > ], > "status": "available" > } > > -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
