I have an existing project that needs a UI for the API. I want to use go 
swagger but I am completely confused

I want to set it up so I add annotations in the code and then run the 
command swagger generate spec and it would generate the spec

However whenever I run it, it prints 

My project structure is as follows


In main.go I have this annotation

//go:generate swagger generate spec 
package main

In router above one of my handlers I have this annotation

// swagger:route GET /profile
// Gets profile of user
//     Produces:
//     - application/json
//     - application/x-protobuf
//     Schemes: http, https, ws, wss
//     Security:
//       api_key:
//       oauth: read, write
//     Responses:
//       default: genericError
//       200: someResponse
//       422: validationError
r.GET("/profile", profileHandler

I've been stuck trying to set up an api generator for a while. Any help is 
much appreciated. If you have experience setting it up, please let me know 
how you did it

You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to