mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-02 16:33:43 +00:00
[fix][elixir] missing type mapping for AnyType (#22081)
* fix: unmapped anytype * add tests for any type in elixir client --------- Co-authored-by: Enrique Fernandez <enrique@bluelabs.eu>
This commit is contained in:
parent
4352a2fcd0
commit
b49ec6e033
@ -226,6 +226,7 @@ public class ElixirClientCodegen extends DefaultCodegen {
|
|||||||
typeMapping.put("date", "Date.t");
|
typeMapping.put("date", "Date.t");
|
||||||
typeMapping.put("date-time", "DateTime.t");
|
typeMapping.put("date-time", "DateTime.t");
|
||||||
// other
|
// other
|
||||||
|
typeMapping.put("AnyType", "any()");
|
||||||
typeMapping.put("ByteArray", "binary()");
|
typeMapping.put("ByteArray", "binary()");
|
||||||
typeMapping.put("DateTime", "DateTime.t");
|
typeMapping.put("DateTime", "DateTime.t");
|
||||||
typeMapping.put("UUID", "String.t");
|
typeMapping.put("UUID", "String.t");
|
||||||
|
|||||||
@ -2134,6 +2134,7 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
"@type":
|
"@type":
|
||||||
type: string
|
type: string
|
||||||
|
any_type_property: {}
|
||||||
SingleRefType:
|
SingleRefType:
|
||||||
type: string
|
type: string
|
||||||
title: SingleRefType
|
title: SingleRefType
|
||||||
|
|||||||
@ -8,11 +8,13 @@ defmodule OpenapiPetstore.Model.Any do
|
|||||||
|
|
||||||
@derive JSON.Encoder
|
@derive JSON.Encoder
|
||||||
defstruct [
|
defstruct [
|
||||||
:"@type"
|
:"@type",
|
||||||
|
:any_type_property
|
||||||
]
|
]
|
||||||
|
|
||||||
@type t :: %__MODULE__{
|
@type t :: %__MODULE__{
|
||||||
:"@type" => String.t | nil
|
:"@type" => String.t | nil,
|
||||||
|
:any_type_property => any() | nil
|
||||||
}
|
}
|
||||||
|
|
||||||
def decode(value) do
|
def decode(value) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user