Skip to content

Expose JSON Schema ID and maturity as class methods #72

Description

@korikuzma

Feature description

In the spec:

{
  "$id": "https://w3id.org/ga4gh/schema/va-spec/1.1.0-snapshot.2026-06.1/base/json/Agent",
  "maturity": "trial use"
}

I imagine others will want this too. It'd be useful to expose this info through class methods, like the following:

CanonicalAllele.schema_id()
# "https://w3id.org/ga4gh/schema/va-spec/1.1.0-snapshot.2026-06.1/base/json/Agent"

Agent.maturity()
# "trial use"

It'd also be nice to expose this metadata in model_json_schema

Use case

As I have began working on the starter kit and bundle format for civicpy, I need a way to resolve the schema identifiers.

Proposed solution

Follow similar approach as ga4gh/cat-vrs-python#48

We'll need to override schema_id since VA-Spec is different and W3IDs can be found at base/aac-2017/ccv-2022/amcg-2015

Activity

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

Metadata

Metadata

Assignees

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