Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/3.1.5/maven-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/3.1.5/maven-plugin/reference/html/#build-image)
* [Spring Web](https://docs.spring.io/spring-boot/docs/3.1.5/reference/htmlsingle/index.html#web)
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/3.1.5/reference/htmlsingle/index.html#data.sql.jpa-and-spring-data)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)

11 changes: 11 additions & 0 deletions HowToUse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

## Requirements
In order to use this API you need to have installed Docker and Insomnia to test the endpoints

## How to use this API

To use the API follow this steps:
1. In order to test the endpoints run the docker-compose.yml file
2. Run the ApplicationKata file
3. Then use Insomnia to import the json present in the project there you would have the test made to this api.
4. Select the one you want to check ant run it. You should see the results in the right screen
1 change: 1 addition & 0 deletions Insomnia_2023-11-03.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_type":"export","__export_format":4,"__export_date":"2023-11-30T15:17:41.721Z","__export_source":"insomnia.desktop.app:v8.4.5","resources":[{"_id":"req_ad54017eed71463bb8be454278de641b","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999407441,"created":1698999193685,"url":"localhost:8080/beers","name":"Get Beers","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698999193685,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","parentId":null,"modified":1700465581198,"created":1700465581198,"name":"My Collection","description":"","scope":"collection","_type":"workspace"},{"_id":"req_2653bd01577d41cc8cdd1caed17148b6","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1701255002979,"created":1698999192904,"url":"localhost:8080/beer/5","name":"Get Beer","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698999192904,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4a71ecab494342ba98bf12de4a3c19e6","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1701357396274,"created":1698999191322,"url":"localhost:8080/beer/5","name":"Delete Beer","description":"","method":"DELETE","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698999191322,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_8919759527504f43a6610c990f15ca1f","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1700818548467,"created":1698999190083,"url":"localhost:8080/beer","name":"Create Beer","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"name\": \"Crafty IPA\",\n \"abv\": 6.5,\n \"ibu\": 50.0,\n \"srm\": 12.0,\n\t\"upc\": 1,\n \"last_mod\": \"2023-11-24\",\n \"descript\": \"A hoppy and flavorful India Pale Ale.\",\n \"filepath\": \"/images/crafty_ipa.jpg\",\n \"addUser\": 0\n}"},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0","id":"pair_9d25b179bf9647ff82941cdb29d70aff","disabled":false},{"id":"pair_81fdb2bed64e47cb8bd9a311a9db24f6","name":"Content-Type","value":"application/json","description":""}],"authentication":{},"metaSortKey":-1698999190083,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_4bc6c9932d104ac1ad66a53112efac60","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1701259224721,"created":1698997276856,"url":"localhost:8080/beer/3","name":"Update Beer","description":"","method":"PUT","body":{"mimeType":"application/json","text":"{\n \"id\": 123,\n \"breweries\": null,\n \"name\": \"Updated Example Beer\",\n \"categories\": {\n\t\t\"id\": 2\n\t},\n \"styles\": {\n\t\t\"id\":2\n\t},\n \"abv\": 5.2,\n \"ibu\": 33.4,\n \"srm\": 15.3,\n \"upc\": 555555555,\n \"filepath\": \"new/path/to/beer/image.jpg\",\n \"descript\": \"Updated Sample text\",\n \"addUser\": 1111,\n \"lastMod\": \"2023-11-03\"\n}\n"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json"},{"name":"User-Agent","value":"insomnia/8.3.0","id":"pair_74baf2f471fd43c5a50a60decb8945f3"}],"authentication":{},"metaSortKey":-1698997276856,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_7d85569d6d624f5bbd9519de56ba2ddf","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999526688,"created":1698862435713,"url":"localhost:8080/breweries","name":"Get Breweries ","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435713,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_3783353e43ab42a2a9c3f94e4a490f40","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999543288,"created":1698999291737,"url":"localhost:8080/brewerie/1","name":"Get brewery","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435613,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_150e78a2f38d4287875ef4c331c05a12","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999514740,"created":1698999343022,"url":"localhost:8080/categories","name":"Get Categories","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435600.5,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_261175ed41c247e29d2a3613366ea657","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999563017,"created":1698999342031,"url":"localhost:8080/category/1","name":"Get Category","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435588,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_b037ab7e873a47fa979173efe6e72350","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1701259520820,"created":1698999341224,"url":"localhost:8080/styles","name":"Get Styles ","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435563,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"req_60864c3231e94546aec16305a595aa6c","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698999621727,"created":1698999340240,"url":"localhost:8080/style/1","name":"Get Style","description":"","method":"GET","body":{},"parameters":[],"headers":[{"name":"User-Agent","value":"insomnia/8.3.0"}],"authentication":{},"metaSortKey":-1698862435513,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_1c9f6432b44248f0ad0cd85076f196c0","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698862432589,"created":1698862432589,"name":"Base Environment","data":{},"dataPropertyOrder":null,"color":null,"isPrivate":false,"metaSortKey":1698862432589,"_type":"environment"},{"_id":"jar_ec49394a3de347929d435defe317665a","parentId":"wrk_ab4dd56e5dbb4e38a0acc4a25addf239","modified":1698862432595,"created":1698862432595,"name":"Default Jar","cookies":[],"_type":"cookie_jar"}]}
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2020 EPFL-Dojo

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2020 EPFL-Dojo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading