Skip to content

core-spec: version is a const, but converter fixtures declare 0.1.1 and fail the schema #357

Description

@venkata-chikkam

core-spec/ossie-schema.json pins the document version to a single value:

"version": {
  "type": "string",
  "const": "0.2.0.dev0",
  "description": "Apache Ossie specification version"
}

But converters/orionbelt/tests/fixtures/tpcds_ossie.yaml begins:

version: "0.1.1"

So that fixture fails the project's own schema.

Reproduction

import json, yaml, urllib.request
from jsonschema import Draft202012Validator

raw = "https://raw.githubusercontent.com/apache/ossie/main/"
schema = json.load(urllib.request.urlopen(raw + "core-spec/ossie-schema.json"))
doc = yaml.safe_load(urllib.request.urlopen(raw + "converters/orionbelt/tests/fixtures/tpcds_ossie.yaml"))

print([e.message for e in Draft202012Validator(schema).iter_errors(doc)])
# ["'0.2.0.dev0' was expected"]

That is the only validation error the fixture produces, so the version is the sole mismatch.

Why this came up

We build a DuckDB implementation that reads Ossie models and executes queries against them. We
vendored several converter fixtures as a conformance corpus — checking both that our reader accepts
them and that they validate against the published schema. That is how the mismatch surfaced.

The underlying question

A const means exactly one spec version is ever valid, so every document has to be rewritten in
lockstep with the spec and no implementation can accept a range. That may well be intended during
incubation, but it does mean:

  • documents in the wild (0.1.1, 0.1.0) become schema-invalid the moment the const moves
  • an implementation cannot distinguish "written against an older spec" from "malformed"

If a range is wanted eventually, pattern or enum would express it. If const is deliberate, then
the orionbelt fixture is simply out of date and could be bumped.

Happy to send a PR either way — just let me know which you would prefer.

(Edited to correct the file paths: these were osi-schema.json and tpcds_osi.yaml when I first
looked, and have since been renamed to ossie-. Re-verified against main today; both defects are
unchanged.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions