Skip to content

Commit

Permalink
fix: arrays are no longer omitted if empty (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk authored May 20, 2024
1 parent 52b1485 commit 7127eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/codegen/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func generateFieldFromSchema(name string, schema *schemas.JSONSchema, required *

if useTags {
tags := map[string]string{}
if strings.HasPrefix(typeStr, "*") || strings.HasPrefix(typeStr, "[]") {
if strings.HasPrefix(typeStr, "*") {
tags["json"] = name + ",omitempty"
} else {
tags["json"] = name
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package types

// Version is the current version of the package
const Version = "0.2.0"
const Version = "0.2.1"

0 comments on commit 7127eb7

Please sign in to comment.