forked from loafle/openapi-generator-original
* Support additionalPorperties as command line arguments * Move Readme into main dir * Update Mustache * Update sample * Test coverage * Move cli options * Revert options * Remove tabs * openapi 3 examples * Update readme * serverPort to int * Move package version cli option to AbstractGoCodegen * Update samples * Tab to spaces * Update docs and sample with xml * Manual update doc * Another doc try * Regenerate go-gin-server doc
33 lines
609 B
Go
33 lines
609 B
Go
/*
|
|
* OpenAPI Petstore
|
|
*
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* API version: 1.0.0
|
|
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
*/
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
|
|
// WARNING!
|
|
// Change this to a fully-qualified import path
|
|
// once you place this file into your project.
|
|
// For example,
|
|
//
|
|
// sw "github.com/myname/myrepo/"
|
|
//
|
|
sw "./"
|
|
)
|
|
|
|
func main() {
|
|
log.Printf("Server started")
|
|
|
|
router := sw.NewRouter()
|
|
|
|
log.Fatal(http.ListenAndServe(":8080", router))
|
|
}
|