Skip to content

Releases: contiamo/openapi-generator-go

v0.11.0

12 Aug 12:43
8d54116
Compare
Choose a tag to compare

Features

  • expose the merge package as command (#52) (cd2fcf9)
  • improve description handling in allOfs (#55) (f6feffe)

Bug Fixes

  • MarshalJSON should not have pointer reciever (#50) (4946b37)

v0.10.1

30 Jul 14:40
3209b6a
Compare
Choose a tag to compare

Bug Fixes

v0.10.0

29 Jun 11:47
508ff99
Compare
Choose a tag to compare

Features

  • Add From* methods to set oneOf data models (#45) (4bc1140)

v0.9.0

23 Jun 11:01
87ed37d
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • add convert functions for toplevel oneofs. (#41)

Features

  • add convert functions for toplevel oneofs. (#41) (93d7cc8)

v0.8.1

22 Jun 09:05
0798959
Compare
Choose a tag to compare

Bug Fixes

  • Allow responses section in components to be omitted (#39) (30398af)
  • use interface for oneOf (#36) (6bda6b3)

v0.8.0

07 Jun 09:00
462c187
Compare
Choose a tag to compare
feat: add filter package and command for openapi specs (#34)

Add a filter subcommand that takes a list of paths and returns the
minimal valid openapi spec. This allows filtering a large spec into a
smaller subset and only generating the required models.

Usage can now be

```
openapi-generator-go filter -p '/api/v2/{projectId}/fields' -o (pwd)/test.yaml
```

to generate a filtered YAML file.

Or apply the filter _during_ generation

```
openapi-generator-go generate --path-file needed_paths.txt
```

fix: update go.mod and CI to Go 1.16

    This is needed to use the relocated io.ReadAll function.

Signed-off-by: Lucas Roesler <[email protected]>

Generate setters with pointer receiver

07 Jun 06:48
08e902b
Compare
Choose a tag to compare
fix: switch setter to use pointers (#35)

Before this change all the generated model setter were noop. They set
values to the struct copy not the struct itself and since that copy
was never returned they were noop.

Also, added an update script for replacing expected models in the test
cases but with the great power comes great responsibility, so review
the overwrites carefully.

fix required validation

03 May 10:57
0209263
Compare
Choose a tag to compare

This only requires non-empty strings for properties that are in the required list of an object if they have explicit a length > 0. This includes enums.

Recursive validation

28 Apr 16:34
bed670f
Compare
Choose a tag to compare
fix: enable recursive validation for optional props. (#31)

Also, replaced the big `if` with a regular expression

Co-authored-by: Denis Rechkunov <[email protected]>

Add value type support

22 Apr 17:32
138ea56
Compare
Choose a tag to compare
Add support for value type schemas (#29)

Now schemas which are extended aliases of value types are supported.
For example, you can define a schema which has `type: boolean` and then
refer to this schema from another schema. Before this caused a
generation error.