{"repo":"yokeTH/gofiber-scalar","free":true,"listed":false,"github":"https://github.com/yokeTH/gofiber-scalar","clone":"git clone https://github.com/yokeTH/gofiber-scalar.git","description":"scalar alternative to swagger for gofiber","language":"Go","stars":30,"topics":["gofiber","golang","openapi","scalar","swagger"],"license":"BSD-3-Clause","category":"api-integrations-sdks","readme_excerpt":"Gofiber Scalar Scalar middleware for Fiber. The middleware handles Scalar UI. Note: Requires Go 1.25.0 and above Table of Contents - Signatures - Installation - Examples - Config - Default Config - Constants Signatures Installation Scalar is tested on the latest Go versions with support for modules. So make sure to initialize one first if you didn't do that yet: And then install the Scalar middleware: [!NOTE] If you using fiber v2 use must using go get -u github.com/yokeTH/gofiber-scalar/scalar/v2 Examples Using swaggo to generate documents default output path is (root)/docs : Import the middleware package and generated docs After Imported: For v2 and v3, you do not need to register Swag docs manually. Using the default config: Now you can access scalar API documentation UI at {HOSTNAME}/docs and JSON documentation at {HOSTNAME}/docs/doc.json . Additionally, you can modify the path by configuring the middleware to suit your application's requirements. Using as the handler: for an example localhost:8080/yourpath Use program data for Swagger content: Use scalar prepared theme Path based reverse proxy Assuming /api is your reverse path, the configuration will use the following order to determine the path: 1. X-Forwarded-Prefix 2. X-Forwarded-Path 3. BasePath (fallback if the headers are not set) If you cannot configure the headers, you can use BasePath as a fallback. Note that this may break in a localhost environment. Example implementation: Config Default Config Constants Them","default_branch":null,"files":null,"tree":[],"storefront":"/r/yokeTH","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yokeTH/gofiber-scalar/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}