metosin / metosin/compojure-api
Pretty printing response?
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.1k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
When developing, it would be nice to be able to see pretty printed EDN/JSON in responses. This would be especially useful when driving from the Swagger UI, as EDN is all printed on a single (very long) line.
Yada does this by detecting `;pretty=true` as a parameter in the content type requested:
https://github.com/juxt/yada/blob/49da1febd6d0d11aa56d2a8d7c32df559232117c/bundles/default/test/yada/swagger_test.clj#L51
Is this possible/desired in this library?
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 reviewing the linked Yada swagger_test.clj example and locating this library's response serialization and Swagger UI integration. Determine whether a content-type parameter such as `;pretty=true` is supported or desirable, then define tests showing the expected formatting for EDN and JSON responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100