Releases: omissis/go-jsonschema
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
CustomNameType
s 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
go
version 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
required
properties - 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
required
properties 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
v0.14.0-rc.1
fix(ci): tune the pre-release workflow
v0.14.0-rc.0
chore: move cli entrypoint to root