Skip to content

Commit

Permalink
Release 0.1.0-rc.2: Fix issue of missing union members
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-foster committed Sep 27, 2023
1 parent c9f5b2d commit e40a5da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### 0.1.0-rc.2 (2023-09-27)

**Fix**: Schemas that only appeared in union types were not properly processed, resulting in more plain `map` types than intended.

### 0.1.0-rc.1 (2023-09-26)

**Fix**: Schema output was non-deterministic due to map ordering and an issue tracking contexts.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the dependency in `mix.exs`:
```elixir
def deps do
[
{:oapi_generator, "0.1.0-rc.1", only: :dev, runtime: false}
{:oapi_generator, "0.1.0-rc.2", only: :dev, runtime: false}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion lib/open_api/processor/type.ex
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,6 @@ defmodule OpenAPI.Processor.Type do
@spec reduce(t, acc, (t, acc -> acc)) :: acc when acc: any
def reduce(type, accumulator, callback)
def reduce({:array, type}, acc, cb), do: reduce(type, acc, cb)
def reduce({:union, [types]}, acc, cb), do: Enum.reduce(types, acc, cb)
def reduce({:union, types}, acc, cb), do: Enum.reduce(types, acc, cb)
def reduce(type, acc, cb), do: cb.(type, acc)
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule OpenAPI.MixProject do
use Mix.Project

@version "0.1.0-rc.1"
@version "0.1.0-rc.2"
@source_url "https://github.com/aj-foster/open-api-generator"

def project do
Expand Down

0 comments on commit e40a5da

Please sign in to comment.