1 | {
|
2 | "type": "object",
|
3 | "$id": "updateMetadata",
|
4 | "properties": {
|
5 | "username": {
|
6 | "$ref": "#/definitions/username"
|
7 | }
|
8 | },
|
9 | "anyOf": [
|
10 | {
|
11 | "required": [ "username", "audience", "metadata" ],
|
12 | "properties": {
|
13 | "audience": {
|
14 | "type": "string",
|
15 | "minLength": 1
|
16 | },
|
17 | "metadata": {
|
18 | "$ref": "common.json#/definitions/metadata"
|
19 | }
|
20 | }
|
21 | },
|
22 | {
|
23 | "required": [ "username", "audience", "metadata" ],
|
24 | "properties": {
|
25 | "audience": {
|
26 | "type": "array",
|
27 | "minItems": 1,
|
28 | "items": {
|
29 | "type": "string",
|
30 | "minLength": 1
|
31 | }
|
32 | },
|
33 | "metadata": {
|
34 | "type": "array",
|
35 | "minItems": 1,
|
36 | "items": {
|
37 | "$ref": "common.json#/definitions/metadata"
|
38 | }
|
39 | }
|
40 | }
|
41 | },
|
42 | {
|
43 | "required": [ "username", "audience", "script" ],
|
44 | "properties": {
|
45 | "audience": {
|
46 | "type": "array",
|
47 | "minItems": 1,
|
48 | "items": {
|
49 | "type": "string",
|
50 | "minLength": 1
|
51 | }
|
52 | },
|
53 | "script": {
|
54 | "type": "object",
|
55 | "minProperties": 1,
|
56 | "additionalProperties": {
|
57 | "type": "object",
|
58 | "required": ["lua"],
|
59 | "properties": {
|
60 | "lua": {
|
61 | "type": "string",
|
62 | "minLength": 1
|
63 | },
|
64 | "argv": {
|
65 | "type": "array",
|
66 | "items": {
|
67 | "type": "string",
|
68 | "minLength": 1
|
69 | }
|
70 | }
|
71 | }
|
72 | }
|
73 | }
|
74 | }
|
75 | }
|
76 | ],
|
77 | "definitions": {
|
78 | "username": {
|
79 | "type": "string",
|
80 | "minLength": 3,
|
81 | "maxLength": 50
|
82 | }
|
83 | }
|
84 | }
|