-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any parsers for mson? #27
Comments
Hey @tylerlong – at the moment MSON parser is part of the API Blueprint parser – Drafter the simplest MSON document in API Blueprint would look like: # Data Structures
## My Object
- name: john (e.g. you need to start with |
@zdne we do a lot data-driven documentation around our APIs in addition to the apiary reference, and I could see some real uses for a MSON2JSON parser...just sayin...:) |
@rcrooks we do have an OSS tool that does it but it is not wrapped in a CLI interface together with MSON parser just yet... |
TODO: Update this thread once C++ Drafter with refract + MSON rendering is ready. |
I'm interested as well |
Hey @rcrooks, @jayniz and @tylerlong – I just want to give you a head up – the API Blueprint parser that can parse MSON (and produces JSON) out of it is now available:
Or you can play with the protagonist directly in Atom – https://twitter.com/zdne/status/647325114393079808 |
Thanks for the heads up Z - I was already using drafter to get the AST as
json, but I was looking to transform it into json schema.
|
@jayniz it is now offering transformation to JSON, JSON schema coming soon™ |
@zdne any way to convert into JSON as the examples in https://github.com/apiaryio/mson/blob/master/README.md do it? MSON
JSON
|
@hobofan at this moment it would be a little bit "hacky" Minimal blueprint would be something like: # Data Structures
## My Object
- id: 1
- name: A green door
- price: 12.50
- tags: home, green but you have to add something to render it as application JSON eg. # GET /a
- response 200 (application/json)
- attributes (My Object) And then run it through blueprint parser (drafter / protagonist) So you will end up with: |
@hobofan all the main pieces are there but there is no dedicated tool to make turn an MSON document into (multiple?) JSONs – I guess not enough demand at this time. Besides how it would work if the MSON document would have many data structures in it? Would it spit multiple JSONs? |
As for the MSON to json schema - until a proper tool is released we're |
What I meant to say is: @zdne yes yes, there is demand for MSON->Json schema :) |
We open sourced the gem we made to convert MSON to JSON Schema. See this comment in issue #41 |
For what it's worth: I was playing today with Tonic and put together a simple (and ugly!) notebook to get JSON and JSON Schema from an MSON document: https://tonicdev.com/zdne/mson-renderer Next step: Add an endpoint to it |
Any parsers for mson?
The text was updated successfully, but these errors were encountered: