Summary
parseControlStreamSchemaResponse() in src/ogc-api/csapi/formats/schema-response.ts only looks for parametersSchema in the server response object. OpenSensorHub servers built from older source commits use paramsSchema as the JSON property name instead. When parsing a response from such a server, the function silently returns parametersSchema: undefined — no error is thrown, but the schema data is lost.
Discovery
Discovered during Oracle Cloud smoke testing via javap -c -p bytecode decompilation of compiled OSH server JARs. The compiled CommandStreamSchemaBindingJson.class contains the string literal "paramsSchema" (not "parametersSchema"), and CommandBindingJson.class contains "params" (not "parameters").
Affected Code
Upstream PR (camptocamp#136):
// schema-response.ts line ~160
const rawParametersSchema = obj.parametersSchema;
// ^^^^^^^^^^^^^^^^ — only this name
Fix (already applied in ogc-csapi-explorer):
// Accept both "parametersSchema" (newer OSH / OGC spec) and "paramsSchema" (older OSH builds)
const rawParametersSchema = obj.parametersSchema ?? obj.paramsSchema;
Cross-Server Evidence
| Server |
Build |
Property Name |
| Oracle Cloud OSH (129.80.248.53) |
Built from source (osh-core@e74e12e2) |
paramsSchema |
| DigitalOcean OSH (45.55.99.236) |
Pre-built distribution |
parametersSchema |
| 52°North CSA Demo |
Different implementation |
parametersSchema |
Impact
- Silent data loss: consumers receive
undefined instead of the actual schema
- Affects any OSH server running JARs built before the property was renamed
- The
parseDatastreamSchemaResponse() function is NOT affected (its property names are consistent across builds)
Proposed Fix
- Add
?? obj.paramsSchema fallback in parseControlStreamSchemaResponse()
- Add a unit test with a fixture using
paramsSchema
- Add JSDoc noting the dual-name pattern
Findings Report
Full findings report with bytecode evidence, cross-server comparison, and analysis:
docs/research/phase-6/findings/osh-server-property-name-divergence.md
Summary
parseControlStreamSchemaResponse()insrc/ogc-api/csapi/formats/schema-response.tsonly looks forparametersSchemain the server response object. OpenSensorHub servers built from older source commits useparamsSchemaas the JSON property name instead. When parsing a response from such a server, the function silently returnsparametersSchema: undefined— no error is thrown, but the schema data is lost.Discovery
Discovered during Oracle Cloud smoke testing via
javap -c -pbytecode decompilation of compiled OSH server JARs. The compiledCommandStreamSchemaBindingJson.classcontains the string literal"paramsSchema"(not"parametersSchema"), andCommandBindingJson.classcontains"params"(not"parameters").Affected Code
Upstream PR (camptocamp#136):
Fix (already applied in ogc-csapi-explorer):
Cross-Server Evidence
paramsSchemaparametersSchemaparametersSchemaImpact
undefinedinstead of the actual schemaparseDatastreamSchemaResponse()function is NOT affected (its property names are consistent across builds)Proposed Fix
?? obj.paramsSchemafallback inparseControlStreamSchemaResponse()paramsSchemaFindings Report
Full findings report with bytecode evidence, cross-server comparison, and analysis:
docs/research/phase-6/findings/osh-server-property-name-divergence.md