Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The pet store sample

License

NotificationsYou must be signed in to change notification settings

OpenAPITools/openapi-petstore

Repository files navigation

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 packagejava -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:

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/

Security

API key

Usespecial-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 theOPENAPI_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

About

The pet store sample

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp