oxidecomputer / oxidecomputer/progenitor

Error when parsing the `swagger.json` by ArgoCD

Open
#1,227 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1k
Forks
136
Avg merge
8h 36m
Merged PRs (30d)
14

Description

Hi all!

Wanted to try out generating a client for ArgoCD in rust using the swagger.json provided by them for their api. But when calling

fn main() {
    generate_api!(
        spec = "swagger.json",
        interface = Builder,
    );
}

I get the following error:

error: failed to parse *****/swagger.json: paths: no variant of enum ParameterSchemaOrContent found in flattened data at line 14 column 12
 --> src/main.rs:5:16
  |
5 |         spec = "swagger.json", // The OpenAPI document
  |                ^^^^^^^^^^^^^^

Is there something I can do to solve this error? Here is the swagger.json for reference

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 from src/main.rs using the provided swagger.json and the generate_api! invocation. Start with the parser path reported by the error, especially the ParameterSchemaOrContent handling at line 14, then verify the document parses successfully or that the failure clearly identifies the unsupported input.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, rust
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.