-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopo-schema.yml
93 lines (91 loc) · 3.39 KB
/
popo-schema.yml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
$: # file-config, shared configuration for all POPO objects in current schema file
config:
namespace: string
outputPath: string
namespaceRoot: string|null # if set remaps namespace and outputPath
extend: string|null # which class POPO objects should extend from
implement: string|null # which interface POPO objects should implement
comment: string|null # Class docblock comment
phpComment: string|null # Generated PHP File docblock comment
use: array<string>|[] # Import block in generated PHP class
trait: array<string>|[] # Traits to be used with generated class
attribute: string|null # Class attributes as string
attributes: array<key, value>|[] # Class attributes as key value pairs
classPluginCollection: array<string>|[]
phpFilePluginCollection: array<string>|[]
namespacePluginCollection: array<string>|[]
propertyPluginCollection: array<string>|[]
mappingPolicyPluginCollection: array<string>|[]
default: array # default values
property: array # shared properties
SchemaName: # schema-config
$: # shared configuration for all POPO objects in SchemaName, in all schema files
config:
namespace: string
outputPath: string
namespaceRoot: string|null
extend: string|null
implement: string|null
comment: string|null
phpComment: string|null
use: array<string>|[]
trait: array<string>|[]
attribute: string|null,
attributes: array<key, value>|[]
classPluginCollection: array<string>|[]
phpFilePluginCollection: array<string>|[]
namespacePluginCollection: array<string>|[]
propertyPluginCollection: array<string>|[]
mappingPolicyPluginCollection: array<string>|[]
default: array
property: [{
name: string,
type:
type: string
default: string
supportedTypes: ['array','bool','float','int','string','mixed','const','popo', 'datetime'],
comment: string|null,
default: mixed,
itemType: string|null,
itemName: string|null,
extra: {timezone: ..., format: ...},
attribute: string|null,
attributes: array<key, value>|[]
mappingPolicy: ['none', 'lower', 'upper', 'camel-to-snake', 'snake-to-camel'],
mappingPolicyValue: string|null
}]
PopoName: # popo-config
config:
namespace: string
outputPath: string
namespaceRoot: string|null
extend: string|null
implement: string|null
comment: string|null
phpComment: string|null
use: array<string>|[]
trait: array<string>|[]
attribute: string|null,
attributes: array<key, value>|[]
classPluginCollection: array<string>|[]
phpFilePluginCollection: array<string>|[]
namespacePluginCollection: array<string>|[]
propertyPluginCollection: array<string>|[]
mappingPolicyPluginCollection: array<string>|[]
default: array
property: [{
name: string,
type:
type: string
default: string
supportedTypes: ['array','bool','float','int','string','mixed','const','popo', 'datetime'],
comment: string|null,
default: mixed,
itemType: string|null,
itemName: string|null,
extra: {timezone: ..., format: ...},
attribute: string|null,
attributes: array<key, value>|[]
mappingPolicy: ['none', 'lower', 'upper', 'camel-to-snake', 'snake-to-camel'],
mappingPolicyValue: string|null
}]