Skip to content

Commit 63c5340

Browse files
committed
add tests for any type in elixir client
1 parent 8a1df66 commit 63c5340

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

modules/openapi-generator/src/test/resources/3_0/elixir/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,7 @@ components:
21342134
properties:
21352135
"@type":
21362136
type: string
2137+
any_type_property: {}
21372138
SingleRefType:
21382139
type: string
21392140
title: SingleRefType

samples/client/petstore/elixir/lib/openapi_petstore/model/any.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ defmodule OpenapiPetstore.Model.Any do
88

99
@derive JSON.Encoder
1010
defstruct [
11-
:"@type"
11+
:"@type",
12+
:any_type_property
1213
]
1314

1415
@type t :: %__MODULE__{
15-
:"@type" => String.t | nil
16+
:"@type" => String.t | nil,
17+
:any_type_property => any() | nil
1618
}
1719

1820
def decode(value) do

0 commit comments

Comments
 (0)