Skip to content

Publish schema someplace more predictable/cached #1016

@bollwyvl

Description

@bollwyvl

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

As always, thanks for constructor, and congrats on 3.12! 🎉

The next piece of the schema puzzle is publishing the JSON someplace that has a versioned URL, and broadly available, making it more it reliable for use in downstream tools. raw.githubusercontent is not a great spot, long term, as different users/instutions can be firewalled/ratebanned for various reasons, and requires some tricks to even cache locally.

The first place which might make sense is along with the docs: this could be as simple as adding ../../constructor/data to html_static_paths, which would make it available in /_static/construct.schema.json. However, GitHub pages doesn't allow for multiple deploys versioning, so to get proper versioning, this would probably have to be a more complex approach which e.g. restored the schema for all historic versions from git for publishing.

Another path would be to (also) publish docs on readthedocs.org, which would give basically free versioning as a URL prefix (in addition to a number of other features), though there is, as usual, some integration risk.

Parallel to all of that: getting a URL added to the schema store would give users of willing tools (such as yaml-language-server) a zero-configuration approach without magic comments: one can already add this to construct.yaml and start getting completion, hover information, etc.

#yaml-language-server $schema=https://github.com/conda/constructor/raw/refs/tags/3.12.0/constructor/data/construct.schema.json

This would generally need an "evergreen" URL (e.g. latest), which complicates matters a bit further.

Thanks again!

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions