@opengeoweb/sigmet-airmet 4.13.1 → 4.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -118,9 +118,10 @@ Schema files define all required properties and types for the configuration file
118
118
  - firArea.schema: `libs/sigmet-airmet/src/lib/utils/config/firArea.schema.json`
119
119
  Defines the shared properties and validations of sigmet and airmet.
120
120
  - airmet.schema: `libs/sigmet-airmet/src/lib/utils/config/airmet.schema.json`
121
- Defines the airmet config validations. Since airmet currently has no unique properties it inherits the firArea scheme via the ref prop: `"$ref": "firArea.schema.json"`
121
+ Defines the airmet config validations. Airmet uses the firArea scheme and adds unique properties via the $merge prop: ```"$merge": {
122
+ "source": { "$ref": "firArea.schema.json" } ```
122
123
  - sigmet.schema: `libs/sigmet-airmet/src/lib/utils/config/sigmet.schema.json`
123
- Defines the sigmet config validations. Sigmet is using the firArea scheme but has some unique properties so it's using the scheme via the $merge prop: ```"$merge": {
124
+ Defines the sigmet config validations. Sigmet uses the firArea scheme and adds unique properties via the $merge prop: ```"$merge": {
124
125
  "source": { "$ref": "firArea.schema.json" } ```
125
126
 
126
127
  #### Configuration typescript types
@@ -165,7 +166,7 @@ If you now run `nx typecheck sigmet-airmet` it will fail, and that's expected as
165
166
  ],
166
167
  ```
167
168
 
168
- 2.2 Time to test out the validations. First airmet, go to http://localhost:4400/?path=/story/demo-airmet--airmet-dialog-demo you see an error about a missing key. If we go to test out sigmet on http://localhost:4400/?path=/story/demo-sigmet--sigmet-dialog-demo, we can see there's no error while we would expect one. This is because sigmet is merging the firArea scheme, but overwrites the required list. To fix this, open `libs/sigmet-airmet/src/lib/utils/config/sigmet.schema.json` and add `my_new_config` to the required prop. Afterwards an error should show for sigmet.
169
+ 2.2 Time to test out the validations. First airmet, go to http://localhost:4400/?path=/story/demo-airmet--airmet-dialog-demo. We expect there to be an error since you added a new required property but the story is still working. The same goes for sigmet http://localhost:4400/?path=/story/demo-sigmet--sigmet-dialog-demo. This is because we are merging the firArea scheme, but this overwrites the required list. To fix this, open `libs/sigmet-airmet/src/lib/utils/config/sigmet.schema.json` and add `my_new_config` to the required prop in the `fir_areas` key. Do the same in `libs/sigmet-airmet/src/lib/utils/config/airmet.schema.json` Afterwards an error should show for both.
169
170
 
170
171
  ```
171
172
  "required": [