Skip to content

Releases: contiamo/openapi-generator-go

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 <roesler.lucas@gmail.com>

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 <mail@pragmader.me>

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.

Better recursive `allOf` and code revamp

16 Apr 09:14
35867d8
Compare
Choose a tag to compare
Improve various generator features (#28)

* Added detailed debug logging for everything
* Refactored to a more structured code
* Removed copy-pasted code
* Actually handle all errors without silently swallowing them
* Handle when `allOf` is taking an array definition from another type
* Added more documentation

Excessive Elephant

13 Apr 07:23
d365c2f
Compare
Choose a tag to compare

d365c2f : [BREAKING] improve allof handling (#27) (by Tino Rusch)
b62392d : add support for generating query parameter models. (#20) (by Tino Rusch)
894014c : apply gofmt before writing the router to file. (#22) (by Tino Rusch)