Skip to content

Commit

Permalink
expose openapi spec througn an endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
AmineAfia committed Oct 3, 2024
1 parent 61d5b68 commit db096ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func RunApi(cmd *cobra.Command, args []string) {

// Add Swagger route
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
// Add Swagger JSON endpoint
r.GET("/json", func(c *gin.Context) {
c.File("./docs/swagger.json")
})

root := r.Group("/:chainId")
{
Expand Down

0 comments on commit db096ba

Please sign in to comment.