aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2018-02-20 22:29:01 -0300
committerGabriel A. Giovanini <mail@gabrielgio.me>2018-02-20 22:29:01 -0300
commitfc432d64c167dc2e6a17ae650e5fa8e772c4fbe8 (patch)
treeb6d38d7cc3d51bacb2dc7d1a404177f3b8eaadaa /README.md
parentfd953613e3259c63f54d49e042e16e50d47dd8fa (diff)
downloadqueue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.tar.gz
queue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.tar.bz2
queue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.zip
README
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/README.md b/README.md
index f171e30..1686dd4 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ Additionally it had an okay [non-documentation](https://github.com/tonsky/datasc
### Data structure
-Project has two model:
+Project has two models:
* Agent
* `:agent/id` unique identification of an agent
@@ -65,6 +65,23 @@ Those models wrap up in schema:
:job/agent {:db.valueType :db.type/ref}}
```
+### services.clj
+
+After all luminus file there is actually two files that have the core logic of the app `services.clj` and `db/core.cljs`.
+For `services.clj` it holds all code for endpoint definition and model validation and considering the exercise requirements we gonna need 5 endpoints:
+
+* Endpoint to add agent is a`:put` at `/agent`
+* Endpoint to get how many jobs of each type this agent has performed is a `:post` at `/agent`. Note: usually since it is a method that doesn't modify anything I would have used `:get` and pass the agent id via path (`/agent/:id`) but one of the requirement is "*All endpoints should accept and return JSON content type payloads*" I worked with POST PUT.
+* Endpoint to add a job is `:put` at `/job`
+* Endpoint to request a job is `:post` at `/job`
+* Endpoint to get current queue state is `:get` at `/job`
+
+For model detail access swagger-ui.
+
+### db/core.clj
+
+To be continued...
+