wisp-schema 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/wisp-schema.rb +1 -1
  3. data/nouns.json +187 -0
  4. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f813889f3982a9072f4f6a1a17ef2151224a0bea37cd320e11d568f118d46b9
4
- data.tar.gz: f10a3de9125dfc44d2f0c630cd47d51650c76d8a73d0ec95a4032e3dca532fb2
3
+ metadata.gz: 34828a0643645b1f255183f9c375f1bf62a8079e6e0dd25acbc762a214a03e32
4
+ data.tar.gz: fe195675fe283538aa129e04069c5b246be780050698e54a8cd5171911361cba
5
5
  SHA512:
6
- metadata.gz: 2f00804cce4077497c36e2dc11ea1808c588a6f4b272a77def7188f31a3eb06cd97f073f9d82dbf947ce0f694eeeddbab9f2f32c3c68167f96e7362c2c879972
7
- data.tar.gz: 8a564dd90a719416ef7dc5ed952e58ac249bd98c44f70055bf8b1fd8f5c473d8e39c15e0fced153388f15400be0e8e70fc29a5ecfbea17abff4983b0a0727add
6
+ metadata.gz: 40e671d956220d4fdce62139f24a7ca4587f903cfd0ede0a4c3ebdc4dcf5248c9d8743e8455c81a119c18d8355bd75a5b7227f27022ed5fb9a61049d304d4cbb
7
+ data.tar.gz: 8096a4693b74b35e51df83f1e46fc8c2490da7c2ee7806c6462a74721673594f43e289e3b4abede06f41b015d56a9de5678a37bf8eee18ef95ba5f4f62f6ecb9
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wisp
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
 
6
6
  SCHEMA_PATH = File.expand_path('../wisp.json', __dir__)
7
7
  NOUNS_PATH = File.expand_path('../nouns.json', __dir__)
@@ -0,0 +1,187 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "definitions": {
4
+ "button": {
5
+ "type": "object",
6
+ "title": "Button",
7
+ "description": "Button",
8
+ "properties": {
9
+ "type": {
10
+ "enum": ["button"]
11
+ },
12
+ "label": {"title": "Label", "type": "string"}
13
+ },
14
+ "required": ["type", "label"]
15
+ },
16
+ "text_field": {
17
+ "type": "object",
18
+ "title": "Text Field",
19
+ "description": "Text Field",
20
+ "properties": {
21
+ "type": {
22
+ "enum": ["text_field"]
23
+ },
24
+ "label": {"title": "Label", "type": "string"}
25
+ },
26
+ "required": ["type", "label"]
27
+ },
28
+ "dropdown": {
29
+ "type": "object",
30
+ "title": "Dropdown",
31
+ "description": "Dropdown",
32
+ "properties": {
33
+ "type": {
34
+ "enum": ["dropdown"]
35
+ },
36
+ "label": {"title": "Label", "type": "string"}
37
+ },
38
+ "required": ["type", "label"]
39
+ },
40
+ "dropdown_option": {
41
+ "type": "object",
42
+ "title": "Dropdown Option",
43
+ "description": "Option in open dropdown",
44
+ "properties": {
45
+ "type": {
46
+ "enum": ["dropdown_option"]
47
+ },
48
+ "label": {"title": "Label", "type": "string"}
49
+ },
50
+ "required": ["type", "label"]
51
+ },
52
+ "link": {
53
+ "type": "object",
54
+ "title": "Link",
55
+ "description": "Link",
56
+ "properties": {
57
+ "type": {
58
+ "enum": ["link"]
59
+ },
60
+ "text": {"title": "Text", "type": "string"}
61
+ },
62
+ "required": ["type", "text"]
63
+ },
64
+ "icon": {
65
+ "type": "object",
66
+ "title": "Icon",
67
+ "description": "Icon",
68
+ "properties": {
69
+ "type": {
70
+ "enum": ["icon"]
71
+ },
72
+ "description": {"title": "Description", "type": "string"}
73
+ },
74
+ "required": ["type", "description"]
75
+ },
76
+ "checkbox": {
77
+ "type": "object",
78
+ "title": "Checkbox",
79
+ "description": "Checkbox",
80
+ "properties": {
81
+ "type": {
82
+ "enum": ["checkbox"]
83
+ },
84
+ "label": {"title": "Label", "type": "string"}
85
+ },
86
+ "required": ["type", "label"]
87
+ },
88
+ "header": {
89
+ "type": "object",
90
+ "title": "Header",
91
+ "description": "Page Header",
92
+ "properties": {
93
+ "type": {
94
+ "enum": ["header"]
95
+ },
96
+ "text": {"title": "Text", "type": "string"}
97
+ },
98
+ "required": ["type", "text"]
99
+ },
100
+ "window": {
101
+ "type": "object",
102
+ "title": "Window",
103
+ "description": "Any pop-up window",
104
+ "properties": {
105
+ "type": {
106
+ "enum": ["window"]
107
+ },
108
+ "description": {"title": "Description", "type": "string"}
109
+ },
110
+ "required": ["type", "description"]
111
+ },
112
+ "modal": {
113
+ "type": "object",
114
+ "title": "Modal",
115
+ "description": "In page modal",
116
+ "properties": {
117
+ "type": {
118
+ "enum": ["modal"]
119
+ },
120
+ "description": {"title": "Description", "type": "string"}
121
+ },
122
+ "required": ["type", "description"]
123
+ },
124
+ "text": {
125
+ "type": "object",
126
+ "title": "Text",
127
+ "description": "Exactly matched text",
128
+ "properties": {
129
+ "type": {
130
+ "enum": ["text"]
131
+ },
132
+ "text": {"title": "Text", "type": "string"}
133
+ },
134
+ "required": ["type", "text"]
135
+ },
136
+ "ui_element": {
137
+ "type": "object",
138
+ "title": "UI Element",
139
+ "description": "Any other UI Element",
140
+ "properties": {
141
+ "type": {
142
+ "enum": ["ui_element"]
143
+ },
144
+ "element": {"title": "Element", "type": "string"}
145
+ },
146
+ "required": ["type", "element"]
147
+ },
148
+ "ui_element_reference": {
149
+ "type": "object",
150
+ "title": "UI Element Reference",
151
+ "description": "A UI Element stored in the database",
152
+ "properties": {
153
+ "type": {
154
+ "enum": ["ui_element_reference"]
155
+ },
156
+ "id": {"title": "UI Element ID", "type": "integer"}
157
+ },
158
+ "required": ["type", "id"]
159
+ }
160
+ },
161
+ "type": "object",
162
+ "title": "Single Wisp Noun",
163
+ "properties": {
164
+ "version": {
165
+ "type": "string",
166
+ "title": "Version"
167
+ },
168
+ "noun": {
169
+ "oneOf": [
170
+ {"$ref": "#/definitions/button"},
171
+ {"$ref": "#/definitions/text_field"},
172
+ {"$ref": "#/definitions/dropdown"},
173
+ {"$ref": "#/definitions/dropdown_option"},
174
+ {"$ref": "#/definitions/link"},
175
+ {"$ref": "#/definitions/icon"},
176
+ {"$ref": "#/definitions/checkbox"},
177
+ {"$ref": "#/definitions/header"},
178
+ {"$ref": "#/definitions/window"},
179
+ {"$ref": "#/definitions/modal"},
180
+ {"$ref": "#/definitions/text"},
181
+ {"$ref": "#/definitions/ui_element"},
182
+ {"$ref": "#/definitions/ui_element_reference"}
183
+ ]
184
+ }
185
+ },
186
+ "required": ["version", "noun"]
187
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wisp-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Grodowski
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - lib/wisp-schema.rb
22
+ - nouns.json
22
23
  - wisp.json
23
24
  homepage: https://github.com/rainforestapp/wisp
24
25
  licenses: