forked from oapi-codegen/oapi-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow merging multiple union types (oapi-codegen#670)
* Add functionality to merge union types As noted in oapi-codegen#651, it's currently not possible to merge in a data type, which means when we want to use an `allOf`, we end up only being able to add a single type. This introduces a new `Merge` method on generated union types, which delegates to our `runtime.JsonMerge` method, which uses the `jsonmerge` library. We need to handle the case that a slice may be `nil`, and that the upstream library does not have support for JSON arrays. Closes oapi-codegen#651. * Add GoDoc comments for generated union types
- Loading branch information
1 parent
8d8ef97
commit bf676e1
Showing
7 changed files
with
614 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.