📝 Update Readme

pull/5/head
Alexis Drai 2 years ago committed by alexis.drai@etu.uca.fr
parent 436ebc976b
commit 60f4e0085a

@ -131,19 +131,30 @@ You can run the application in dev mode using:
## API testing ## API testing
### 🧪 Sample dataset
You can find a sample dataset at `docs/sample-dataset/`. Each JSON file contains a collection.
To load the `moves` collection into an existing MongoDB cluster, you may use [MongoDB Shell ("mongosh")](https://www.mongodb.com/docs/mongodb-shell/) to run
```shell script
mongoimport --uri=mongodb+srv://<username>:<password>@<cluster>.<node>.mongodb.net/<databasename> --collection=moves --file=./docs/sample-dataset/moves.json
```
### 🏴‍☠️ SwaggerUI ### 🏴‍☠️ SwaggerUI
Thanks to this project's OpenAPI specs, you can explore the API in a lot of ways. Thanks to this project's OpenAPI specs, you can explore the API in a lot of ways.
A popular choice is SwaggerUI -- after you run the app, just go to http://localhost:8080/q/swagger-ui and have fun. A popular choice is SwaggerUI -- after you run the app, just go to http://localhost:8080/q/swagger-ui and have fun.
⚠️ Unfortunately, Swagger or Quarkus or SmallRye adds the field `id` to all request examples, but in fact ***you should ⚠️ Unfortunately, Swagger or Quarkus or SmallRye adds the field `id` to all request examples, but in fact ***you should
not include id** when you POST a new document.* NOT include id** when you POST or UPDATE a new document.* The app takes care of it for you. Same thing for the field `species` with `Pokemong` documents.
### 🩺 API testing tools ### 🩺 API testing tools
You can use an API testing tool such as [Postman](https://www.postman.com/) You can use an API testing tool such as [Postman](https://www.postman.com/)
or [Insomnia](https://insomnia.rest/) to test this app. or [Insomnia](https://insomnia.rest/) to test this app.
If you use Postman, you can even import `docs/postman_collection.json`, designed to work with the `🧪 Sample dataset`.
### 📱 Front end (later) ### 📱 Front end (later)
Moving forward, the front end part of this app -- a different project -- might also come into play for trying out this Moving forward, the front end part of this app -- a different project -- might also come into play for trying out this

Loading…
Cancel
Save