| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cf98a10 commit b3eedde
17 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -255,6 +255,9 @@ func SetupHandler() { | |||
| 255 | 255 | http.Handle("/", Handler(&myApi)) | |
| 256 | 256 | } | |
| 257 | 257 | ``` | |
| 258 | + | ||
| 259 | + Alternatively, [Gorilla](https://github.com/gorilla/mux) is also 100% compatible with `net/http` and can be generated with `-generate gorilla`. | ||
| 260 | + | ||
| 258 | 261 | </summary></details> | |
| 259 | 262 | ||
| 260 | 263 | #### Additional Properties in type definitions | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,7 +86,7 @@ func main() { | |||
| 86 | 86 | // All flags below are deprecated, and will be removed in a future release. Please do not | |
| 87 | 87 | // update their behavior. | |
| 88 | 88 | flag.StringVar(&flagGenerate, "generate", "types,client,server,spec", | |
| 89 | - `Comma-separated list of code to generate; valid options: "types", "client", "chi-server", "server", "gin", "spec", "skip-fmt", "skip-prune"`) | ||
| 89 | + `Comma-separated list of code to generate; valid options: "types", "client", "chi-server", "server", "gin", "gorilla", "spec", "skip-fmt", "skip-prune"`) | ||
| 90 | 90 | flag.StringVar(&flagIncludeTags, "include-tags", "", "Only include operations with the given tags. Comma-separated list of tags.") | |
| 91 | 91 | flag.StringVar(&flagExcludeTags, "exclude-tags", "", "Exclude operations that are tagged with the given tags. Comma-separated list of tags.") | |
| 92 | 92 | flag.StringVar(&flagTemplatesDir, "templates", "", "Path to directory containing user templates") | |
@@ -321,6 +321,8 @@ func newConfigFromOldConfig(c oldConfiguration) configuration { | |||
| 321 | 321 | opts.Generate.EchoServer = true | |
| 322 | 322 | case "gin": | |
| 323 | 323 | opts.Generate.GinServer = true | |
| 324 | + case "gorilla": | ||
| 325 | + opts.Generate.GorillaServer = true | ||
| 324 | 326 | case "types": | |
| 325 | 327 | opts.Generate.Models = true | |
| 326 | 328 | case "spec": | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,6 @@ | |||
| 1 | + package: api | ||
| 2 | + generate: | ||
| 3 | + gorilla-server: true | ||
| 4 | + models: true | ||
| 5 | + embedded-spec: true | ||
| 6 | + output: petstore.gen.go | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments