aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
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...
+