Skip to content

Commit

Permalink
Adds code-gen support for OpenAPI discriminators using Tagged Unions
Browse files Browse the repository at this point in the history
Although the OpenAPI spec allows for more complicated scenarios, I've
restricted this to discriminator unions with an explicit mapping using
only schema types that are not referenced elsewhere. This allows us
to generate nearly the exact same code as we would write by hand for
handling our own tagged union schemas.
  • Loading branch information
qxjit committed Apr 19, 2024
1 parent 9eb6d4b commit 4479586
Show file tree
Hide file tree
Showing 24 changed files with 692 additions and 101 deletions.
2 changes: 1 addition & 1 deletion json-fleece-codegen-util/json-fleece-codegen-util.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack

name: json-fleece-codegen-util
version: 0.8.0.1
version: 0.9.0.0
description: Please see the README on GitHub at <https://github.com/githubuser/json-fleece-codegen-util#readme>
homepage: https://github.com/flipstone/json-fleece#readme
bug-reports: https://github.com/flipstone/json-fleece/issues
Expand Down
2 changes: 1 addition & 1 deletion json-fleece-codegen-util/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: json-fleece-codegen-util
version: 0.8.0.1
version: 0.9.0.0
github: "flipstone/json-fleece/json-fleece-codegen-util"
license: BSD3
author: "Author name here"
Expand Down
Loading

0 comments on commit 4479586

Please sign in to comment.