oxidecomputer / oxidecomputer/progenitor

`M` and `m` are normalized to ident `m`

Open
#821 9 comments 2 reactions 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

An externally provided openapi spec file defines

    foo:
      type: object
      properties:
        m:
          type: boolean
          description: small m
        M:
          type: boolean
          description: biiiig M

which generates

    #[derive(Clone, Debug, Deserialize, Serialize)]
    pub struct Foo {
        #[serde(rename = "M")]
        pub m: bool,
        pub m: bool,
    }

which won't compile. The root here is the normalization of the identifiers to be lowercase.

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

Start by tracing the identifier normalization used when generating Rust structs from an external OpenAPI spec, reproducing the provided foo example with both m and M properties. Done means the generated fields retain distinct valid identifiers and the resulting Rust code compiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, rust
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.