Skip to content

SensorML documents array silently dropped — system thumbnails/media links lost #10

@Sam-Bolling

Description

@Sam-Bolling

Summary

When a system is created or updated via PUT /systems/{id} with a SensorML body containing a documents array, the Go server accepts the request (HTTP 200/201) but silently drops the documents field. Subsequent GET /systems/{id}?resultFormat=sml responses contain identifiers, classifiers, contacts, and position — but no documents array at all.

This breaks any client that depends on SensorML document references (photos, datasheets, manuals, specification links).

Steps to Reproduce

  1. POST/PUT a system with SensorML containing a documents array:
{
  "type": "PhysicalSystem",
  "uid": "urn:example:system:test",
  "name": "Test System",
  "documents": [
    {
      "role": "http://dbpedia.org/resource/Photograph",
      "name": "Station Hardware Photo",
      "link": {
        "href": "https://www.example.com/images/station.jpg",
        "type": "image/jpeg"
      }
    },
    {
      "role": "http://www.opengis.net/def/role/OGC/0/specificationDocument",
      "name": "Station Datasheet",
      "link": {
        "href": "https://www.example.com/docs/station_spec.pdf",
        "type": "application/pdf"
      }
    }
  ]
}
  1. GET the system back with ?resultFormat=sml
  2. Observe: the documents field is completely absent from the response

Actual Result

{
  "type": "PhysicalSystem",
  "uid": "urn:os4csapi:system:ndbc:station:41009:buoyfeed",
  "name": "Buoy 41009 Feed",
  "identifiers": [...],
  "classifiers": [...],
  "contacts": [...],
  "position": {...}
  // ← documents field is MISSING
}

Expected Result

{
  "type": "PhysicalSystem",
  "uid": "urn:os4csapi:system:ndbc:station:41009:buoyfeed",
  "name": "Buoy 41009 Feed",
  "identifiers": [...],
  "classifiers": [...],
  "contacts": [...],
  "position": {...},
  "documents": [
    {
      "role": "http://dbpedia.org/resource/Photograph",
      "name": "Station Hardware Photo",
      "link": {
        "href": "https://www.ndbc.noaa.gov/images/stations/41009.jpg",
        "type": "image/jpeg"
      }
    }
  ]
}

Impact

  • CSAPI Explorer (and any SensorML-aware client) uses documents to extract system thumbnail photos, datasheets, and external reference links
  • All 37 systems on the Go server are missing their photo thumbnails despite the publisher sending correct SensorML with documents on bootstrap
  • This affects every system type (NDBC, CO-OPS, USGS, NWS, ISS, etc.)

Likely Location

The Go server's SensorML model struct probably doesn't include a Documents field, so the JSON unmarshaller silently drops it on ingest. Alternatively the serializer omits it on output.

Relevant SensorML spec reference: OGC SensorML 2.1, AbstractProcess → documentation / DocumentList

Environment

  • Server version: connected-systems-go (latest main)
  • Deployment: Oracle VM at 129.80.248.53:8282, Caddy route /csapi-go/*
  • Confirmed on: 2026-04-17

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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