diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-20 22:29:01 -0300 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-20 22:29:01 -0300 |
commit | fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8 (patch) | |
tree | b6d38d7cc3d51bacb2dc7d1a404177f3b8eaadaa /README.md | |
parent | fd953613e3259c63f54d49e042e16e50d47dd8fa (diff) | |
download | queue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.tar.gz queue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.tar.bz2 queue-api-fc432d64c167dc2e6a17ae650e5fa8e772c4fbe8.zip |
README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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... + |