-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Erlang samples to use OAS 3 spec (#6297)
* erlang samples switch to oas3 spec * add new files * update samples
- Loading branch information
Showing
21 changed files
with
428 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/client/petstore/erlang-client/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.2.2-SNAPSHOT | ||
5.0.0-SNAPSHOT |
17 changes: 17 additions & 0 deletions
17
samples/client/petstore/erlang-client/src/petstore_inline_object.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-module(petstore_inline_object). | ||
|
||
-export([encode/1]). | ||
|
||
-export_type([petstore_inline_object/0]). | ||
|
||
-type petstore_inline_object() :: | ||
#{ 'name' => binary(), | ||
'status' => binary() | ||
}. | ||
|
||
encode(#{ 'name' := Name, | ||
'status' := Status | ||
}) -> | ||
#{ 'name' => Name, | ||
'status' => Status | ||
}. |
17 changes: 17 additions & 0 deletions
17
samples/client/petstore/erlang-client/src/petstore_inline_object_1.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-module(petstore_inline_object_1). | ||
|
||
-export([encode/1]). | ||
|
||
-export_type([petstore_inline_object_1/0]). | ||
|
||
-type petstore_inline_object_1() :: | ||
#{ 'additionalMetadata' => binary(), | ||
'file' => binary() | ||
}. | ||
|
||
encode(#{ 'additionalMetadata' := AdditionalMetadata, | ||
'file' := File | ||
}) -> | ||
#{ 'additionalMetadata' => AdditionalMetadata, | ||
'file' => File | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
samples/client/petstore/erlang-proper/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.3.2-SNAPSHOT | ||
5.0.0-SNAPSHOT |
25 changes: 25 additions & 0 deletions
25
samples/client/petstore/erlang-proper/src/model/petstore_inline_object.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-module(petstore_inline_object). | ||
|
||
-include("petstore.hrl"). | ||
|
||
-export([petstore_inline_object/0]). | ||
|
||
-export([petstore_inline_object/1]). | ||
|
||
-export_type([petstore_inline_object/0]). | ||
|
||
-type petstore_inline_object() :: | ||
[ {'name', binary() } | ||
| {'status', binary() } | ||
]. | ||
|
||
|
||
petstore_inline_object() -> | ||
petstore_inline_object([]). | ||
|
||
petstore_inline_object(Fields) -> | ||
Default = [ {'name', binary() } | ||
, {'status', binary() } | ||
], | ||
lists:ukeymerge(1, lists:sort(Fields), lists:sort(Default)). | ||
|
25 changes: 25 additions & 0 deletions
25
samples/client/petstore/erlang-proper/src/model/petstore_inline_object_1.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-module(petstore_inline_object_1). | ||
|
||
-include("petstore.hrl"). | ||
|
||
-export([petstore_inline_object_1/0]). | ||
|
||
-export([petstore_inline_object_1/1]). | ||
|
||
-export_type([petstore_inline_object_1/0]). | ||
|
||
-type petstore_inline_object_1() :: | ||
[ {'additionalMetadata', binary() } | ||
| {'file', binary() } | ||
]. | ||
|
||
|
||
petstore_inline_object_1() -> | ||
petstore_inline_object_1([]). | ||
|
||
petstore_inline_object_1(Fields) -> | ||
Default = [ {'additionalMetadata', binary() } | ||
, {'file', binary() } | ||
], | ||
lists:ukeymerge(1, lists:sort(Fields), lists:sort(Default)). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
samples/server/petstore/erlang-server/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5.0.0-SNAPSHOT |
Oops, something went wrong.