Summary
Display a human-readable breakdown of datastream schemas using the library's parseSWEComponent() parser, instead of showing raw JSON.
Motivation
Datastreams have schema fields containing SWE Common structures (DataRecord, DataArray, etc.). The library already has parseSWEComponent() for parsing these, but the demo doesn't use it yet. This would:
- Exercise a parser that hasn't been validated in the demo yet
- Show the library does more than URL building — it understands SWE Common
- Make datastream details more readable (field names, types, UoM, constraints)
Requirements
- In the ResourceDetail component, detect when viewing a Datastream
- If the datastream has a
schema or resultSchema field, parse it with parseSWEComponent()
- Display the parsed schema in a structured format: field name, definition, data type, unit of measure
- Show both the parsed view and raw JSON for comparison
- Handle parse failures gracefully (fall back to raw JSON)
References
- Assessment doc: "Nice-to-have: SWE Common schema display for datastreams"
- Library parser:
src/ogc-api/csapi/formats/index.ts exports parseSWEComponent()
Summary
Display a human-readable breakdown of datastream schemas using the library's
parseSWEComponent()parser, instead of showing raw JSON.Motivation
Datastreams have
schemafields containing SWE Common structures (DataRecord, DataArray, etc.). The library already hasparseSWEComponent()for parsing these, but the demo doesn't use it yet. This would:Requirements
schemaorresultSchemafield, parse it withparseSWEComponent()References
src/ogc-api/csapi/formats/index.tsexportsparseSWEComponent()