Closed
Description
Description
When compiling spec files which contain AnyType
, the elixir generator expects a :struct
type to be used in decoder.ex
.
The generated code fails because no type <PKG>.Model.AnyType
exists
Example Generated code found here:
defimpl Poison.Decoder, for: Ory.Model.OAuth2Client do
import Ory.Deserializer
def decode(value, options) do
value
|> deserialize(:jwks, :struct, Ory.Model.AnyType, options)
|> deserialize(:metadata, :struct, Ory.Model.AnyType, options)
end
end
openapi-generator version
6.0.3
to latest in main
branch
Related issues/PRs
The proposed fix will reference this issue and builds on the latest work by @halostatue.
- Elixir Generator generates code with lots of warnings #12731
- Further Elixir Client Improvements #12775
I also include the related elixir issues from #12731.
- [REQ] Specify ExDoc dependency for Elixir #12484
- [REQ][Elixir] Generate ExUnit tests #4011
Still there is no elixir test suite - [BUG][ELIXIR] Date format not generating correct code, and date-time format not generating code #8804
- Allow the baseUrl of elixir APIs to be overridden #12268
Suggest a fix/enhancement
When work on my branch is finished I intend to submit a PR