Skip to content

Commit f8ca36b

Browse files
authored
Erlang server – minor fix to return type and generated doc (#20197)
* erlang-server: add jesse to app.up release * erlang-server: remove dialyzer errors that might not be related to the program * erlang-server: minor fixes to return types and generated docs
1 parent 47665aa commit f8ca36b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

modules/openapi-generator/src/main/resources/erlang-server/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ prepare_validator(SchemaVer) ->
9090
prepare_validator(get_openapi_path(), SchemaVer).
9191

9292
-doc """
93-
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state()`.
93+
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state/0`.
9494
""".
9595
-spec prepare_validator(file:name_all(), binary()) -> jesse_state:state().
9696
prepare_validator(OpenApiPath, SchemaVer) ->

modules/openapi-generator/src/main/resources/erlang-server/logic_handler.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{accept_callback_return(), cowboy_req:req(), context()}.
3535

3636
-callback provide_callback({{packageName}}_api:class(), {{packageName}}_api:operation_id(), cowboy_req:req(), context()) ->
37-
{cowboy_req:resp_body(), cowboy_req:req(), context()}.
37+
{provide_callback_return(), cowboy_req:req(), context()}.
3838

3939
-export([api_key_callback/2, accept_callback/4, provide_callback/4]).
4040
-ignore_xref([api_key_callback/2, accept_callback/4, provide_callback/4]).

samples/server/echo_api/erlang-server/src/openapi_api.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ prepare_validator(SchemaVer) ->
121121
prepare_validator(get_openapi_path(), SchemaVer).
122122

123123
-doc """
124-
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state()`.
124+
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state/0`.
125125
""".
126126
-spec prepare_validator(file:name_all(), binary()) -> jesse_state:state().
127127
prepare_validator(OpenApiPath, SchemaVer) ->

samples/server/echo_api/erlang-server/src/openapi_logic_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{accept_callback_return(), cowboy_req:req(), context()}.
3535

3636
-callback provide_callback(openapi_api:class(), openapi_api:operation_id(), cowboy_req:req(), context()) ->
37-
{cowboy_req:resp_body(), cowboy_req:req(), context()}.
37+
{provide_callback_return(), cowboy_req:req(), context()}.
3838

3939
-export([api_key_callback/2, accept_callback/4, provide_callback/4]).
4040
-ignore_xref([api_key_callback/2, accept_callback/4, provide_callback/4]).

samples/server/petstore/erlang-server/src/openapi_api.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ prepare_validator(SchemaVer) ->
111111
prepare_validator(get_openapi_path(), SchemaVer).
112112

113113
-doc """
114-
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state()`.
114+
Loads the JSON schema and the desired validation draft into a `t:jesse_state:state/0`.
115115
""".
116116
-spec prepare_validator(file:name_all(), binary()) -> jesse_state:state().
117117
prepare_validator(OpenApiPath, SchemaVer) ->

samples/server/petstore/erlang-server/src/openapi_logic_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{accept_callback_return(), cowboy_req:req(), context()}.
3535

3636
-callback provide_callback(openapi_api:class(), openapi_api:operation_id(), cowboy_req:req(), context()) ->
37-
{cowboy_req:resp_body(), cowboy_req:req(), context()}.
37+
{provide_callback_return(), cowboy_req:req(), context()}.
3838

3939
-export([api_key_callback/2, accept_callback/4, provide_callback/4]).
4040
-ignore_xref([api_key_callback/2, accept_callback/4, provide_callback/4]).

0 commit comments

Comments
 (0)