diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md
index 9d76b6b09f54..ab14983b0daf 100644
--- a/docs/generators/elixir.md
+++ b/docs/generators/elixir.md
@@ -45,8 +45,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
## LANGUAGE PRIMITIVES
-- Date.t
-- DateTime.t
- String.t
- any()
- binary()
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java
index eaae3ab643b9..de4c10e7d14b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java
@@ -186,8 +186,6 @@ public ElixirClientCodegen() {
"number()",
"boolean()",
"String.t",
- "Date.t",
- "DateTime.t",
"binary()",
"list()",
"map()",
diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex
index a71b6eb59df7..a1b8c2042cb0 100644
--- a/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex
+++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/format_test.ex
@@ -45,8 +45,12 @@ defmodule OpenapiPetstore.Model.FormatTest do
:pattern_with_digits_and_delimiter => String.t | nil
}
+ alias OpenapiPetstore.Deserializer
+
def decode(value) do
value
+ |> Deserializer.deserialize(:date, :date, nil)
+ |> Deserializer.deserialize(:dateTime, :datetime, nil)
end
end
diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex
index 264980e41667..ee9f99573a2f 100644
--- a/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex
+++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex
@@ -23,6 +23,7 @@ defmodule OpenapiPetstore.Model.MixedPropertiesAndAdditionalPropertiesClass do
def decode(value) do
value
+ |> Deserializer.deserialize(:dateTime, :datetime, nil)
|> Deserializer.deserialize(:map, :map, OpenapiPetstore.Model.Animal)
end
end
diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex
index a6a86dd702ff..0f63f82f7a72 100644
--- a/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex
+++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/nullable_class.ex
@@ -37,8 +37,12 @@ defmodule OpenapiPetstore.Model.NullableClass do
:object_items_nullable => %{optional(String.t) => map()} | nil
}
+ alias OpenapiPetstore.Deserializer
+
def decode(value) do
value
+ |> Deserializer.deserialize(:date_prop, :date, nil)
+ |> Deserializer.deserialize(:datetime_prop, :datetime, nil)
end
end
diff --git a/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex b/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex
index e78a131855a1..9d8e612c1ab5 100644
--- a/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex
+++ b/samples/client/petstore/elixir/lib/openapi_petstore/model/order.ex
@@ -25,8 +25,11 @@ defmodule OpenapiPetstore.Model.Order do
:complete => boolean() | nil
}
+ alias OpenapiPetstore.Deserializer
+
def decode(value) do
value
+ |> Deserializer.deserialize(:shipDate, :datetime, nil)
end
end