Releases: contiamo/openapi-generator-go
Releases · contiamo/openapi-generator-go
v0.11.0
v0.10.1
v0.10.0
v0.9.0
v0.8.1
v0.8.0
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
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
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
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
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.