LiveRamp / reslang

A language for describing resource-oriented APIs & turning them into Swagger or resource diagrams. Oriented around the concepts we want to expose in the APIs.
Apache License 2.0
23 stars 7 forks source link

generate JSON schema #99

Closed liveandrew closed 4 years ago

liveandrew commented 4 years ago

Allow reslang to generate JSON schema definitions

liveandrew commented 4 years ago

right, i've added a base level of json schema generation in commit d64dad52b139566f63347cdfcaa10a1da29dff12 v2.1.0

you can generate off any structure by doing something like:

./reslang ./models/gendiagram --jsonschema SegmentDeliveryAttemptStats --stdout

Note a couple of things:

  1. default is to use the json schema root (e.g. SegmentDeliveryAttemptStats) and include everything it references
  2. if you use --followresources it will generate only the same definitions it uses for Swagger resources
  3. if you use "noroot" it will include any structs, unions or enums in the file, and ignore resources
liveandrew commented 4 years ago

@michael-gillett any progress on this one?

liveandrew commented 4 years ago

preliminary support in - please raise defects for enhancements or changes.