nomasystems / rebar3_ndto

A rebar3 plugin for the automatic generation of ndto modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rebar3_ndto

CI

A rebar3 plugin for the automatic generation of ndto modules.

Setup

To use rebar3_ndto in your project, you need to declare it in the plugins section of your rebar.config file:

{plugins, [
    {rebar3_ndto, {git, "https://github.com/nomasystems/rebar3_ndto.git", {tag, "0.2.0"}}}
]}.

You can optionally automatize its usage using provider_hooks:

{provider_hooks, [
    {pre, [
        {compile, {ndto, compile}},
        {clean, {ndto, clean}}
    ]}
]}.

Finally, configure the plugin's option under the ndto key:

{ndto, [
    {output_dir, "foo/foo_output_dir/"}, % defaults to "_gen/dtos"
    {parser, foo_parser}, % defaults to ndto_parser_json_schema_draft
    {specs, [
        "foo/specs/foo.json", % uses default options
        {"foo/bar/specs/foo_bar.json", [
            {output_dir, "foo/bar/foo_bar_ouput_dir/"}, % overrides default output_dir
            {parser, foo_bar_parser} % overrides default parser
        ]}
    ]}
]}.

License

rebar3_ndto is released under the Apache 2.0 License. For more information, please see the LICENSE file.

About

A rebar3 plugin for the automatic generation of ndto modules.

License:Apache License 2.0


Languages

Language:Erlang 100.0%