File tree Expand file tree Collapse file tree 4 files changed +28
-21
lines changed Expand file tree Collapse file tree 4 files changed +28
-21
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,17 @@ This is the place to add a short introduction.
1818
1919## Item Properties and Collection Fields
2020
21- | Field Name | Type | Description |
22- | ----------- | ------------------------- | ----------- |
23- | new_field | string | ** REQUIRED** . Describe the required field... |
24- | xyz | [ XYZ Object] ( #xyz-object ) | Describe the field... |
25- | another_one | \[ number] | Describe the field... |
21+ | Field Name | Type | Description |
22+ | -------------------- | ------------------------- | ----------- |
23+ | template : new_field | string | ** REQUIRED** . Describe the required field... |
24+ | template : xyz | [ XYZ Object] ( #xyz-object ) | Describe the field... |
25+ | template : another_one | \[ number] | Describe the field... |
2626
2727### Additional Field Information
2828
29- #### new_field
29+ #### template : new_field
3030
31- This is a much more detailed description of the field ` new_field ` ...
31+ This is a much more detailed description of the field ` template: new_field` ...
3232
3333### XYZ Object
3434
Original file line number Diff line number Diff line change 3030 ]
3131 }
3232 },
33- "new_field" : " test" ,
34- "xyz" : {
33+ "template: new_field" : " test" ,
34+ "template: xyz" : {
3535 "x" : 1 ,
3636 "y" : 2 ,
3737 "z" : 3
3838 },
39- "another_one" : [
39+ "template: another_one" : [
4040 1 ,
4141 2 ,
4242 3
4343 ],
4444 "assets" : {
4545 "example" : {
4646 "href" : " https://example.com/examples/file.xyz" ,
47- "new_field" : " test"
47+ "template: new_field" : " test"
4848 }
4949 },
5050 "item_assets" : {
5151 "data" : {
52- "new_field" : " test"
52+ "template: new_field" : " test"
5353 }
5454 },
5555 "summaries" : {
Original file line number Diff line number Diff line change 4040 },
4141 "properties" : {
4242 "datetime" : " 2020-12-11T22:38:32Z" ,
43- "new_field" : " test" ,
44- "xyz" : {
43+ "template: new_field" : " test" ,
44+ "template: xyz" : {
4545 "x" : 1 ,
4646 "y" : 2 ,
4747 "z" : 3
4848 },
49- "another_one" : [
49+ "template: another_one" : [
5050 1 ,
5151 2 ,
5252 3
6161 "assets" : {
6262 "data" : {
6363 "href" : " https://example.com/examples/file.xyz" ,
64- "new_field" : " test"
64+ "template: new_field" : " test"
6565 }
6666 }
6767}
Original file line number Diff line number Diff line change 2121 "properties" : {
2222 "allOf" : [
2323 {
24+ "$comment" : " Require fields here for item properties." ,
2425 "required" : [
25- " new_field"
26+ " template: new_field"
2627 ]
2728 },
2829 {
9798 "$comment" : " Add your new fields here. Don't require them here, do that above in the item schema." ,
9899 "type" : " object" ,
99100 "properties" : {
100- "new_field" : {
101+ "template: new_field" : {
101102 "type" : " string"
102103 },
103- "xyz" : {
104+ "template: xyz" : {
104105 "type" : " object" ,
105106 "required" : [
106107 " x" ,
119120 }
120121 }
121122 },
122- "another_one" : {
123+ "template: another_one" : {
123124 "type" : " array" ,
124125 "items" : {
125126 "type" : " number"
126127 }
127128 }
128- }
129+ },
130+ "patternProperties" : {
131+ "^(?!template:)" : {
132+ "$comment" : " Above, change `template` to the prefix of this extension" ,
133+ }
134+ },
135+ "additionalProperties" : false
129136 }
130137 }
131138}
You can’t perform that action at this time.
0 commit comments