Skip to content

Commit

Permalink
Merge pull request #546 from tdakkota/fix/call-validator
Browse files Browse the repository at this point in the history
fix(gen): call validator for path and header parameters
  • Loading branch information
ernado authored Aug 29, 2022
2 parents db55918 + eb99b5c commit 5d0f5cb
Show file tree
Hide file tree
Showing 21 changed files with 2,294 additions and 1,820 deletions.
16 changes: 11 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,27 @@ issues:
linters: [ goconst, funlen, gocognit, gocyclo ]

# TODO(tdakkota): add comments?
- path: (conv|uri|gen)
- path: (conv|uri|gen|otelogen)
linters: [ revive, golint ]
text: "should have comment.+or be unexported"
text: "(should have comment.+or be unexported|comment on exported)"

# We don't need package comments for internal packages.
# We don't need comments for command packages.
- path: (cmd|tools)(\/|\\).+(\/|\\).+\.go
- path: .*(cmd|tools|internal)(\/|\\).*
linters: [ revive, golint ]
text: "should have comment.+or be unexported"
text: "should have (comment.+or be unexported|a package comment)"

# Intended in commands:
# G307: Deferring unsafe method "Close" on type "*os.File"
# G304: Potential file inclusion via variable
- path: (cmd|tools)(\/|\\).+(\/|\\).+\.go
- path: .*(cmd|tools)(\/|\\).+(\/|\\).+\.go
text: G(304|306|307)

# Nobody cares.
# G114: Use of net/http serve function that has no support for setting timeouts
- path: techempower(\/|\\)main.go
text: G114

# We are using quoting algorithm from mime/multipart package. False-positive.
- path: http(\/|\\)file\.go
linters: [ gocritic ]
Expand Down
2 changes: 2 additions & 0 deletions conv/conv.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package conv contains helper functions for converting between various data types.
package conv
84 changes: 76 additions & 8 deletions examples/ex_2ch/oas_parameters_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions examples/ex_ent/oas_parameters_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/ex_firecracker/oas_parameters_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5d0f5cb

Please sign in to comment.