Erlang server (#20087)

* erlang-server: Extend provided return

* Regenerate erlang-server handlers
This commit is contained in:
Nelson Vides 2024-11-12 14:26:58 +01:00 committed by GitHub
parent 85f711236c
commit 20b5059aa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 19 additions and 10 deletions

View File

@ -136,7 +136,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ {{packageName}}_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -8,6 +8,9 @@
| {true, iodata()}
| {created, iodata()}
| {see_other, iodata()}.
-type provide_callback_return() ::
stop
| cowboy_req:resp_body().
-type api_key_callback() ::
fun(({{packageName}}_api:operation_id(), binary()) -> {true, context()} | {false, iodata()}).
-type accept_callback() ::

View File

@ -138,7 +138,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -258,7 +258,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -141,7 +141,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -105,7 +105,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -8,6 +8,9 @@
| {true, iodata()}
| {created, iodata()}
| {see_other, iodata()}.
-type provide_callback_return() ::
stop
| cowboy_req:resp_body().
-type api_key_callback() ::
fun((openapi_api:operation_id(), binary()) -> {true, context()} | {false, iodata()}).
-type accept_callback() ::

View File

@ -105,7 +105,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -240,7 +240,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -8,6 +8,9 @@
| {true, iodata()}
| {created, iodata()}
| {see_other, iodata()}.
-type provide_callback_return() ::
stop
| cowboy_req:resp_body().
-type api_key_callback() ::
fun((openapi_api:operation_id(), binary()) -> {true, context()} | {false, iodata()}).
-type accept_callback() ::

View File

@ -293,7 +293,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -161,7 +161,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->

View File

@ -262,7 +262,7 @@ handle_type_accepted(Req, #state{operation_id = OperationID,
{Res, Req1, State#state{context = Context1}}.
-spec handle_type_provided(cowboy_req:req(), state()) ->
{cowboy_req:resp_body(), cowboy_req:req(), state()}.
{ openapi_logic_handler:provide_callback_return(), cowboy_req:req(), state()}.
handle_type_provided(Req, #state{operation_id = OperationID,
provide_callback = Handler,
context = Context} = State) ->