We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug After upgrade v1.6.8, external package struct can't be resolved correctly, and product error.
To Reproduce Here is an sample code
// IssueApiKey godoc // @Summary Issue an API Key // @Description Issue an API Key to user, this endpoint requires privileges // @Tags ApiKey // @Accept json // @Produce json // @param input body IssueApiKeyPayload true "Input info" // @Param apiKey query string true "API Key(Privileged)" // @Security ApiKeyAuth // @Success 200 {object} IssueApiKeyResponse // @Failure 400 {object} problems.DefaultProblem // @Router /apiKey [post] func (c *Controller) IssueApiKey(ctx *gin.Context) { input := &IssueApiKeyPayload{} err := ctx.BindJSON(input) if err != nil { err400 := problems.NewDetailedProblem(http.StatusBadRequest, err.Error()) ctx.JSON(400, err400) return } key, err := c.ApiKeyService.IssueApiKey(input.Application, input.UseInHeader, input.UseInQueryParam, "auto", false) if err != nil { err500 := problems.NewDetailedProblem(http.StatusInternalServerError, err.Error()) ctx.JSON(500, err500) return } ctx.JSON(http.StatusOK, IssueApiKeyResponse{ Key: key, }) }
in v1.6.7, it works fine. In v1.6.8, it products error
2020/10/16 15:19:43 Generate swagger docs.... 2020/10/16 15:19:43 Generate general API Info, search dir:./ 2020/10/16 15:19:44 Generating main.IssueApiKeyPayload 2020/10/16 15:19:44 Generating main.IssueApiKeyResponse 2020/10/16 15:19:44 ParseComment error in file apikey_controller.go :cannot find type definition: problems.DefaultProblem server_main.go:26: running "/Users/killercat/go/bin/swag": exit status 1
problems.DefaultProblem is defined in external library, for this case, it's https://github.com/mschneider82/problem
Expected behavior It should able to generate swagger.json in this case in v1.6.7. It's broken in v1.6.8
Screenshots
Your swag version e.g. 1.6.8
Your go version e.g. 1.15.1
Desktop (please complete the following information):
Additional context None
The text was updated successfully, but these errors were encountered:
Properly duplicated with #802
Sorry, something went wrong.
It seems author have explained in #808, close this ticket.
No branches or pull requests
Describe the bug
After upgrade v1.6.8, external package struct can't be resolved correctly, and product error.
To Reproduce
Here is an sample code
in v1.6.7, it works fine. In v1.6.8, it products error
problems.DefaultProblem is defined in external library, for this case, it's https://github.com/mschneider82/problem
Expected behavior
It should able to generate swagger.json in this case in v1.6.7. It's broken in v1.6.8
Screenshots
Your swag version
e.g. 1.6.8
Your go version
e.g. 1.15.1
Desktop (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: