mix oas.gen.plug (oasis v0.5.2)
View SourceGenerates 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.jsonThe 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.Routerby default), for example we set--router Hello.MyRoutermeanwhile there is no other special name space defined, the final router module isOasis.Gen.Hello.MyRouterin/lib/oasis/gen/hello/my_router.expath.--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--fileif any"x-oasis-name-space"field(s) defined.--force, optional, forces creation without a shell prompt.--quiet, optional, does not log command output.
Summary
Functions
Callback implementation for Mix.Task.run/1.
Functions
Callback implementation for Mix.Task.run/1.