Add a way to generate doc for private and public api #120

Closed
marcw opened this Issue Dec 18, 2012 · 6 comments

Projects

None yet

6 participants

@marcw
marcw commented Dec 18, 2012

APIs are not always fully public and you might want to generate a doc for public users and another documentation for internal use. This feature needs a bit of discussion on how to implement it, though.

@Seldaek
Member
Seldaek commented Dec 19, 2012

Maybe the most flexible would be some twig helpers so that you can make your own doc template and dump the docs for the routes you want. Then you can create as many templates as you want.

@benbender

I am facing a similar problem. Is it possible to hide specific routes inside the documentation if you have multiple routes inside a doc-tag? If not, @Seldaek can you elaborate a little bit more about the approach with the twig-helpers (or point me in the right direction)?

@Seldaek
Member
Seldaek commented Mar 22, 2013

@benbender I thought instead of relying on the bundle default api doc route, you could build your own controller/template that renders explicitly some routes by name, or maybe a given "section" of the docs so you could use that as a tag. That wouldn't really help if you have two routes on one controller though.

@benbender

I've found another solution which is, I think, a better and more flexible approach. See my according pr #155. For now I have to subclass the ApiDocExtractor and change the class-parameter to do this. With the pr, this would be nativly possible. I also thought of a kind of filter-api for the routes but do not want to fiddle with the existing api too deep for now...

@lasryaric

So I need to create a private documentation or a documentation that would be available via a different endpoint than our public documentation. What is the recommended way to do that today?
I'm trying to understand how you did it (you = @benbender ) but I don't understand...

@ckdarby
Contributor
ckdarby commented Sep 16, 2013

@marcw This should be solved with the merge of #155

@willdurand willdurand closed this Sep 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment