aboutsummaryrefslogtreecommitdiff
path: root/apps/dreki/src/dreki_tasks_script.erl
blob: 8eeb5630b5e7a62893fd24ba485551208191588b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-module(dreki_tasks_script).
-export([schemas/0, schema_field/1]).

schema_field(handler_manifest) -> <<"script-task">>.

schemas() ->
  #{
    <<"script-task">> => #{
      default_version => <<"1.0">>,
      <<"1.0">> => #{
        version => 'draft-06',
        title => <<"Executable Script Task">>,
        type => object,
        properties => #{
            <<"id">> => #{type => string, <<"dreki:form">> => #{default => generate_id}},
            <<"name">> => #{type => string},
            <<"description">> => #{type => string, <<"dreki:form">> => #{input => textarea, textarea_mode => markdown}},
            <<"executable">> => #{type => string, default => <<"/bin/sh">>},
            <<"script">> => #{type => string, <<"dreki:form">> => #{input => textarea}}
        },
        required => [script]
      }
    }
  }.