Repository navigation
[Idea] Autodocument API changes on each Perpl release #7
kasparsatke
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
I have never used api docs, to me, it doesn't offers more details than phpdoc in IDE or jumping to the declaration, but is more cumbersome to use. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
💡 Proposal for a new approach on the API documentation 💡
For a lot of reasons, I like that there is https://api.propelorm.org. One can (still!) find a lot of info there you don't find elsewhere without fighting through half the codebase. And it even has a mostly useful in-app search. And it's totally legit the way it was conceived - b/c one cannot explain all possibilities and use cases by hand in the normal documentation, but the API still needed to be documented somehow.
But there are also a lot of reasons why it just feels half-assed:
Therefore, I am proposing an alternative:
addCondition()and want to know how that method worksFor initial data generation, I imagine to go about it in a similiar way as the original API docs: taking the perpl repo getting all the stuff parsing methods and their docblocks, which we have quite some ;-)
For the ease of calling and manipulation I would than suggest to store this in JSON files or an SQLite file rather than having static html files like https://github.com/propelorm/api.propelorm.org does it.
But I am sure there will be edge cases all around - so I am thinking of an additional annotation method too to make adjustments by hand if neccesary.
For some parts of what I just said in the last paragraphs it might still feel a bit like reinventing the wheel. But the magic comes with the automatic updating (3) on release if this is possible with a github action. So we would have an always up-to-date index of all the namespaces, classes and methods and maybe even properties that are at hand in our codebase. And their location in the source files. Additionally, we could tag their availability in the different releases and indicate if they were added, moved, deprecated or deleted from one release to another.
Please let me know your thoughts about this idea!
All reactions