🧬 fiber middleware to automatically generate RESTful API documentation with Swagger

Related tags

Network swagger
Overview

Swagger

Release Discord Test Security Linter

fiber middleware to automatically generate RESTful API documentation with Swagger

Usage

  1. Add comments to your API source code, See Declarative Comments Format.
  2. Download Swag for Go by using:
go get -u github.com/swaggo/swag/cmd/swag
  1. Run the Swag in your Go project root folder which contains main.go file, Swag will parse comments and generate required files(docs folder and docs/doc.go).
swag init
  1. Download swagger by using:
go get -u github.com/gofiber/swagger

And import following in your code:

import "github.com/gofiber/swagger" // swagger handler

Canonical example:

package main

import (
	"github.com/gofiber/swagger"
	"github.com/gofiber/fiber/v2"

	// docs are generated by Swag CLI, you have to import them.
	// replace with your own docs folder, usually "github.com/username/reponame/docs"
	_ "github.com/gofiber/swagger/example/docs"
)

// @title Fiber Example API
// @version 1.0
// @description This is a sample swagger for Fiber
// @termsOfService http://swagger.io/terms/
// @contact.name API Support
// @contact.email [email protected]
// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
// @host localhost:8080
// @BasePath /
func main() {
	app := fiber.New()

	app.Get("/swagger/*", swagger.HandlerDefault) // default

	app.Get("/swagger/*", swagger.New(swagger.Config{ // custom
		URL: "http://example.com/doc.json",
		DeepLinking: false,
		// Expand ("list") or Collapse ("none") tag groups by default
		DocExpansion: "none",
		// Prefill OAuth ClientId on Authorize popup
		OAuth: &swagger.OAuthConfig{
			AppName:  "OAuth Provider",
			ClientId: "21bb4edc-05a7-4afc-86f1-2e151e4ba6e2",
		},
		// Ability to change OAuth2 redirect uri location
		OAuth2RedirectUrl: "http://localhost:8080/swagger/oauth2-redirect.html",
	}))

	app.Listen(":8080")
}
  1. Run it, and browser to http://localhost:8080/swagger, you can see Swagger 2.0 Api documents.
Comments
  • Reverse Proxy configuration

    Reverse Proxy configuration

    Hello.

    I use a reverse proxy (Istio+Envoy) and I'm unable to configure swagger using fiber correctly.

    I'm configuring the swagger handler like this:

    	app.Get("/docs/*", swagger.HandlerDefault)
    

    But when I try to access it from the proxy, which is a URL like this:

    https://proxy-host/some/custom/path/docs
    

    The current implementation redirects me to:

    https://proxy-host/docs/index.html
    

    Instead of

    https://proxy-host/some/custom/path/docs/index.html
    

    The Try it out button also doesn't works because it is trying to send the request to the incorrect path. It should send the request to https://my-proxy-host/custom/path/channels.

    Screenshot with this example: image

    Also, TrustedProxies and EnableTrustedProxyCheck options don't fix this issue. And even it could fix my reverse proxy doesn't have a fixed IP, which would be impossible to configure using the available options. I think you guys should look how Spring Boot manages this and maybe this is even a fiber issue (fixing the c.Redirect func) instead of a gofiber swagger issue: https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto.webserver.use-behind-a-proxy-server

    Thanks.

    🤔 Question 
    opened by lucasoares 5
  • Bump github.com/gofiber/fiber/v2 from 2.32.0 to 2.36.0

    Bump github.com/gofiber/fiber/v2 from 2.32.0 to 2.36.0

    Bumps github.com/gofiber/fiber/v2 from 2.32.0 to 2.36.0.

    Release notes

    Sourced from github.com/gofiber/fiber/v2's releases.

    v2.36.0

    🚀 New

    🐛 Fixes

    • Padding around app name in startup message when containing non-ascii characters (#1987)
    • Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)

    📚 Documentation

    • Translate to Indonesian Awesome List (#1980)

    Thank you @​Maxi-Mega, @​efectn, @​radenrishwan and @​tohutohu for making this update possible.

    v2.35.0

    🚀 New

    🧹 Updates

    • Binds the param string to a struct use params tag (#1968)
    • Client: Remove beta warning (#1951)
    • Bump github.com/valyala/fasthttp from 1.37.0 to 1.38.0 (#1948)
    • Delete a blank line (#1961)
    • Actions for MacOS (#1911)

    🐛 Fixes

    • middleware/logger: TagLatency doesn't have standard format between modes (#1943)
    • middleware/session: fix update cookie. (#1960)

    📚 Documentation

    • Refactor - default error handler & example (#1941)
    • New issue templates (#1945)
    • Translate some lines to turkish (#1954)
    • Update README_fa.md (#1953)
    • Flat-square style for readme badges (#1949)

    Thank you @​efectn, @​hamidreza01, @​ly020044, @​marcelogamba, @​nnnkkk7, @​olongfen and @​taheri24 for making this update possible.

    ... (truncated)

    Commits
    • 1cca495 try to stabilize Test_Test_Timeout
    • 7108b44 prepare release v2.36.0
    • c59370f prepare release v2.36.0
    • e49880c :art: Fix padding around app name in startup message when containing non-asci...
    • 43133be 🔥 Add OnPrefork Hooks so you can get the PID of the child process. (#1974)
    • 4103f94 :sparkles: feature: customizable colors (#1977)
    • ff1e010 Closes #1931 "🤗 How to get path param before a custom verb?" (#1983)
    • ad89ba4 fix README_it.md (#1980)
    • 2a2337d prepare release v2.35.0
    • bad7001 binds the param string to a struct use params tag (#1968)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 1
  • Bump github.com/swaggo/swag from 1.8.1 to 1.8.4

    Bump github.com/swaggo/swag from 1.8.1 to 1.8.4

    Bumps github.com/swaggo/swag from 1.8.1 to 1.8.4.

    Release notes

    Sourced from github.com/swaggo/swag's releases.

    v1.8.4

    Changelog

    bd21bb0 Fix issue swaggo/swag#1150 (#1248) 401e414 doc: add missing web frameworks (#1263) a566490 feat: add default description to code if none is provided (#1239) a780e45 feat: default required option for struct fields (#1181) 213f6b8 feat: permit error (and any) interface definition (#1212) 89c61d4 feat: suppress debug logs when using -q (#1254) 0e2ec6c feat: use early overrides to allow converting unsupported types. (#1209) 1cd0b53 fix: don't skip ".." directory (#1238) 8de9952 fix: generic arrays generate successfully (#1247) 796a346 fix: temp dir to be the same as SerchDir to avoid invalid cross-device link (#1203) (#1241)

    v1.8.3

    Changelog

    f09eaa1 chore: cleanup generics_test.go (#1231) b736c5f chore: increment version (#1230) e767abb chore: refactor parser (#1191) 5f6b402 feat: Improve performance when generating spec with external dependencies (#1108) 3b580a0 feat: add --quiet=true for swag init, make the debug logger quiet. (#1206) ff41d9c feat: add basic generics support (#1225) 3cedab9 fix: README_zh-CN.md translate bug (#1202) 67cb768 fix: array enum varnames in arrays (#1187)

    v1.8.2

    Changelog

    c7cb3fd chore: update @​Produce comments (#1196) 36ae7af chore: remove gomonkey dependency from formatter (#1192) 47d5a76 chore: updating dependencies (#1190) 5f6c5f8 impr: add param example to readme (#1189) 636f456 chore: improve code quality (#1184) 90170b9 chore(deps): bump github.com/swaggo/http-swagger in /example/markdown (#1185) d209f71 added security definition description (#1174)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 1
  • Bump actions/checkout from 2.3.1 to 3.0.2

    Bump actions/checkout from 2.3.1 to 3.0.2

    Bumps actions/checkout from 2.3.1 to 3.0.2.

    Release notes

    Sourced from actions/checkout's releases.

    v3.0.2

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v3...v3.0.2

    v3.0.1

    v3.0.0

    • Updated to the node16 runtime by default
      • This requires a minimum Actions Runner version of v2.285.0 to run, which is by default available in GHES 3.4 or later.

    v2.4.2

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v2...v2.4.2

    v2.4.1

    • Fixed an issue where checkout failed to run in container jobs due to the new git setting safe.directory

    v2.4.0

    • Convert SSH URLs like org-<ORG_ID>@github.com: to https://github.com/ - pr

    v2.3.5

    Update dependencies

    v2.3.4

    v2.3.3

    v2.3.2

    Add Third Party License Information to Dist Files

    Changelog

    Sourced from actions/checkout's changelog.

    v3.0.2

    v3.0.1

    v3.0.0

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    v2 (beta)

    • Improved fetch performance
      • The default behavior now fetches only the SHA being checked-out
    • Script authenticated git commands

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 1
  • Bump reviewdog/action-golangci-lint from 1 to 2

    Bump reviewdog/action-golangci-lint from 1 to 2

    Bumps reviewdog/action-golangci-lint from 1 to 2.

    Release notes

    Sourced from reviewdog/action-golangci-lint's releases.

    Release v2.0.0

    v2.0.0: PR #94 - Migrating from v1 to v2

    Release v1.25.0

    v1.25.0: PR #84 - chore(deps): update reviewdog/reviewdog to 0.13.0

    Release v1.24.0

    v1.24.0: PR #82 - chore(deps): update reviewdog/reviewdog to 0.12.0

    Release v1.23.0

    v1.23.0: PR #80 - chore(deps): update golangci/golangci-lint to 1.41.1

    Release v1.22.0

    v1.22.0: PR #79 - chore(deps): update golangci/golangci-lint to 1.41.0

    Release v1.21.2

    v1.21.2: PR #78 - chore(deps): update golangci/golangci-lint to 1.40.1

    Release v1.21.1

    v1.21.1: PR #77 - fix fail_on_error input

    Release v1.21.0

    v1.21.0: PR #76 - chore(deps): update golangci/golangci-lint to 1.40.0

    Release v1.20.0

    v1.20.0: PR #72 - chore(deps): update golangci/golangci-lint to 1.39.0

    Release v1.19.0

    v1.19.0: PR #71 - chore(deps): update golangci/golangci-lint to 1.38.0

    Release v1.18.1

    v1.18.1: PR #67 - chore(deps): update golangci-lint to 1.37.1

    Release v1.18.0

    v1.18.0: PR #66 - chore(deps): update golangci-lint to 1.37.0

    Release v1.17.0

    v1.17.0: PR #63 - chore(deps): update golangci-lint to 1.36.0

    Release v1.16.1

    v1.16.1: PR #61 - chore(deps): update golangci-lint to 1.35.2

    Release v1.16.0

    v1.16.0: PR #60 - chore(deps): update golangci-lint to 1.35.0

    Release v1.15.0

    v1.15.0: PR #57 - chore(deps): update golangci-lint to 1.34.1

    Release v1.14.1

    v1.14.1: PR #55 - chore(deps): update golangci-lint to 1.32.2

    ... (truncated)

    Commits
    • 0b4fbce npm run package
    • 869e452 Merge pull request #351 from reviewdog/renovate/jest-monorepo
    • 325e990 chore(deps): update jest monorepo to v28.1.2
    • 1cb5c2c Merge pull request #350 from reviewdog/renovate/typescript-eslint-monorepo
    • 2560d53 chore(deps): update dependency @​typescript-eslint/parser to v5.30.0
    • 2defb7f Merge pull request #349 from reviewdog/renovate/actions-cache-3.x
    • f1098e4 fix(deps): update dependency @​actions/cache to v3
    • 11447f3 Merge pull request #348 from reviewdog/renovate/jest-monorepo
    • 6465f7c chore(deps): update dependency @​types/jest to v28.1.3
    • eed00d9 Merge pull request #345 from reviewdog/renovate/typescript-4.x
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 1
  • Bump actions/setup-go from 2 to 3

    Bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    Update actions/cache version to 3.0.0

    In scope of this release we updated actions/cache package as the new version contains fixes for caching error handling

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 1
  • Declarative comments format is out-of-date

    Declarative comments format is out-of-date

    The current link to the declarative comments format documentation seems out-of-date. The new one is here. Could you update the README.md with the new link?

    📒 Documentation 👍 Accepting PR 
    opened by denizetkar 1
  • Swag is not recognized as an internal or external command

    Swag is not recognized as an internal or external command

    My trying to run swag init but I got some command error

    'swag' is not recognized as an internal or external command, operable program or batch file.

    Untitled

    go version 1.18.2 Fiber version 2.33.0

    🤔 Question 
    opened by rngallen 1
  • [Feature request]: accept option to include custom css

    [Feature request]: accept option to include custom css

    I would be neat to be able to set a custom css on top of the existing one, I personally hate the default color theme used by Shagger, and i think mos developers would prefer a dark them for my api's documentations, so i would like to see if that would be possible.

    How?, adding a css string or file descriptor, they would be different fields to differenciate them

    opened by zark0-UwU 1
  • Bump github.com/swaggo/swag from 1.8.5 to 1.8.6

    Bump github.com/swaggo/swag from 1.8.5 to 1.8.6

    Bumps github.com/swaggo/swag from 1.8.5 to 1.8.6.

    Release notes

    Sourced from github.com/swaggo/swag's releases.

    v1.8.6

    Changelog

    bc895ed Fix formatting crosstalk (#1317) c9385a8 build a docker image and push to ghcr.io (#1329) 5fbb18f chore: update version (#1330) cf1c4a7 fix: Generic Fields does not handle Arrays (#1311) b8f53da fix: Generic Fields does not handle Arrays in the .swaggo file (#1322) 2cd7ab5 fix: Generics not detected if name does not contain a pkg path (#1328) 007219f fix: funcDeclaration body check (#1310) e7ccdf4 refactor func splitStructName (#1313)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 0
  • Bump github.com/gofiber/fiber/v2 from 2.37.0 to 2.37.1

    Bump github.com/gofiber/fiber/v2 from 2.37.0 to 2.37.1

    Bumps github.com/gofiber/fiber/v2 from 2.37.0 to 2.37.1.

    Release notes

    Sourced from github.com/gofiber/fiber/v2's releases.

    v2.37.1

    🧹 Updates

    • Bump github.com/valyala/fasthttp from 1.39.0 to 1.40.0 (#2075)
    • Unhandled errors in app_test.go (#2071)
    • Unhandled error in hooks test (#2070)

    🐛 Fixes

    • Constraints when to use multiple params (#2077)
    • Unhandle in strictmode (#2055)
    • EnvVar middleware parses base64 incorrectly (#2069)

    Full Changelog: https://github.com/gofiber/fiber/compare/v2.37.0...v2.37.1

    Thank you @​Kamandlou, @​efectn, @​fufuok and @​wangjq4214 for making this update possible.

    Commits
    • 012a2b1 prepare release v2.37.1
    • 35753f7 :bug: bug: fix constraints when to use multiple params (#2077)
    • bb10225 Update release-drafter.yml
    • 22239f6 Update release-drafter.yml
    • 8dfbd94 Add changelog link to release drafter
    • 3bbeb4e Add changelog link to release drafter
    • e8c93e6 🐛 [Fix]: unhandle in strictmode (#2055)
    • 9fc80fc Bump github.com/valyala/fasthttp from 1.39.0 to 1.40.0 (#2075)
    • c8b1879 fix unhandled errors in app_test.go (#2071)
    • 87faeda 🐛 Fix: EnvVar middleware parses base64 incorrectly (#2069)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    🤖 Dependencies 
    opened by dependabot[bot] 0
  • Ideas for Swagger Middleware

    Ideas for Swagger Middleware

    https://github.com/arsmn/fiber-swagger middleware is great but it doesn't have automatic adding feature. Also it will be optional.

    I think it can be added like this with hooks:

    type UserBody struct{
        Email string `json:"email" swagger:"email,required"`
        Password string `json:"password" swagger:"required"`
    }
    
    
    func main() {
        app := fiber.New()
        swg := swagger.New(app, swagger.Config{})
    
        swg.Add("index", swagger.Schema{
            Description: "home page",
            Tags: string["home","index"],
            Summary: "qwerty",
            Body: UserBody,
        })
    
        app.Get("/", func(c *fiber.Ctx) error {
            var user UserBody
            if err := c.BodyParser(&user); err != nil{
                return err
            }
    
            return c.JSON("👋")
        }).Name("index")
    }
    

    cc @balcieren

    ✏️ Feature good first issue 
    opened by efectn 0
Releases(v0.1.2)
  • v0.1.2(Sep 9, 2022)

    🧹 Updates

    • Bump github.com/gofiber/fiber/v2 from 2.37.0 to 2.37.1 (#16)

    Full Changelog: https://github.com/gofiber/swagger/compare/v0.1.1...v0.1.2

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Aug 31, 2022)

  • v0.1.0(Aug 3, 2022)

    🚀 New

    • Add proxy redirect support (#4)

    🧹 Updates

    • Bump github.com/gofiber/fiber/v2 from 2.32.0 to 2.36.0 (#13)
    • Bump actions/setup-go from 2 to 3 (#9)
    • Bump actions/checkout from 2.3.1 to 3.0.2 (#11)
    • Bump github.com/swaggo/swag from 1.8.1 to 1.8.4 (#12)
    • Bump reviewdog/action-golangci-lint from 1 to 2 (#10)

    📚 Documentation

    • Update install command to go1.18 (#7)
    Source code(tar.gz)
    Source code(zip)
  • v0.0.1(Apr 24, 2022)

Owner
Fiber
🚀 Fiber is an Express inspired web framework written in Go with 💖
Fiber
Documentation side of the spaghetti cutter.

spaghetti-analyzer - Win The Fight Against Spaghetti Code Overview spaghetti-analyzer is a command line tool for CI/CD pipelines (and dev machines) th

FlowDev 2 Sep 14, 2022
Gopi - Simple API for get geo information about your IP Address, Build by go-fiber

gopi Simple API to get information from your IP Address Idea This idea come from IP zxq and literaly i clone it How to download GeoIP2 ? Remember to c

I Made Ocy Darma Putra 3 May 27, 2022
The Akita CLI for watching network traffic, automatically generating API specs, and diffing API specs.

Catch breaking changes faster Akita builds models of your APIs to help you: Catch breaking changes on every pull request, including added/removed endp

Akita Software 190 Sep 15, 2022
HTTP API traffic recording and replay middleware based on GoReplay, can be used for migration and refactoring testing

gorc HTTP API traffic recording and replay middleware based on GoReplay, can be used for migration and refactoring testing. English | 中文 Requirements

Jioby 2 Feb 13, 2022
HTTP proxy written in Go. COW can automatically identify blocked sites and use parent proxies to access.

COW (Climb Over the Wall) proxy COW 是一个简化穿墙的 HTTP 代理服务器。它能自动检测被墙网站,仅对这些网站使用二级代理。 English README. 当前版本:0.9.8 CHANGELOG 欢迎在 develop branch 进行开发并发送 pull

Chen Yufei 8.3k Sep 21, 2022
Automatically spawn a reverse shell fully interactive for Linux or Windows victim

Girsh (Golang Interactive Reverse SHell) Who didn't get bored of manually typing the few lines to upgrade a reverse shell to a full interactive revers

null 278 Sep 10, 2022
Automatically compress podcasts to tiny file sizes for bandwidth constrained devices like cellular.

tinycast Automatically compress podcasts to tiny file sizes for bandwidth constrained connections like cellular or satellite.

Stephen Holiday 4 Sep 18, 2022
dynflare is a tool to automatically update dns records at Cloudflare, when the ip changes.

dynflare dynflare is a tool to automatically update dns records at Cloudflare, when the ip changes. How it works The current ips are determined by ask

Lukas Dietrich 0 Dec 7, 2021
Automatically register a list of domain names, add them to Cloudflare and set DNS records.

NameCannon Automatically register a list of domain names, add them as zones on Cloudflare, then add DNS records. Usage $ ./NameCannon --namesiloSecret

Kevin Roleke 1 Jan 26, 2022
Attach services to specified networks automatically

Docker swarm network attacher Description docker-swarm-network-attacher aims to solve the problem of sharing a network between unrelated services. Wit

Bruno Cascio 1 Nov 11, 2021
Automatically update your Windows hosts file with the WSL2 VM IP address

Automatically update your Windows hosts file with the WSL2 VM IP address

null 1.3k Sep 23, 2022
AutoTrackIR will automatically re-enabled your Track IR if flight simulator disabled it. (bug introduce in SU7)

AutoTrackIR AutoTrackIR will automatically re-enable your Track IR if flight simulator disabled it. (bug introduce in SU7) How it works ? It just watc

Stéphane Depierrepont 6 May 8, 2022
🤖 Automatically scrape PortableApps.com (or official release page) and convert into Edgeless plugin package

Edgeless 自动插件机器人 2 简介 该项目是为了使用 Golang 重新实现 Edgeless 自动插件机器人 特性 (WIP) 完全兼容 Edgeless 自动插件机器人,包括 Tasks,以实现无缝迁移 更快的构建速度 更好的代码结构 更高的拓展性 工作进度 截止至 2021/11/28

Hydrogen 2 Sep 12, 2022
The seed repository for your Flamego middleware modules

seed This repository contains seed files that almost every repository of Flamego middleware module should have. Using the content Create an empty repo

Flamego 1 Dec 11, 2021
Mev-boost: A middleware server written in Go

mev-boost A middleware server written in Go, that sits between an ethereum PoS consensus client and an execution client. It allows consensus clients t

Flashbots 455 Sep 14, 2022
Header Block is a middleware plugin for Traefik to block request and response headers which regex matched by their name and/or value

Header Block is a middleware plugin for Traefik to block request and response headers which regex matched by their name and/or value Conf

null 3 May 24, 2022
Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values.

Log4Shell Mitigation Log4Shell is a middleware plugin for Traefik which blocks JNDI attacks based on HTTP header values. Related to the Log4J CVE: htt

Traefik Labs 33 Jul 26, 2022
Middleware for Blocking IP ranges by inserting CIDR Blocks and searching IPs through those blocks

firewall Middleware for Blocking IP ranges by inserting CIDR Blocks and searching IPs through those blocks. Features Easy to use Efficient and Fast Co

Golang libraries for everyone 5 May 20, 2022