-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
I'm thinking of using echo for a large project and one of the requirements will be extensive documentation, it would be nice to automatically keep the code and docs in sync with something like:
e := echo.New()
...
//with cli flag, or even via another REST endpoint
if generate {
//json.MarshalIndent internal echo structures (fn name, methods, urls, params, middleware, etc.)
b := e.GenerateSpec()
//display
os.Stdout.Write(b)
//or, send to documentation server
http.Post("...", "application/json", &bytes.NewBuffer(b))
}
Then the user could convert the structures into:
- a https://apiary.io/ API blueprint
- a http://swagger.io/ spec
- a https://github.com/mashery/iodocs spec
Thoughts?