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

Feature/implement response headers v2 #1841

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update protoc-gen-swagger/genswagger/template.go
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
  • Loading branch information
elijah-roberts and johanbrandhorst authored Oct 22, 2020
commit 89d01c9bd6d1a1191af623edcfb8058b93bd2e79
2 changes: 1 addition & 1 deletion protoc-gen-swagger/genswagger/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ func validateDefaultValueTypeAndFormat(headerType string, defaultValue string, f
}

func isQuotedString(s string) bool {
return len(s) >= 2 && string(s[0]) == `"` && string(s[len(s)-1]) == `"`
return len(s) >= 2 && s[0] == '"' && s[len(s)-1] == '"'
}

func isJSONNumber(s string, t string) error {
Expand Down