nelmio/NelmioApiDocBundle — pull request #107 by baldurrensch (2012-12-03 20:57:14+00:00)
Title: [RFC, PoC, WIP]: Add Compiler Pass to provide additional documentation

This is more a proof of concept and to get some early feedback whether this kind of functionality is even desired.

Basically, there is a new service in the APIDoc Bundle that will collect documentation pieces from tagged services (`nelmio_api_doc.provider`) via a Compiler Pass. I have temporarily added one (`nelmio_api_doc.provider.link` – this would actually live in the FSCHateoasBundle) to demo how this could work, but those services would of course live in other bundles. Ideally all the current logic for the extraction of information would eventually also move into such services.

The service gets the annotation as a parameter right now. It would then return something that implements a `DocumentationSectionInterface` (not done yet). There could be different concrete classes, I have added a simple one `TabularSection` just to show what I would imagine. Another one would just be a `BlockSection`. This would also make the Twig templates more generic, and adding more information would be easier.

Remember that:
- code is not tested
- not documented
- the Link provider needs to be removed - and it does not even fully provide all the information it needs. It was more a quick demo to show the possibilities.
- code needs to be cleaned up

If there is no interest in this, please let me know, and I will not pursue this any further.