forked from loafle/openapi-generator-original
* copy from go-server and add go-gin-server generator * change the templates for the gin * fix warnings of the golint tool * fix the path of script * add samples * delete unnecessary comments (#1048) * make the help message more appropriate (#1048) * fix the link address format (#1048) * minor improvement
32 lines
584 B
Go
32 lines
584 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"
|
|
|
|
// WARNING!
|
|
// Change this to a fully-qualified import path
|
|
// once you place this file into your project.
|
|
// For example,
|
|
//
|
|
// sw "github.com/myname/myrepo/go"
|
|
//
|
|
sw "./go"
|
|
)
|
|
|
|
func main() {
|
|
log.Printf("Server started")
|
|
|
|
router := sw.NewRouter()
|
|
|
|
log.Fatal(router.Run(":8080"))
|
|
}
|