Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Dec 24, 2024
1 parent 1c8071b commit a532bad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ to develop APIs and web applications.
- **Rendering**: Fuego provides a simple and fast rendering system based on
`html/template` - you can still also use your own template system like
`templ` or `gomponents`
- **Adaptors**: [Experimental] Fuego can be used with Gin.

## Examples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"label": "🚀 Guides",
"position": 3,
"label": "Alternative Routers Support",
"link": {
"type": "generated-index"
}
Expand Down
6 changes: 3 additions & 3 deletions documentation/docs/guides/alternative-routers-support/gin.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Using Fuego with Gin
# Gin

Fuego can be used with Gin by using the `fuegogin` adaptor.

Instead of using the **Server** (`fuego.NewServer()`), you will use the **Engine** (`fuego.NewEngine()`) along with your router.
Instead of using the **Server** `fuego.NewServer()`, you will use the **Engine** `fuego.NewEngine()` along with your router.

The usage is similar to the default server, but you will need to declare the routes with `fuegogin.Get`, `fuegogin.Post`... instead of `fuego.Get`, `fuego.Post`...

## Migrate incrementally

1. Spawn an engine with `fuego.NewEngine()`.
2. Use `fuegogin.GetGin` instead of `gin.GET` to wrap the routes with OpenAPI declaration of the route, **without even touching the existing controllers**!!!
2. Use `fuegogin.GetGin` instead of `gin.GET` to wrap the routes with OpenAPI declaration of the route, **without even touching the existing controllers**.
3. Replace the controllers **one by one** with Fuego controllers. You'll get complete OpenAPI documentation, validation, Content-Negotiation for each controller you replace!
4. Enjoy the benefits of Fuego with your existing Gin application!

Expand Down

0 comments on commit a532bad

Please sign in to comment.