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

Comma-separated failure codes reusing the description #855

Closed
josephzidell opened this issue Dec 8, 2020 · 0 comments · Fixed by #854
Closed

Comma-separated failure codes reusing the description #855

josephzidell opened this issue Dec 8, 2020 · 0 comments · Fixed by #854

Comments

@josephzidell
Copy link
Contributor

Describe the bug
Comma-separated failure codes reusing the description

To Reproduce
Steps to reproduce the behavior:

// @Failure 400,404 {object} response.Response

generates

"400": {
	"description": "Bad Request",
	"schema": {
		"$ref": "#/definitions/response.Response"
	}
},
"404": {
	"description": "Bad Request", // <-- 1.7.0 generates incorrect status description
	"schema": {
		"$ref": "#/definitions/response.Response"
	}
}

Expected behavior

"400": {
	"description": "Bad Request",
	"schema": {
		"$ref": "#/definitions/response.Response"
	}
},
"404": {
	"description": "Not Found", // <-- in 1.6.9, when they were on separate lines, generated correct status description
	"schema": {
		"$ref": "#/definitions/response.Response"
	}
}

Screenshots
If applicable, add screenshots to help explain your problem.

Your swag version
e.g. 1.7.0

Your go version
e.g. 1.15.5

Desktop (please complete the following information):

  • OS: Mac
  • Browser: Firefox
  • Version: latest

Additional context
Add any other context about the problem here.

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

Successfully merging a pull request may close this issue.

1 participant