/
reggae.ebnf
70 lines (35 loc) · 2.3 KB
/
reggae.ebnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
reggae ::= '[' resource (',' resource)* ']'
resource ::= '[' resource_type ',' '{' properties '}' (',' resource)* ']'
resource_type ::= 'section' | 'link' | 'instance' |'instance_list' | 'msg' | 'error'
properties ::= '{' property ':' value (',' property ':' value)* '}'
property ::= section_property | link_property | instance_property |instance_list_property | msg_property | error_property
value ::= title_value | description_value | navigation_value | name_value | new_rec_value | search_value | schema_value | get_actions_value | delete_action_value | items_value | col_value | error_type_value | error_details_value |
section_property ::= 'name' | 'title' | 'description' | 'navigation'
link_property ::= 'title' | 'description' | 'url'
instance_property ::= 'name' | 'url' | 'new_rec' | 'search' | 'schema' | 'actions'
instance_list_property ::='title' | 'description' | 'schema' | 'actions' | 'group_actions' | 'items' | 'recursive'
msg_property ::= 'title' | 'description'
error_property ::= 'error_type' | 'description' | 'error_details'
title_value ::= string_literal
description_value ::= string_literal
navigation_value ::= '[' (resource)? (',' resource)* ']'
name_value ::= string_literal
new_rec_value ::= boolean_value
search_value ::= boolean_value
schema_value ::= '[' col_spec | instance_value | instance_list_value (',' colspec | instance_value | instance_list_value)? ']'
items_value ::= '[' '[' col_value (',' col_value)* ']' (',' '[' col_value (',' col_value)* ']')* ']'
recursive_value ::= boolean_value
actions_value ::= '{' '"' ('get' | 'post' | 'put' | 'delete') '"' ':' methods (',' '"' ('get' | 'post' | 'put' | 'delete') '"' ':' methods )* '}'
group_actions_value ::= actions_value
methods::= '[' ( get_method (',' get_method)* | post_method (',' post_method)* | put_method (',' put_method)* | delete_method (',' delete_method)* ) ']'
get_action ::= string_literal
post_action ::= resource
put_action ::= resource
delete_method ::= 'remove_parent' | 'deactivate' | 'delete'
col_spec ::= '[' col_type ',' col_name ',' col_restrictions (',' col_value)? ']'
col_type ::= 'text' | 'clob' | 'integer' | 'decimal' | 'image'
col_name ::= string_literal
col_restrictions ::= [1-7]
col_value ::= string_literal
error_type_value ::= 'validation'
error_details_value ::= '{' col_name ':' msg '}'