Skip to content

Commit

Permalink
Merge branch 'main' into vmyroslav-org-vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
vmyroslav authored Jan 26, 2025
2 parents 60b219e + 5e19aa6 commit fcd6c82
Show file tree
Hide file tree
Showing 14 changed files with 284 additions and 223 deletions.
12 changes: 6 additions & 6 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.22.8
version: 1.22.9
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
Expand All @@ -18,16 +18,16 @@ runtimes:
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected].5
- [email protected].346
- [email protected].6
- [email protected].353
- git-diff-check
- [email protected]
- golangci-lint@1.62.2
- golangci-lint@1.63.4
- [email protected]
- [email protected]
- [email protected]
- [email protected].1
- [email protected].0
- [email protected].2
- [email protected].2
- [email protected]
actions:
enabled:
Expand Down
4 changes: 3 additions & 1 deletion generator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,9 @@ func fmtStruct(s *Schema) *jen.Statement {

// Adds json tags
tag := jsonName
if !p.required {
if !(p.required || p.Nullable) {
// There are optional nullable fields.
// Which become required in Go.
tag += ",omitempty"
}

Expand Down
1 change: 1 addition & 0 deletions generator/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ type Schema struct {
Ref string `json:"$ref"`
Description string `json:"description"`
CamelName string `json:"for-hash-only!"`
Nullable bool `json:"nullable"`
required bool
name string
propertyNames []string
Expand Down
116 changes: 60 additions & 56 deletions handler/account/account.go

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

58 changes: 30 additions & 28 deletions handler/accountteam/accountteam.go

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

Loading

0 comments on commit fcd6c82

Please sign in to comment.