apiaryio / Paw-APIBlueprintGenerator

Paw extension providing support to export API Blueprint as a code generator.
http://luckymarmot.com/paw/extensions/APIBlueprintGenerator
MIT License
32 stars 14 forks source link

Use fury.js to generate the blueprint instead of a custom template #14

Open kylef opened 9 years ago

kylef commented 9 years ago

We should use fury with the fury API Blueprint serializer to serialize the blueprint. The fury serialiser does a much better job and prevents us having further duplicate code between the two projects.

Dependencies

@danielgtaylor do you think it would be hard to get mimim and fury.js working with JavaScriptCore?

danielgtaylor commented 9 years ago

I think this should be possible. The goal is to have Fury and Minim work in a browser, so any JS engine should work via browserify, then you just need to use the correct plugins. That's part of the reason for splitting out the plugins. Something like the following (assuming browserify provides the require function):

var fury = require('fury')
  .use(require('fury-adapter-apib-serializer'));

// Get refract elements somehow, maybe through a Fury adapter to parse PAW structures?
var api = ???;

fury.serialize({api: api}, (err, apib) {
  console.log(apib);
});