Skip to content

Commit

Permalink
Merge pull request #12 from esl/update_readme
Browse files Browse the repository at this point in the history
Update readme and underlying generator version
  • Loading branch information
JanuszJakubiec authored Nov 27, 2024
2 parents a1ea2bf + 61a2835 commit 34462b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OutputDir ?= tmp

define openapi-generator
docker run --rm -v "${PWD}:/local" -w "/local" \
openapitools/openapi-generator-cli:v7.9.0
openapitools/openapi-generator-cli:v7.10.0
endef

all: compile
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,19 @@ The generated server code for AMOC REST API
and then, execute in the erlang shell:

```erlang
ServerParams = #{ip => {0, 0, 0, 0}, port => 4000, net_opts => []}.
amoc_rest_server:start(http_server, ServerParams).
ModuleHandler = openapi_callbacks, %% Module implementing the callbacks behaviour
TransportOpts = #{socket_opts => [{ip, {0, 0, 0, 0}}, {port, Port}]},
ProtocolOpts = #{metrics_callback => fun prometheus_cowboy2_instrumenter:observe/1,
stream_handlers => [cowboy_metrics_h]},
amoc_rest_server:start(
openapi_http_server,
#{
transport => tcp,
transport_opts => TransportOpts,
protocol_opts => ProtocolOpts,
logic_handler => ModuleHandler
}
).
```

## swagger-ui integration
Expand Down

0 comments on commit 34462b2

Please sign in to comment.