A demo application creating using the Spring Framework. This application requires access to a database.
When running the pet-store, the following environment variables are expected:
DB_URL
Url or connection string.DB_USERNAME
Username to connect as (not required for secretless).DB_PASSWORD
Password to connect as (not required for secretless).DB_PLATFORM
Platform to use in the DDL or DML scripts (such as schema-${platform}.sql or data-${platform}.sql). Supported values ofDB_PLATFORM
aremysql
,mssql
, andpostgres
.
The demo application mocks a pet store service which controls an inventory of pets in a persistent database. The following routes are exposed:
GET
/pets
List all pets in inventory
200
An array of pets in the response body
[
{
"name": "Scooter"
},
{
"name": "Sparky"
}
]
POST
/pet
Add a pet to the inventory
Content-Type: application/json
{
"name": "Scooter"
}
201
GET
/pet/{id}
Retrieve information on a pet
404
200
{
"id": 1
"name": "Scooter"
}
DELETE
/pet/{id}
Remove a pet from inventory
404
200
GET
/vulnerable
Return a JSON representation of all environment variables that
the app knows about
200
To learn more about contributing to this repository, please see CONTRIBUTING.md.
The Pet Store demo app is licensed under Apache License 2.0 - see LICENSE.md
for more details.