- Notifications
You must be signed in to change notification settings - Fork47
OpenAPITools/openapi-petstore
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is an implementation of the OpenAPI pet store based on Spring-Boot.
Start your server as a simple Spring-Boot application
mvn spring-boot:runOr package it then run it as a Java application
mvn packagejava -jar target/openapi-petstore-{VERSION}.jarYou can view the api documentation in swagger-ui by pointing to
http://localhost:8080/
To start the server via docker, please run the following commands:
docker pull openapitools/openapi-petstoredocker run -d -e OPENAPI_BASE_PATH=/v3 -p 80:8080 openapitools/openapi-petstore
Ref:https://hub.docker.com/r/openapitools/openapi-petstore/
Usespecial-key for endpoints protected by the API key
By default the server supports the implicit and the password flow (even though only the implicit flow is described in the OAI spec)The default credentials are:
- client-id: sample-client-id
- client-secret: secret
- username: user
- password: user
Spring parameters in application.properties:
- Server port :
server.port(default=8080) - API base path :
openapi.openAPIPetstore.base-path(default=/v3). In the docker image the base path can also be set with theOPENAPI_BASE_PATHenvironment variable.
Environment variables:
DISABLE_API_KEY: if set to "1", the server will not check the api key for the relevant endpoints.DISABLE_OAUTH: if set to "1", the server will not check for an OAuth2 access token.
About
The pet store sample
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.