Releases: omissis/go-jsonschema
v0.22.0
What's Changed
This release brings in a number of features and fixes, including:
- ability to add extra field tags
- support for const type validation
- usage of utf8 counts instead of byte ones for strings
- addition of arrays without item type
- generation of nullable datetime
- and more!
Full list of feature and fixes:
- feat: add support for extra field tags to generator by @utkuozdemir in #504
- Support for const type validation by @perher in #482
- bugfix: remove restriction on additionalProperties types by @codeboten in #491
- fix: handle arrays without item type by returning []interface{} by @blacksails in #515
- use UTF-8 rune count instead of raw byte count for string length validation by @dschmett-cs in #516
- fix: Generation of nullable date time by @blacksails in #513
Dependencies updates:
- chore: update go to version 1.24.12 by @omissis in #508
- chore(deps): update dependency yq to v4.52.2 by @renovate[bot] in #517
New Contributors
- @utkuozdemir made their first contribution in #504
- @blacksails made their first contribution in #515
- @dschmett-cs made their first contribution in #516
Full Changelog: v0.21.0...v0.22.0
v0.21.0
What's Changed
This release introduces a set of important fixes and improvements to subschemas, including:
- adding support for nested ref types
- adding support for properties on allOf/anyOf types
- adding support for subschemas using external refs
- adding support for subschemas when types are across different go packages
- improving required properties in anyOf
Full list of feature and fixes:
- fix: make disabling of map types generation optional, defaulting to pre-v0.19.0's behavior as default by @omissis in #450
- feat: extend 'struct-name-from-title' range of action to title fields in all sub-objects, not just the root one by @omissis in #451
- fix: update anyof codegen as previous impl created wrong code. by @omissis in #479
- chore: get rid of pkg/errors package by @i-sevostyanov in #460
- fix: support for nested ref types by @perher in #458
- pkg/generator: use the qualified ref filename so it can be found by @mgabeler-lee-6rs in #375
- Subschema improvements (part 1) by @perher in #480
- Subschema improvements (part 2) by @perher in #481
Dependencies updates:
- chore(deps): update actions/checkout digest to 08eba0b by @renovate[bot] in #468
- chore(deps): update actions/setup-go action to v6 by @renovate[bot] in #476
- chore(deps): update actions/checkout action to v5 by @renovate[bot] in #469
- fix(deps): update module github.com/stretchr/testify to v1.11.1 by @renovate[bot] in #470
- fix(deps): update module github.com/spf13/cobra to v1.10.2 by @renovate[bot] in #502
- chore(deps): update dependency yq to v4.48.2 by @renovate[bot] in #493
- chore(deps): update actions/checkout digest to 93cb6ef by @renovate[bot] in #494
- chore(deps): update dependency markdownlint-cli2 to v0.20.0 by @renovate[bot] in #492
- chore(deps): update dependency yq to v4.50.1 by @renovate[bot] in #497
- chore(deps): update dependency yamllint to v1.38.0 by @renovate[bot] in #503
- chore(deps): update actions/checkout action to v6 by @renovate[bot] in #496
- chore: update goccy/go-yaml to v1.9.2 by @omissis in #506
- chore: update golangci-lint v2.8.0 by @omissis in #507
- chore(deps): update dependency markdownlint-cli2 to v0.18.1 by @renovate[bot] in #447
New Contributors
- @i-sevostyanov made their first contribution in #460
- @perher made their first contribution in #458
- @mgabeler-lee-6rs made their first contribution in #375
Full Changelog: v0.20.0...v0.21.0
v0.20.0
What's Changed
A load of new features and fixes, among which: support for duration string format, better naming for generated go structs, and support for read only properties.
- feat(tests): let tests overwrite the expected Go file. by @ptodev in #424
- feat: add partial support for "readOnly" properties. by @arikkfir in #362
- feat: use schema that doesn't come from a file by @ptodev in #284
- feat: add a "duration" string format by @ptodev in #257
- feat: allow users to ask for minimal names by @stevekuznetsov in #324
- fix: add imports for additionalproperties even if default is nil by @clinta in #340
- chore: update golangci lint to v2 by @omissis in #446
- fix(deps): update module dario.cat/mergo to v1.0.2 by @renovate in #443
- fix(deps): update golang.org/x/exp digest to ce4c2cf by @renovate in #445
- chore(deps): update dependency markdownlint-cli2 to v0.18.0 by @renovate in #444
New Contributors
Full Changelog: v0.19.0...v0.20.0
v0.19.0
What's Changed
A bugfixes releases mostly, containing several improvements to faulty behaviors as well as some quality of life improvements:
- feat: make required+nullable obj props to generate a pointer to a struct type, instead of a struct type by @omissis in #438
- feat: add support for time zone offsets in json format "time" fields by @deep-creek in #406
- feat: add a toggle to disable "omitempty" by @ptodev in #282
- fix: multipleOf validation fails for small multipleOf with a higher number to validate due to precision by @deep-creek in #401
- fix: unescape escaped regex control characters + add testcase for #378 by @RobQuistNL in #380
- fix: use default output when no schema output is defined by @acouvreur in #404
- fix: correct errEmptyInAnyOf typo by @guildencrantz in #435
- chore: generate maps without declaring a custom type by @ptodev in #281
- chore: implement unit tests for x/text/cases by @jtomasevic-godaddy in #402
- chore: add codecov config file by @omissis in #439
As well as it includes a number of dependency updates:
- chore: update go and go releaser versions by @omissis in #437
- fix(deps): update module github.com/goccy/go-yaml to v1.16.0 by @renovate in #418
- fix(deps): update module github.com/google/go-cmp to v0.7.0 by @renovate in #423
- fix(deps): update golang.org/x/exp digest to 7e4ce0a by @renovate in #432
- fix(deps): update module github.com/goccy/go-yaml to v1.17.1 by @renovate in #428
- chore(deps): update dependency yamllint to v1.37.0 by @renovate in #425
- chore(deps): update dependency yamllint to v1.37.1 by @renovate in #436
New Contributors
- @guildencrantz made their first contribution in #435
- @deep-creek made their first contribution in #406
- @acouvreur made their first contribution in #404
- @jtomasevic-godaddy made their first contribution in #402
- @ptodev made their first contribution in #282
Full Changelog: v0.18.0...v0.19.0
v0.18.0
What's Changed
This release introduces several new improvements, among which one that's been awaited for a very long type, ie: the support for anyOf and allOf subschema types.
Among the new features, this release ships:
- feat: add support for subschemas by @omissis in #99
- feat: enable wildcard enum by @aristosvo in #285
- feat: support validation regex literals by @stevekuznetsov in #295
- fix: make sure the field and matching pattern are ordered correctly by @aristosvo in #315
As well as it includes a number of dependency updates:
- feat: update goreleaser to v2.8.1. by @omissis
- fix(deps): update module dario.cat/mergo to v1.0.1 by @renovate
- fix(deps): update module github.com/goccy/go-yaml to v1.15.9 by @renovate
- fix(deps): update module github.com/sanity-io/litter to v1.5.8 by @renovate
- fix(deps): update module github.com/spf13/cobra to v1.9.1 by @renovate
- fix(deps): update module github.com/stretchr/testify to v1.10.0 by @renovate
- fix(deps): update golang.org/x/exp
- chore(deps): update golang docker tag to v1.23.7
- chore(deps): update dependency golang to v1.23.7
- chore(deps): update dependency golangci-lint to v1.64.8 by @renovate
- chore(deps): update dependency markdownlint-cli2 to v0.17.2 by @renovate
- chore(deps): update dependency shfmt to v3.11.0 by @renovate
- chore(deps): update dependency yamllint to v1.36.2 by @renovate
- chore(deps): update codecov/codecov-action action to v5 by @renovate
New Contributors
- @aristosvo made their first contribution in #285
- @stevekuznetsov made their first contribution in #295
Full Changelog: v0.17.0...v0.18.0
v0.17.0
Highlights
- Implement pattern validation for strings
- Implement numeric validation
- Introduce unmarshalling for additional properties
- Update go to 1.22.8 in ci and dev
- Allow CustomNameTypes to specify nillability
What's Changed
- chore(deps): update actions/checkout digest to 1d96c77 by @renovate in #219
- chore(deps): update actions/checkout digest to 0ad4b8f by @renovate in #221
- Allow
CustomNameTypes to specify nillability by @andrew-farries in #220 - chore(deps): update dependency golangci-lint to v1.58.0 by @renovate in #222
- fix(deps): update module golang.org/x/exp to v0.0.0-20240506185415-9bf2ced13842 by @renovate in #223
- chore(deps): update golang docker tag to v1.22.3 by @renovate in #224
- chore(deps): update actions/checkout digest to 44c2b7a by @renovate in #225
- chore(deps): update dependency golangci-lint to v1.58.1 by @renovate in #226
- chore(deps): update actions/checkout digest to 0ad4b8f by @renovate in #227
- chore(deps): update dependency golangci-lint to v1.58.2 by @renovate in #228
- chore(deps): update actions/checkout digest to a5ac7e5 by @renovate in #229
- fix(deps): update golang.org/x/exp digest to 4c93da0 by @renovate in #230
- chore(deps): update dependency golangci-lint to v1.59.0 by @renovate in #232
- fix(deps): update golang.org/x/exp digest to 23cca88 by @renovate in #233
- fix(deps): update golang.org/x/exp digest to 404ba88 by @renovate in #234
- fix(deps): update golang.org/x/exp digest to fd00a4e by @renovate in #235
- fix(deps): update golang.org/x/exp digest to fc45aab by @renovate in #236
- chore(deps): update dependency golang to v1.22.4 by @renovate in #237
- docs: correct
goversion requirement by @jamietanna in #240 - chore(deps): update goreleaser/goreleaser-action action to v6 by @renovate in #238
- chore(deps): update dependency golangci-lint to v1.59.1 by @renovate in #245
- chore(deps): update actions/checkout digest to 692973e by @renovate in #247
- fix(deps): update golang.org/x/exp digest to 7f521ea by @renovate in #248
- fix(deps): update module github.com/spf13/cobra to v1.8.1 by @renovate in #249
- fix(deps): update golang.org/x/exp digest to 46b0784 by @renovate in #252
- chore(deps): update dependency golang to v1.22.5 by @renovate in #253
- fix(deps): update module github.com/goccy/go-yaml to v1.12.0 by @renovate in #254
- fix(deps): update golang.org/x/exp digest to e3f2596 by @renovate in #255
- fix(deps): update golang.org/x/exp digest to 8a7402a by @renovate in #256
- chore(deps): update dependency golang to v1.22.6 by @renovate in #258
- fix(deps): update golang.org/x/exp digest to 0cdaa3a by @renovate in #260
- chore(deps): update dependency golang to v1.23.0 by @renovate in #261
- chore(deps): update dependency golangci-lint to v1.60.0 by @renovate in #262
- chore(deps): update dependency golangci-lint to v1.60.1 by @renovate in #263
- chore(deps): update dependency shfmt to v3.9.0 by @renovate in #265
- chore(deps): update dependency golangci-lint to v1.60.2 by @renovate in #266
- fix(deps): update golang.org/x/exp digest to 778ce7b by @renovate in #267
- fix(deps): update golang.org/x/exp digest to 9b4947d by @renovate in #268
- chore(deps): update dependency golangci-lint to v1.60.3 by @renovate in #269
- fix(deps): update golang.org/x/exp digest to e7e105d by @renovate in #270
- chore(deps): update dependency golang to v1.23.1 by @renovate in #271
- chore(deps): update dependency golangci-lint to v1.61.0 by @renovate in #273
- chore: update deps 20240914 by @omissis in #274
- Add pattern, support reference constraints on primitives, and add number/integer constraints by @nolag in #264
- fix(deps): update module github.com/stretchr/testify to v1 by @renovate in #277
- chore(deps): update dependency go to v1.23.2 by @renovate in #286
- chore(deps): update dependency golang to v1.23.2 by @renovate in #287
- fix(deps): update golang.org/x/exp digest to 225e2ab by @renovate in #289
- chore(deps): update actions/checkout digest to eef6144 by @renovate in #290
- fix(deps): update golang.org/x/exp digest to f66d83c by @renovate in #292
- chore(deps): update dependency shfmt to v3.10.0 by @renovate in #294
- chore(deps): update actions/checkout digest to 11bd719 by @renovate in #298
- Additional Properties do not get unmarshalled by @omissis in #278
- update go to 1.22.8 by @omissis in #299
New Contributors
- @andrew-farries made their first contribution in #220
- @jamietanna made their first contribution in #240
- @nolag made their first contribution in #264
Full Changelog: v0.16.0...v0.17.0
v0.16.0
This release introduces several new improvements:
- Improve support for non-case-sensitive languages
- Make generated go more stable, and solve annoying big diffs
- Fix generated code for non-nullable types with two options
- Removes nil check for
requiredproperties - Add support for additionalProperties when other fields exist
What's Changed
- Enhance splitIdentifierByCaseAndSeparators to support non-case-sensitive languages by @zrma in #170
- Stable output: Add some more names to anonymous Method classes by @RobQuistNL in #169
- Fix non-nullable type with two options by @jagregory in #205
- Removes nil check for
requiredproperties by @Henkoglobin in #215 - Add support for additionalProperties when other fields exist by @codeboten and @omissis in #218
- Update go and all deps by @omissis in #217
- Several @renovate PRs
- fix(deps): update golang.org/x/exp digest to 1b97071 by @renovate in #190
- fix(deps): update module github.com/goccy/go-yaml to v1.11.3 by @renovate in #191
- fix(deps): update golang.org/x/exp digest to 2c58cdc by @renovate in #193
- chore(deps): update golang docker tag to v1.22.0 by @renovate in #195
- chore(deps): update dependency golangci-lint to v1.56.0 by @renovate in #196
- chore(deps): update dependency golangci-lint to v1.56.1 by @renovate in #197
- chore(deps): update dependency shfmt to v3.8.0 by @renovate in #198
- fix(deps): update golang.org/x/exp digest to ec58324 by @renovate in #199
- chore(deps): update dependency golangci-lint to v1.56.2 by @renovate in #200
- fix(deps): update golang.org/x/exp digest to 814bf88 by @renovate in #201
- chore(deps): update golang docker tag to v1.22.1 by @renovate in #202
- chore(deps): update dependency shellcheck to v0.10.0 by @renovate in #203
- chore(deps): update codecov/codecov-action action to v4 by @renovate in #192
- fix(deps): update golang.org/x/exp digest to c7f7c64 by @renovate in #206
- fix(deps): update golang.org/x/exp digest to a85f2c6 by @renovate in #207
- chore(deps): update dependency golangci-lint to v1.57.0 by @renovate in #208
- chore(deps): update dependency golangci-lint to v1.57.1 by @renovate in #209
- fix(deps): update golang.org/x/exp digest to a685a6e by @renovate in #210
- chore(deps): update dependency golangci-lint to v1.57.2 by @renovate in #211
- chore(deps): update golang docker tag to v1.22.2 by @renovate in #212
- fix(deps): update golang.org/x/exp digest to c0f41cb by @renovate in #213
- fix(deps): update golang.org/x/exp digest to 93d18d7 by @renovate in #214
- fix(deps): update golang.org/x/exp digest to fe59bbe by @renovate in #216
New Contributors
- @zrma made their first contribution in #170
- @RobQuistNL made their first contribution in #169
- @jagregory made their first contribution in #205
- @Henkoglobin made their first contribution in #215
- @codeboten made their first contribution in #218 (replaces #189)
Full Changelog: v0.15.0...v0.16.0
v0.15.0
This release introduces one new feature and a fix:
- support for
file://schema in references - support for yaml file references
What's Changed
- feat: add support for "file://" schema in $refs by @omissis in #147
- fix: support for yaml file references by @johanneswuerbach in #179
- chore: split generate.go file by @AlbertoBarba in #153
- chore(deps): update dependency golangci-lint to v1.55.2 by @renovate in #162
- chore(deps): update golang docker tag to v1.21.4 by @renovate in #165
- chore(deps): update golang docker tag to v1.21.5 by @renovate in #174
- chore(deps): update actions/setup-go action to v5 by @renovate in #175
- chore(deps): update golang docker tag to v1.21.6 by @renovate in #184
- fix(deps): update module github.com/spf13/cobra to v1.8.0 by @renovate in #163
- fix(deps): update golang.org/x/exp digest to 2478ac8 by @renovate in #166
- fix(deps): update golang.org/x/exp digest to 9a3e603 by @renovate in #168
- fix(deps): update golang.org/x/exp digest to 6522937 by @renovate in #172
- fix(deps): update golang.org/x/exp digest to f3f8817 by @renovate in #176
- fix(deps): update golang.org/x/exp digest to aacd6d4 by @renovate in #178
- fix(deps): update golang.org/x/exp digest to dc181d7 by @renovate in #180
- fix(deps): update golang.org/x/exp digest to 02704c9 by @renovate in #181
- fix(deps): update golang.org/x/exp digest to be819d1 by @renovate in #182
- fix(deps): update golang.org/x/exp digest to 0dcbfd6 by @renovate in #185
- fix(deps): update golang.org/x/exp digest to db7319d by @renovate in #186
New Contributors
- @johanneswuerbach made their first contribution in #179
Full Changelog: v0.14.1...v0.15.0
v0.14.1
What's Changed
- fix: configure maxLength to work as suggested by the jsonschema docs by @lucasvmiguel in #156
- chore(deps): update dependency golang to v1.21.3 by @renovate in #149
- chore(deps): update golang docker tag to v1.21.3 by @renovate in #154
- chore(deps): update actions/checkout digest to b4ffde6 by @renovate in #157
- chore(deps): update dependency golangci-lint to v1.55.0 by @renovate in #158
- chore(deps): update dependency golangci-lint to v1.55.1 by @renovate in #160
New Contributors
- @lucasvmiguel made their first contribution in #156
Full Changelog: v0.14.0...v0.14.1
v0.14.0
This release introduces two big new features:
- the ability to generate plain go models (no marshalling, unmarshalling, and validation code)
- the ability to support friendly date and time string (de-)serializations
Secondarily, the entrypoint of the application has been moved to the root folder of the project, hence the go install is now shorter, and resolves to go-jsonschema instead of gojsonschema.
What's Changed
- feat: add an option to allow to generate only models by @AlbertoBarba in #128
- feat: update go and all its references to 1.21.2 by @omissis in #151
- feat: add support for date/time formats by @durandj in #98
- chore: move enum json & yaml generation in the related formatter by @AlbertoBarba in #134
- fix(deps): update golang.org/x/exp digest to 3e424a5 by @renovate in #150
- fix(deps): update golang.org/x/exp digest to 7918f67 by @renovate in #152
- feat(ci): add ci workflow specifically for pre-releases
New Contributors
Full Changelog: v0.13.1...v0.14.0-rc.0