Giter Club home page Giter Club logo

openapi-petstore's Introduction

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:

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

openapi-petstore's People

Contributors

cbornet avatar jmini avatar wing328 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.