Skip to content

feat: SWE Common schema display for datastreams #2

@Sam-Bolling

Description

@Sam-Bolling

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions