mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-02 08:23:45 +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-time", "DateTime.t");
|
||||
// other
|
||||
typeMapping.put("AnyType", "any()");
|
||||
typeMapping.put("ByteArray", "binary()");
|
||||
typeMapping.put("DateTime", "DateTime.t");
|
||||
typeMapping.put("UUID", "String.t");
|
||||
|
||||
@ -2134,6 +2134,7 @@ components:
|
||||
properties:
|
||||
"@type":
|
||||
type: string
|
||||
any_type_property: {}
|
||||
SingleRefType:
|
||||
type: string
|
||||
title: SingleRefType
|
||||
|
||||
@ -8,11 +8,13 @@ defmodule OpenapiPetstore.Model.Any do
|
||||
|
||||
@derive JSON.Encoder
|
||||
defstruct [
|
||||
:"@type"
|
||||
:"@type",
|
||||
:any_type_property
|
||||
]
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
:"@type" => String.t | nil
|
||||
:"@type" => String.t | nil,
|
||||
:any_type_property => any() | nil
|
||||
}
|
||||
|
||||
def decode(value) do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user