OpenAPITools / OpenAPITools/openapi-generator
[BUG] [Rust Server] Generator type is incorrect for objects with both properties and additionalProperties specified
Open
Nobody has claimed this yet.
Issue: Bug
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
Generator type is incorrect for objects with both properties and additionalProperties specified
openapi-generator version
5.0.x
OpenAPI declaration file content or url
ObjectParam:
type: object
required:
- requiredParam
properties:
requiredParam:
type: boolean
optionalParam:
type: integer
-
additionalProperties: true
Command line used for generation
bin/rust-server-petstore.sh
Steps to reproduce
additionalProperties is ignored in the generated code.
Related issues/PRs
#5515
https://github.com/OpenAPITools/openapi-generator/issues/5515
Suggest a fix
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run bin/rust-server-petstore.sh with the ObjectParam schema shown and inspect the generated Rust type. Compare the result with the expected handling of additionalProperties alongside requiredParam and optionalParam; done means additionalProperties is represented rather than ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, rust
- Domain
- backend-api-design, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100