View Source mix oas.gen.plug (oasis v0.5.1)
Generates router and plug handlers for a proper OpenAPI Specification in YAML or JSON file.
mix oas.gen.plug --file path/to/openapi.yaml
mix oas.gen.plug --file path/to/openapi.yml
mix oas.gen.plug --file path/to/openapi.json
The arguments of oas.gen.plug
mix task:
--file
, required, the completed path to the specification file in YAML or JSON format.--router
, optional, the generated router's module alias, by default it isRouter
(the full module name isOasis.Gen.Router
by default), for example we set--router Hello.MyRouter
meanwhile there is no other special name space defined, the final router module isOasis.Gen.Hello.MyRouter
in/lib/oasis/gen/hello/my_router.ex
path.--name-space
, optional, the generated all modules' name space, by default it isOasis.Gen
, this argument will always override the name space from the input--file
if any"x-oasis-name-space"
field(s) defined.--force
, optional, forces creation without a shell prompt.--quiet
, optional, does not log command output.
Link to this section Summary
Functions
Callback implementation for Mix.Task.run/1
.
Link to this section Functions
Callback implementation for Mix.Task.run/1
.