Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #14070
Closed
Open
Issue created Nov 19, 2022 by Administrator@rootContributor

Elixir generator `AnyType` support

Created by: paulbalomiri

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.

  • #12731 (closed)
  • #12775

I also include the related elixir issues from #12731 (closed).

  • #12484 (closed)
  • #4011 Still there is no elixir test suite
  • #8804
  • #12268
Suggest a fix/enhancement

When work on my branch is finished I intend to submit a PR

Assignee
Assign to
Time tracking