-
Notifications
You must be signed in to change notification settings - Fork 42
RAML plugin #17
Comments
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. |
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. |
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). |
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. |
@seaneagan Is this still relevant? I'm sure @redstone-dart/owners would love to look into this. |
Maybe the https://pub.dartlang.org/packages/rpc package can be used? Its not RAML but fills the same purpose (generating a discovery document) |
@oskbor I'll surely look into it. |
@kaendfinger actually I wanted to propose generating a Discovery Document by adding annotations, maybe for |
fyi I posted a similar request for the rpc package. Perhaps code can be shared between the two projects for that. |
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?
The text was updated successfully, but these errors were encountered: