Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm not getting any output #19

Open
EwanValentine opened this issue Feb 27, 2016 · 4 comments
Open

I'm not getting any output #19

EwanValentine opened this issue Feb 27, 2016 · 4 comments
Assignees

Comments

@EwanValentine
Copy link

I've initialised the library...

yaag.Init(&yaag.Config{
        On:       true,
        DocTitle: "Gin",
        DocPath:  "apidoc.html",
        BaseUrls: map[string]string{"Production": "http://api.test.com", "Staging": "http://devapi.test.com"},
    })

But I'm not getting any output, no apidoc.html file's being recreated etc

Am I missing something?

Cheers!

@EwanValentine
Copy link
Author

Is this project still maintained?

@aniketawati
Copy link
Member

@EwanValentine Have you checked the gin example?

yaag.Init(&yaag.Config{On: true, DocTitle: "Gin", DocPath: "apidoc.html", BaseUrls: map[string]string{"Production": "", "Staging": ""}})
        r := gin.Default()
        r.Use(yaag_gin.Document())
        r.GET("/json", func(c *gin.Context) {
                c.JSON(http.StatusOK, gin.H{"result": "Hello World!"})
        })
        r.GET("/plain", func(c *gin.Context) {
                c.String(http.StatusOK, "Hello World!")
        })
        r.GET("/xml", func(c *gin.Context) {
                c.XML(http.StatusOK, gin.H{"result": "Hello World!"})
        })
        r.GET("/complex", func(c *gin.Context) {
                value := c.Query("key")
                c.JSON(http.StatusOK, gin.H{"value": value})
        })
        r.Run(":8000")

Please check if you are calling r.Use(yaag_gin.Document()) while initializing gin.
If it still not working, please post a code block showing how you are initializing gin with yaag.

@tonyalaribe
Copy link

I'm having this same issue, on chi router. It doesnt seem to work on my mac, but works on windows

@gaoqc
Copy link

gaoqc commented Mar 6, 2018

I'm having this same issue, chrome console appears bug like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants