Skip to content

Validate every document against the schema resolutions 1 to 5 make - #83

Merged
estebanzimanyi merged 1 commit into
masterfrom
test/ats-resolved-schema
Nov 19, 2026
Merged

estebanzimanyi merged 1 commit into
masterfrom
test/ats-resolved-schema

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The wiki page of Part 1 offers the Standards Working Group five candidate
resolutions of the normative schemas. ats_resolved_schema_test.go
implements them: it reads the vendored bundle, applies each resolution in
memory at the sites it names, each site asserted to hold the published text
first, and writes nothing back. The walk over the published examples moves
out of TestATSSchemaPublishedExamples into publishedExamples, which both
files read.

Resolution 3 keeps the three-character branch of a form and gives it the
UN/CEFACT common-code pattern, since the standard's own examples write their
units as KMH, MTR and MQS. Resolution 5 gives the datetimes of every temporal
value the RFC 3339 pattern beside format: date-time, so that a validator
reading format as an annotation constrains them too.

Measured, under either reading of format: every document the service writes
is valid against the resolved schema; 5 of 16 published examples fail it,
the five whose example is wrong against a right schema, against 10 or 13 of
16 published; and no document valid against the published schema fails the
resolved one. The narrowings each resolution makes (a scalar values, a unit
such as deg, an instant that is no RFC 3339 date-time) are cases of the test.

The wiki page of Part 1 offers the Standards Working Group five candidate
resolutions of the normative schemas. ats_resolved_schema_test.go
implements them: it reads the vendored bundle, applies each resolution in
memory at the sites it names, each site asserted to hold the published text
first, and writes nothing back. The walk over the published examples moves
out of TestATSSchemaPublishedExamples into publishedExamples, which both
files read.

Resolution 3 keeps the three-character branch of a form and gives it the
UN/CEFACT common-code pattern, since the standard's own examples write their
units as KMH, MTR and MQS. Resolution 5 gives the datetimes of every temporal
value the RFC 3339 pattern beside format: date-time, so that a validator
reading format as an annotation constrains them too.

Measured, under either reading of format: every document the service writes
is valid against the resolved schema; 5 of 16 published examples fail it,
the five whose example is wrong against a right schema, against 10 or 13 of
16 published; and no document valid against the published schema fails the
resolved one. The narrowings each resolution makes (a scalar values, a unit
such as deg, an instant that is no RFC 3339 date-time) are cases of the test.
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