oxidecomputer / oxidecomputer/typify

Cannot parse the openapi specification itself

Open
#523 5 comments 0 reactions 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

Hi, trying to parse the OpenAPI v3.1 specification itself fails with the following error message:

cargo typify ./openapi31.json
The application panicked (crashed).
Message:  not yet implemented: invalid (or unexpected) schema:
{
  "type": "object",
  "additionalProperties": {
    "$ref": "#/$defs/path-item-or-reference"
  },
  "$ref": "#/$defs/specification-extensions",
  "$comment": "https://spec.openapis.org/oas/v3.1.0#callback-object"
}
Location: /home/kasper/.cargo/registry/src/index.crates.io-6f17d22bba15001f/typify-impl-0.0.16/src/convert.rs:700

This library seems awesome. I had hoped to able to use it to work with the openapi spec in code. I don't know much about the details of the above error message however. Is this like a single bug (i.e. it should work) or is this a very complicated file (i.e. this is far off and not expected to work at the moment)?

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 ./openapi31.json using the linked OpenAPI 3.1 schema. Start from the reported schema-conversion panic in convert.rs and determine how the callback object schema is handled; done means the specification parses without a panic and the relevant behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, rust
Domain
compilers, devtools
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.