From fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Tue, 20 Feb 2018 22:29:01 -0300 Subject: README --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'README.md') 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... + -- cgit v1.2.3