Skip to content

State a temporal property's unit as the schema admits - #52

Merged
estebanzimanyi merged 1 commit into
masterfrom
fix/tproperty-form
Aug 29, 2026
Merged

State a temporal property's unit as the schema admits#52
estebanzimanyi merged 1 commit into
masterfrom
fix/tproperty-form

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

/components/schemas/temporalProperty gives form two branches and nothing else: an absolute URI, or a string of exactly three characters. That excludes most unit symbols in ordinary use — the metre's own among them — and it excludes the empty string, which the tier wrote for a property carrying no unit at all.

A unit is named by its OGC register URI, http://www.opengis.net/def/uom/UCUM/0/ keyed by the UCUM code, which is the shape the tier already names a temporal reference system by. The derived properties carry m_s-1 and m; the conformance fixture carries km_h-1 and deg. A property with no unit omits the member rather than writing it empty, which the schema admits since form is optional.

The unit is checked where it is stored, not only where it is published: a unit no conformant document can carry would otherwise be published unconformantly or dropped without saying so, and a caller writing it can still fix it. The check runs before the transaction opens, so a request that cannot succeed costs none. This is the strict-reader / conformant-writer combination — rejecting a document whose value the type system cannot carry is a documented limitation, where emitting a document that fails the schema is the actual violation.

TestATSFormIsWhatTheSchemaAdmits pins the two branches against ten cases including the metre and km/h, and TestATSFormRefusedOnWrite proves a POST carrying km/h answers 400 naming the unit it refuses.

/components/schemas/temporalProperty gives `form` two branches and nothing
else: an absolute URI, or a string of exactly three characters. That
excludes most unit symbols in ordinary use, the metre's own among them,
and it excludes the empty string, which the tier wrote for a property
carrying no unit at all.

A unit is named by its OGC register URI, http://www.opengis.net/def/uom/
UCUM/0/ keyed by the UCUM code, which is the shape the tier already names
a temporal reference system by. The derived properties carry m_s-1 and m;
the conformance fixture carries km_h-1 and deg. A property with no unit
omits the member rather than writing it empty, which the schema admits
since form is optional.

The unit is checked where it is stored, not only where it is published.
A unit no conformant document can carry would otherwise be published
unconformantly or dropped without saying so, and a caller writing it can
still fix it; the check runs before the transaction opens, so a request
that cannot succeed costs none.
@estebanzimanyi
estebanzimanyi merged commit 0ebe517 into master Aug 29, 2026
1 check passed
@estebanzimanyi
estebanzimanyi deleted the fix/tproperty-form branch August 29, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant