Run the following commands and up the swagger and refer the End points
run the command on terminal
./gradlew build -Dquarkus.package.type=uber-jar
run the command on terminal
java -jar build/petStore-runner.jar
to find the End-points on here
http://localhost:8080/swagger-ui/
run the command on terminal
./gradlew test
Get the all the pets
curl -X GET "http://localhost:8080/pets" -H "accept: application/json"
Create a new pet
curl -X POST "http://localhost:8080/pets" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"petAge\":3,\"petName\":\"doggy\",\"petType\":\"dog\"}"
Update an existing pet
curl -X PUT "http://localhost:8080/pets/1" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"petAge\":3,\"petName\":\"dikky\",\"petType\":\"dog\"}"
Delete an existing pet
curl -X DELETE "http://localhost:8080/pets/3" -H "accept: */*"
Search pets with name/type/age
curl -X GET "http://localhost:8080/pets/search?age=5&name=boola&type=dog" -H "accept: application/json"
Get pet by ID
curl -X GET "http://localhost:8080/pets/3" -H "accept: application/json"
Get all pet types
curl -X GET "http://localhost:8080/petTypes" -H "accept: application/json"
Create a new pet type
curl -X POST "http://localhost:8080/petTypes" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"petId\":4,\"petType\":\"lion\"}"
Update an existing pet type
curl -X PUT "http://localhost:8080/petTypes/1" -H "accept: */*" -H "Content-Type: application/json" -d "{\"petId\":1,\"petType\":\"dogs\"}"
Delete an existing pet type
curl -X DELETE "http://localhost:8080/petTypes/1" -H "accept: application/json"
http://localhost:8080/swagger-ui/
Exposes the information about your endpoints in the format of the OpenAPI v3 specification. Specification here
The index page contains a link to the OpenAPI information of your endpoints.
Pet Schema
{
"petAge": int,
"petId": int,
"petName": "string",
"petType": "string"
}
PetType Schema
{
"petId": int,
"petType": "string"
}
Pet Request Schema
{
"petAge": int,
"petName": "string",
"petType": "string"
}