mirror of
https://github.com/metosin/reitit.git
synced 2025-12-19 17:21:10 +00:00
29 lines
378 B
Markdown
29 lines
378 B
Markdown
|
|
# WIP: Ring + Swagger example
|
||
|
|
|
||
|
|
TODO:
|
||
|
|
|
||
|
|
* Serve Swagger-ui.
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
```clj
|
||
|
|
> lein repl
|
||
|
|
|
||
|
|
(require '[example.server :as server])
|
||
|
|
|
||
|
|
(server/start)
|
||
|
|
```
|
||
|
|
|
||
|
|
To test the endpoints using [httpie](https://httpie.org/):
|
||
|
|
|
||
|
|
```bash
|
||
|
|
http GET :3000/api/schema/plus x==1 y==20
|
||
|
|
http GET :3000/api/spec/plus x==1 y==20
|
||
|
|
|
||
|
|
http GET :3000/api/swagger.json
|
||
|
|
```
|
||
|
|
|
||
|
|
## License
|
||
|
|
|
||
|
|
Copyright © 2017 Metosin Oy
|