Skip to content

Instantly share code, notes, and snippets.

@tai2
Created December 11, 2019 04:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai2/3cca2c843918ab4aa12fc1cec1b71fdd to your computer and use it in GitHub Desktop.
Save tai2/3cca2c843918ab4aa12fc1cec1b71fdd to your computer and use it in GitHub Desktop.
OpenAPI go-server

Go API Server for openapi

This is a sample server Petstore server. For this sample, you can use the api key special-key to test the authorization filters.

Overview

This server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

  • API version: 1.0.0
  • Build date: 2019-12-11T12:59:35.549+09:00[Asia/Tokyo]

Running the server

To run the server, follow these simple steps:

go run main.go

To run the server in a docker container

docker build --network=host -t openapi .

Once image is built use

docker run --rm -it openapi 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment