Skip to content

Commit e73dbd4

Browse files
committed
ENH: Constrain the ability to pass with additional properties
1 parent 499109f commit e73dbd4

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

power-curve-schema/schema.json

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
"title": "Specify a range of available hub heights [m]",
7979
"type": "object",
8080
"description": "Specify a range of available hub heights [m]",
81+
"additionalProperties": false,
8182
"properties": {
8283
"min": {
8384
"type": "number",
@@ -122,11 +123,13 @@
122123
"title": "Thermal Regulation",
123124
"description": "Define thermal shutdowns and derating characteristics",
124125
"type": "object",
126+
"additionalProperties": false,
125127
"properties": {
126128
"cold": {
127129
"title": "Low Temperature Thermal Shutdown",
128130
"description": "Define low-temperature thermal shutdown characteristics",
129131
"type": "object",
132+
"additionalProperties": false,
130133
"properties": {
131134
"shutdown_temperature": {
132135
"title": "Shutdown Temperature",
@@ -153,6 +156,7 @@
153156
"title": "High Temperature Thermal Shutdown",
154157
"description": "Define high-temperature thermal shutdown characteristics",
155158
"type": "object",
159+
"additionalProperties": false,
156160
"properties": {
157161
"shutdown_temperature": {
158162
"title": "Shutdown Temperature",
@@ -186,6 +190,7 @@
186190
{
187191
"title": "Altitude based derating",
188192
"required": ["altitude", "power_limit", "temperature"],
193+
"additionalProperties": false,
189194
"properties": {
190195
"altitude": {
191196
"description": "The altitude at which this derating curve applies [m above the WGS84 spheroid]",
@@ -210,6 +215,7 @@
210215
{
211216
"title": "Air density based derating",
212217
"required": ["air_density", "power_limit", "temperature"],
218+
"additionalProperties": false,
213219
"properties": {
214220
"air_density": {
215221
"description": "The air density at which this derating curve applies [kg/m^3]",
@@ -376,13 +382,15 @@
376382
}
377383
},
378384
"required": ["document", "turbine", "power_curves"],
385+
"additionalProperties": false,
379386
"properties": {
380387
"document": {
381388
"type": "object",
382389
"title": "Document",
383390
"description": "Information about this document",
384391
"required": ["metadata"],
385392
"$comment": "We've added metadata into a property of `document` to facilitate addition of more prescriptive or specific (ie non dublin-core) properties in the future",
393+
"additionalProperties": false,
386394
"properties": {
387395
"metadata": {
388396
"title": "Dublin-Core Metadata",
@@ -391,6 +399,7 @@
391399
"items": {
392400
"type": "object",
393401
"required": ["term", "value"],
402+
"additionalProperties": false,
394403
"properties": {
395404
"term": {
396405
"type": "string",
@@ -441,6 +450,7 @@
441450
"grid_frequencies",
442451
"thermal_regulation"
443452
],
453+
"additionalProperties": false,
444454
"properties": {
445455
"manufacturer_name": {
446456
"type": "string",
@@ -554,6 +564,7 @@
554564
"turbulence",
555565
"standard_climate"
556566
],
567+
"additionalProperties": false,
557568
"properties": {
558569
"label": {
559570
"type": "string",
@@ -589,6 +600,7 @@
589600
"standard_edition": "2"
590601
}
591602
],
603+
"additionalProperties": false,
592604
"properties": {
593605
"standard": {
594606
"$comment": "The use of anyOf allows specification of any string value, whilst adding an enum to indicate the precise values to be selected should your value be in the prescribed list of common items.",
@@ -637,6 +649,7 @@
637649
"title": "Standard IEC design class",
638650
"type": "object",
639651
"required": ["class_label"],
652+
"additionalProperties": false,
640653
"properties": {
641654
"class_label": {
642655
"description": "Specify a predefined IEC design class (I, II, or III)",
@@ -656,6 +669,7 @@
656669
"title": "Special or custom design class",
657670
"type": "object",
658671
"required": ["class_label"],
672+
"additionalProperties": false,
659673
"properties": {
660674
"class_label": {
661675
"title": "Label",
@@ -727,6 +741,7 @@
727741
"type": "object",
728742
"$comment": "This is defined as a single-property object rather than a direct string because it's more explicit to include the category keyword (and allows for later adoption of other predefined profiles requiring more sophistication than a string)",
729743
"required": ["category"],
744+
"additionalProperties": false,
730745
"properties": {
731746
"category": {
732747
"title": "Category",
@@ -740,6 +755,7 @@
740755
"type": "object",
741756
"description": "Specify reference turbulence intensity",
742757
"required": ["category", "reference_turbulence_intensity"],
758+
"additionalProperties": false,
743759
"properties": {
744760
"category": {
745761
"title": "Category",
@@ -761,6 +777,7 @@
761777
"type": "object",
762778
"description": "Specify characteristic turbulence intensity and slope consistent with IEC61400-1 Ed2",
763779
"required": ["category", "characteristic_turbulence_intensity"],
780+
"additionalProperties": false,
764781
"properties": {
765782
"category": {
766783
"title": "Category",
@@ -795,6 +812,7 @@
795812
"wind_speed",
796813
"normal_turbulence_intensity"
797814
],
815+
"additionalProperties": false,
798816
"properties": {
799817
"category": {
800818
"title": "Category",
@@ -845,6 +863,7 @@
845863
"normal_hours_per_lifetime",
846864
"extreme_turbulence_intensity"
847865
],
866+
"additionalProperties": false,
848867
"properties": {
849868
"category": {
850869
"description": "Set the turbulence category to custom",
@@ -936,6 +955,7 @@
936955
"standard_climate": {
937956
"type": "object",
938957
"description": "Define operating and survival temperatures in standard climates",
958+
"additionalProperties": false,
939959
"properties": {
940960
"operating_temperature_range": {
941961
"type": "array",
@@ -964,6 +984,7 @@
964984
"cold_climate": {
965985
"type": "object",
966986
"description": "As per standard climate in eventuality turbine is equipped with a cold weather package",
987+
"additionalProperties": false,
967988
"properties": {
968989
"operating_temperature_range": {
969990
"type": "array",
@@ -993,6 +1014,7 @@
9931014
"type": "object",
9941015
"description": "As per standard climate in eventuality turbine is equipped with a hot weather package",
9951016
"$comment": "TODO Schema team - Can we define why this is different in hot climates than it is in standard climates?",
1017+
"additionalProperties": false,
9961018
"properties": {
9971019
"operating_temperature_range": {
9981020
"type": "array",
@@ -1026,6 +1048,7 @@
10261048
"title": "Power Curves",
10271049
"description": "Contains power and thrust curves along with data specific to each operating mode of the turbine",
10281050
"required": ["default_operating_mode", "operating_modes"],
1051+
"additionalProperties": false,
10291052
"properties": {
10301053
"default_operating_mode": {
10311054
"type": "string",
@@ -1054,6 +1077,7 @@
10541077
"thrust",
10551078
"overrides"
10561079
],
1080+
"additionalProperties": false,
10571081
"properties": {
10581082
"label": {
10591083
"type": "string",
@@ -1095,6 +1119,7 @@
10951119
"items": {
10961120
"type": "object",
10971121
"required": ["kind", "wind_speed", "period"],
1122+
"additionalProperties": false,
10981123
"properties": {
10991124
"kind": {
11001125
"title": "Cut in characteristic",
@@ -1129,6 +1154,7 @@
11291154
"items": {
11301155
"type": "object",
11311156
"required": ["label", "dimension", "values"],
1157+
"additionalProperties": false,
11321158
"properties": {
11331159
"label": {
11341160
"type": "string",
@@ -1446,6 +1472,7 @@
14461472
"oneOf": [
14471473
{
14481474
"title": "Emissions at one-third-octave intervals",
1475+
"additionalProperties": false,
14491476
"properties": {
14501477
"margin": {
14511478
"$ref": "#/$defs/acoustic_emissions_margin"
@@ -1488,6 +1515,7 @@
14881515
},
14891516
{
14901517
"title": "Emissions at full-octave intervals",
1518+
"additionalProperties": false,
14911519
"properties": {
14921520
"margin": {
14931521
"$ref": "#/$defs/acoustic_emissions_margin"
@@ -1529,6 +1557,7 @@
15291557
},
15301558
{
15311559
"title": "Total emissions",
1560+
"additionalProperties": false,
15321561
"properties": {
15331562
"margin": {
15341563
"$ref": "#/$defs/acoustic_emissions_margin"
@@ -1573,6 +1602,7 @@
15731602
"rated_rpm": 11.8
15741603
}
15751604
],
1605+
"additionalProperties": false,
15761606
"properties": {
15771607
"rated_power": {
15781608
"$ref": "#/$defs/rated_power"
@@ -1596,6 +1626,7 @@
15961626
"additional": {
15971627
"title": "Additional",
15981628
"type": "object",
1629+
"additionalProperties": false,
15991630
"properties": {
16001631
"reference": {
16011632
"type":"string",
@@ -1613,9 +1644,7 @@
16131644
"description": "Add extra (e.g. manufacturer-specific) data to this field.",
16141645
"additionalProperties": true
16151646
}
1616-
},
1617-
"additionalProperties": false
1647+
}
16181648
}
1619-
},
1620-
"additionalProperties": false
1649+
}
16211650
}

0 commit comments

Comments
 (0)