oxidecomputer / oxidecomputer/typify

Support resolving sibling references using "#fragments" for "$ref": "#fragment" references to "#id":

Open
#398 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
898
Forks
114
Avg merge
4h 18m
Merged PRs (30d)
14

Description

Schema: https://github.com/usnistgov/OSCAL/releases/download/v1.1.0/oscal_catalog_schema.json

Attempting to run cargo typify oscal_catalog_schema.json produces the following error:

The application panicked (crashed).
Message:  expected a '/' in $ref: #assembly_oscal-metadata_back-matter
Location: xxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typify-impl-0.0.13/src/util.rs:492

This is a large schema, so there may be other unsupported features being used, but that first errors appears to be in parsing of the "$ref" itself not accepting value in the form of "#some-normalized-fragment".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with cargo typify oscal_catalog_schema.json using the OSCAL catalog schema linked in the issue. Start at the reported typify-impl-0.0.13/src/util.rs:492 location and trace parsing of the $ref value #assembly_oscal-metadata_back-matter. Done means sibling fragment references are accepted without the expected-slash error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.