metosin / metosin/compojure-api
Documentation Enhancement
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.1k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
I've been thinking about expanding some of the docstrings, but I'm not sure how is best to go about it.
One option is to just copy the output of the [`help`](https://github.com/metosin/compojure-api/blob/ade3b1cc88058f166d85eacd05d9ab5668c3b47c/src/compojure/api/help.clj#L62) function but change it to use markdown instead of plain text, I've made a quick sample implementation [here](https://github.com/Akeboshiwind/compojure-api/blob/e6192b0f5d93d1a417d51c52d47b2e79c5944499/src/compojure/api/core.clj#L61). I realise that this copy pasting of documentation makes it harder to keep updated so this option isn't perfect by any means. I also don't think that the documentation in [`meta`](https://github.com/metosin/compojure-api/blob/ade3b1cc88058f166d85eacd05d9ab5668c3b47c/src/compojure/api/meta.clj#L75) has been updated in 2 years so it might not be perfectly up to date but presumably this can be easily fixed (I know that it definitely has one or two spelling mistakes to be fixed).
Another way I could achieve the same effect could be to change the functions in the `help` namespace to accept an `output-type` parameter, or something similar, to change the output to generate markdown instead of plain text. This would mean making a code change though and although I don't see the `help` function used anywhere else in the code, I don't know who else might be using it.
My question here is what do you think would be the best way to make this change? The hope is to eventually submit this as a pull request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the help function in src/compojure/api/help.clj with the sample implementation in src/compojure/api/core.clj, then review the existing documentation in src/compojure/api/meta.clj. The issue needs a maintainer decision on whether to generate Markdown through help or update docstrings directly; done means an agreed approach is implemented and the documentation is current.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100