Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

RAML plugin #17

Open
seaneagan opened this issue Jun 16, 2014 · 9 comments
Open

RAML plugin #17

seaneagan opened this issue Jun 16, 2014 · 9 comments

Comments

@seaneagan
Copy link

Since redstone allows you to define APIs declaratively using methods, parameters, annotations, etc, it should be possible to generate a RAML doc from those.

Would the plugin API provide the necessary hooks to implement this?

@luizmineo
Copy link
Member

This would be a really interesting use of the plugin API. Although, it currently doesn't provide a way to inspect installed routes. I'll try to include this feature in the API for the next release.

@seaneagan
Copy link
Author

It'd be nice if the RAML could be generated via a transformer, without having to start an actual server. It would probably require access to the actual MethodMirrors since the methods would need to have some annotations to specify the markdown documentation to put in the RAML doc.

@luizmineo
Copy link
Member

I see. But inspecting routes through a transformer will require a different API, since you have to use the analyzer package to inspect the code, instead of the mirror package.

Anyway, I think it will be good to improve the plugin API, since other plugins can create routes dynamically (which is not possible to inspect during compile time).

@luizmineo
Copy link
Member

Redstone.dart v0.5.7 now allows plugins to inspect installed routes, interceptors, error handlers and groups. Maybe it's not yet the ideal solution, but you can already use it to build a plugin that generates and publishes an index of your service API.

@azenla
Copy link

azenla commented Apr 12, 2015

@seaneagan Is this still relevant? I'm sure @redstone-dart/owners would love to look into this.

@oskbor
Copy link

oskbor commented Apr 12, 2015

Maybe the https://pub.dartlang.org/packages/rpc package can be used? Its not RAML but fills the same purpose (generating a discovery document)

@azenla
Copy link

azenla commented Apr 12, 2015

@oskbor I'll surely look into it.

@cgarciae
Copy link
Contributor

@kaendfinger actually I wanted to propose generating a Discovery Document by adding annotations, maybe for v0.6. @oskbor maybe we could make Redstone's annotations compatible with RPC's method for generating the Discovery Document, that way we don't have to implement it ourselves. I'll post on RPC to see what they think.

@seaneagan
Copy link
Author

fyi I posted a similar request for the rpc package. Perhaps code can be shared between the two projects for that.

@austincummings austincummings added v0.6 and removed v0.6 labels Jun 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants