Skip to content
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

WIP: Use Protagonist instead of Drafter.js #286

Closed
wants to merge 1 commit into from
Closed

WIP: Use Protagonist instead of Drafter.js #286

wants to merge 1 commit into from

Conversation

tobiashm
Copy link

@tobiashm tobiashm commented Oct 7, 2015

Drafter.js is now deprecated, and has been replaced by Protagonist.

This commit is just a naive replacement of new Drafter().make with protagonist.parse for parsing the API Blueprint documents.
A lot of tests are currently failing, so probably the output of the two methods are not compatible.

@obihann
Copy link

obihann commented Oct 7, 2015

I started a similar PR #285 but after talking to @netmilk and @pksunkara I learnt that their is a big difference between drafter.js and protagonist, specifically, drafter does not render json the same as drafter.js does. Check out #283 and you can see the full conversation. I think this may have to wait until drafter us updated to match the same functionality as drafter.js, @pksunkara should be able to speak to a timeline or what is needed for that, but I think that is our first step before we do this.

@tobiashm
Copy link
Author

tobiashm commented Oct 7, 2015

Okay. Didn't look at closed PR before starting this.
I'll look more into the differences, and where they're going with Dredd.
I still think this needs to happen; Dredd will currently not build with Node 4, due to the version of protagonist that Drafter.js depends on.
Hopefully some of the apiary.io folks will help out :-)

@obihann
Copy link

obihann commented Oct 7, 2015

I'm stuck waiting for it as well but more because of the new nullable attribute that will be added. As I understand it drafter has to be changed to include JSON schema rendering, after that they can release 1.1.0 of drafter, then update protagonist to that version, and lastly dredd.

They have setup a 1.1.0 milestone for drafter however I'm not sure if that list of issues includes the JSON schema rendering.

Hopefully that helps 👍

Drafter.js is now deprecated, and has been replaced by Protagonist.

This commit is just a naive replacement of `new Drafter().make` with `protagonist.parse` for parsing the API Blueprint documents.
A lot of tests are currently failing, so probably the output of the two methods are not compatible.
@kylef
Copy link
Member

kylef commented Dec 16, 2015

Now that Protagonist was updated with JSON Schema generation this is now possible, and it's made it into master of Dredd via #309.

Thanks very much for your effort here @obihann and @tobiashm and nice to see this has made it in 🎈.

@kylef kylef closed this Dec 16, 2015
@tobiashm
Copy link
Author

@kylef good news! Thanks

@tobiashm tobiashm deleted the protagonist branch December 16, 2015 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants