OpenAPITools / OpenAPITools/openapi-generator

[REQ][rust] Map uint32 format to native u32

Open
#22,911 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

I would like openapi-generator to support for native u32 (and probably other unsigned types) for the rust generator

Describe the solution you'd like

For given openapi spec

my_u32_number:
  type: integer
  format: uint32
  maximum: 4294967295
  minimum: 0

I would like the generated code in rust to map the type as u32 instead of i32

Describe alternatives you've considered

Tried with other openapi generators

Contributor guide

Open the contributing guide

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 locating the Rust generator's schema-type mapping entry point and run it with the OpenAPI example containing an integer with format uint32. Check the generated Rust model type and existing generator tests, if present; done means uint32 maps to u32 without regressing other integer mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
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.