Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openapitools/openapi-petstore
The pet store sample
https://github.com/openapitools/openapi-petstore
openapi openapi-codegen openapi3 petstore
Last synced: about 5 hours ago
JSON representation
The pet store sample
- Host: GitHub
- URL: https://github.com/openapitools/openapi-petstore
- Owner: OpenAPITools
- License: apache-2.0
- Created: 2018-06-05T15:27:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-01T07:54:01.000Z (about 1 year ago)
- Last Synced: 2024-04-23T02:23:39.100Z (7 months ago)
- Topics: openapi, openapi-codegen, openapi3, petstore
- Language: Java
- Homepage:
- Size: 46.9 KB
- Stars: 47
- Watchers: 7
- Forks: 45
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenAPI petstore
This is an implementation of the OpenAPI pet store based on Spring-Boot.
## Overview
Start your server as a simple Spring-Boot application
```
mvn spring-boot:run
```
Or package it then run it as a Java application
```
mvn package
java -jar target/openapi-petstore-{VERSION}.jar
```You can view the api documentation in swagger-ui by pointing to
http://localhost:8080/## Docker
To start the server via docker, please run the following commands:
```sh
docker pull openapitools/openapi-petstore
docker run -d -e OPENAPI_BASE_PATH=/v3 -p 80:8080 openapitools/openapi-petstore
```Ref: https://hub.docker.com/r/openapitools/openapi-petstore/
## Security
### API key
Use `special-key` for endpoints protected by the API key### OAuth2
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## Configuration
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 the `OPENAPI_BASE_PATH` environment 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.## License
[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0)