feat(schemas): add SYSTEM kind discriminator for non-spatial state #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SYSTEMkind to FeatureKindEnum for storing non-spatial application state as GeoJSON Features withgeometry: nullChanges
Schema Changes
SYSTEMtoFeatureKindEnumincommon.yamlSystemStateTypeEnum(temporal, spatial, selection) incommon.yamlSystemStatePropertiesclass with variant-specific fields ingeojson.yamlSystemStatefeature class withstate.*ID pattern validationTest Fixtures
system-state-temporal-01.json- Time viewport statesystem-state-spatial-01.json- Map viewport state (bbox, zoom, center)system-state-selection-01.json- Selected feature IDssystem-state-invalid-geometry.json- Tests non-null geometry rejectionsystem-state-invalid-id.json- Tests ID pattern validationDocumentation
Evidence
Test Results
Key scenarios verified:
Usage Example
Sample Temporal Viewport JSON
{ "type": "Feature", "id": "state.temporal", "geometry": null, "properties": { "kind": "SYSTEM", "state_type": "temporal", "start_time": "2024-01-15T09:00:00Z", "end_time": "2024-01-15T17:30:00Z" } }Sample Spatial Viewport JSON
{ "type": "Feature", "id": "state.spatial", "geometry": null, "properties": { "kind": "SYSTEM", "state_type": "spatial", "bbox": [-5.5, 49.5, 1.5, 55.0], "zoom": 8.5, "center": [-2.0, 52.25] } }Test Plan
Related
specs/022-system-kind-discriminator/spec.mdspecs/022-system-kind-discriminator/tasks.mdspecs/022-system-kind-discriminator/evidence/