![]() That file will only be generated the first time you generate a server application from a swagger spec. To do that you have to edit the configure_xxx.go file. ![]() Prior to handling requests however you probably want to configure the API with some actual implementations. main-package= the location of the generated main. s, -server-package= the package to save the server specific code (default: restapi) log-output=LOG-FILE redirect logs to file Generate all the files for a server application You can provide your own router implementation should you so desire it's abstracted through an interface with this use case in mind. ![]() ![]() The default router for go-swagger is naoina's denco which is a very fast ternary search tree based router that allows for much greater flexibility than the trie based router implementation of julienschmidt at almost the same and sometimes lower cost. The server builds all the necessary plans and execution paths at startup time so that at runtime there is only the absolute minimum processing required to respond to requests. You can configure it through environment variables that are commonly used on PaaS services.Ī generated server uses no reflection except for an enum validation and the required validation. The toolkit has a command that will let you generate a docker friendly server with support for TLS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |