Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit 2665c20

Browse files
Merge pull request #196 from package-wizard/phoenix
Updated schema style
2 parents 4b7d8e2 + 4606103 commit 2665c20

File tree

2 files changed

+47
-135
lines changed

2 files changed

+47
-135
lines changed

resources/schemas/example-v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"clean": true
1111
},
1212
"authors": [
13-
[],
13+
{ },
1414
{
1515
"name": "John Doe",
1616
"email": "john@example.com",

resources/schemas/schema-v2.json

Lines changed: 46 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,9 @@
4343
"type": "array",
4444
"items": {
4545
"anyOf": [
46-
{
47-
"$ref": "#/definitions/variableYear"
48-
},
49-
{
50-
"$ref": "#/definitions/variableYearRange"
51-
},
52-
{
53-
"$ref": "#/definitions/variableDate"
54-
}
46+
{ "$ref": "#/definitions/variableYear" },
47+
{ "$ref": "#/definitions/variableYearRange" },
48+
{ "$ref": "#/definitions/variableDate" }
5549
]
5650
},
5751
"additionalProperties": false
@@ -67,18 +61,10 @@
6761
"type": "array",
6862
"items": {
6963
"anyOf": [
70-
{
71-
"$ref": "#/definitions/questionAuthor"
72-
},
73-
{
74-
"$ref": "#/definitions/questionLicense"
75-
},
76-
{
77-
"$ref": "#/definitions/questionText"
78-
},
79-
{
80-
"$ref": "#/definitions/questionSelect"
81-
}
64+
{ "$ref": "#/definitions/questionAuthor" },
65+
{ "$ref": "#/definitions/questionLicense" },
66+
{ "$ref": "#/definitions/questionText" },
67+
{ "$ref": "#/definitions/questionSelect" }
8268
]
8369
},
8470
"additionalProperties": false
@@ -89,7 +75,7 @@
8975
"type": "object",
9076
"properties": {
9177
"manager": {
92-
"$ref": "#/definitions/wizardManager"
78+
"$ref": "#/definitions/dependencyManager"
9379
},
9480
"clean": {
9581
"type": "boolean",
@@ -102,7 +88,7 @@
10288
},
10389
"additionalProperties": false
10490
},
105-
"wizardManager": {
91+
"dependencyManager": {
10692
"type": "object",
10793
"properties": {
10894
"composer": {
@@ -125,23 +111,15 @@
125111
"properties": {
126112
"name": {
127113
"oneOf": [
128-
{
129-
"type": "string"
130-
},
131-
{
132-
"type": "null"
133-
}
114+
{ "type": "string" },
115+
{ "type": "null" }
134116
],
135117
"default": null
136118
},
137119
"email": {
138120
"oneOf": [
139-
{
140-
"type": "string"
141-
},
142-
{
143-
"type": "null"
144-
}
121+
{ "type": "string" },
122+
{ "type": "null" }
145123
],
146124
"with": "email",
147125
"default": null
@@ -167,12 +145,8 @@
167145
"name"
168146
]
169147
},
170-
"source": {
171-
"type": "string"
172-
},
173-
"target": {
174-
"type": "string"
175-
}
148+
"source": { "type": "string" },
149+
"target": { "type": "string" }
176150
},
177151
"required": [
178152
"type",
@@ -185,12 +159,8 @@
185159
"copy": {
186160
"type": "object",
187161
"properties": {
188-
"source": {
189-
"type": "string"
190-
},
191-
"target": {
192-
"type": "string"
193-
}
162+
"source": { "type": "string" },
163+
"target": { "type": "string" }
194164
},
195165
"required": [
196166
"source",
@@ -201,9 +171,7 @@
201171
},
202172
"remove": {
203173
"items": [
204-
{
205-
"type": "string"
206-
}
174+
{ "type": "string" }
207175
],
208176
"uniqueItems": true,
209177
"additionalProperties": false
@@ -216,12 +184,8 @@
216184
},
217185
"with": {
218186
"oneOf": [
219-
{
220-
"type": "string"
221-
},
222-
{
223-
"type": "integer"
224-
}
187+
{ "type": "string" },
188+
{ "type": "integer" }
225189
]
226190
}
227191
},
@@ -342,23 +306,15 @@
342306
"properties": {
343307
"name": {
344308
"oneOf": [
345-
{
346-
"type": "string"
347-
},
348-
{
349-
"type": "null"
350-
}
309+
{ "type": "string" },
310+
{ "type": "null" }
351311
],
352312
"default": null
353313
},
354314
"email": {
355315
"oneOf": [
356-
{
357-
"type": "string"
358-
},
359-
{
360-
"type": "null"
361-
}
316+
{ "type": "string" },
317+
{ "type": "null" }
362318
],
363319
"with": "email",
364320
"default": null
@@ -462,12 +418,8 @@
462418
},
463419
"default": {
464420
"oneOf": [
465-
{
466-
"type": "string"
467-
},
468-
{
469-
"type": "integer"
470-
}
421+
{ "type": "string" },
422+
{ "type": "integer" }
471423
],
472424
"default": ""
473425
},
@@ -510,12 +462,8 @@
510462
"options": {
511463
"type": "array",
512464
"anyOf": [
513-
{
514-
"type": "string"
515-
},
516-
{
517-
"type": "integer"
518-
},
465+
{ "type": "string" },
466+
{ "type": "integer" },
519467
{
520468
"type": "object",
521469
"propertyNames": {
@@ -530,12 +478,8 @@
530478
},
531479
"default": {
532480
"oneOf": [
533-
{
534-
"type": "string"
535-
},
536-
{
537-
"type": "integer"
538-
}
481+
{ "type": "string" },
482+
{ "type": "integer" }
539483
]
540484
},
541485
"replace": {
@@ -556,19 +500,13 @@
556500
},
557501
"valueReplace": {
558502
"oneOf": [
559-
{
560-
"type": "string"
561-
},
503+
{ "type": "string" },
562504
{
563505
"type": "array",
564506
"items": {
565507
"anyOf": [
566-
{
567-
"type": "string"
568-
},
569-
{
570-
"type": "number"
571-
}
508+
{ "type": "string" },
509+
{ "type": "number" }
572510
]
573511
},
574512
"uniqueItems": true,
@@ -581,9 +519,7 @@
581519
"validation": {
582520
"type": "array",
583521
"items": [
584-
{
585-
"type": "string"
586-
}
522+
{ "type": "string" }
587523
],
588524
"default": null,
589525
"uniqueItems": true,
@@ -595,18 +531,10 @@
595531
"type": "boolean",
596532
"const": true
597533
},
598-
{
599-
"$ref": "#/definitions/comparatorDefault"
600-
},
601-
{
602-
"$ref": "#/definitions/comparatorString"
603-
},
604-
{
605-
"$ref": "#/definitions/comparatorList"
606-
},
607-
{
608-
"$ref": "#/definitions/comparatorPath"
609-
}
534+
{ "$ref": "#/definitions/comparatorDefault" },
535+
{ "$ref": "#/definitions/comparatorString" },
536+
{ "$ref": "#/definitions/comparatorList" },
537+
{ "$ref": "#/definitions/comparatorPath" }
610538
]
611539
},
612540
"comparatorDefault": {
@@ -629,12 +557,8 @@
629557
},
630558
"value": {
631559
"oneOf": [
632-
{
633-
"type": "string"
634-
},
635-
{
636-
"type": "integer"
637-
}
560+
{ "type": "string" },
561+
{ "type": "integer" }
638562
],
639563
"additionalProperties": false
640564
}
@@ -662,22 +586,14 @@
662586
},
663587
"value": {
664588
"oneOf": [
665-
{
666-
"type": "string"
667-
},
668-
{
669-
"type": "integer"
670-
},
589+
{ "type": "string" },
590+
{ "type": "integer" },
671591
{
672592
"type": "array",
673593
"items": {
674594
"oneOf": [
675-
{
676-
"type": "string"
677-
},
678-
{
679-
"type": "number"
680-
}
595+
{ "type": "string" },
596+
{ "type": "number" }
681597
]
682598
},
683599
"additionalProperties": false
@@ -709,12 +625,8 @@
709625
"value": {
710626
"items": {
711627
"anyOf": [
712-
{
713-
"type": "string"
714-
},
715-
{
716-
"type": "integer"
717-
}
628+
{ "type": "string" },
629+
{ "type": "integer" }
718630
],
719631
"additionalProperties": false
720632
},

0 commit comments

Comments
 (0)