ParameterValue enum with fields does not follow serde rename

Open Beginner friendly
#159 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
api

Research direction

Start in okapi/src/openapi3.rs around the ParameterValue enum at lines 276-298, then read the linked Serde container-attribute documentation. Verify how the enum fields are serialized and confirm the generated output passes OpenAPI specification validation when the field is renamed.

Written by the indexing model from the issue text.

Description

Enum fields like allow_reserved in ParameterValue is not following the serde rename: https://github.com/GREsau/okapi/blob/d3bc6583dd828d37dc22f010ca8d51bfd1866a0a/okapi/src/openapi3.rs#L276-L298

It needs rename_all_fields specified to work on the enum fields: https://serde.rs/container-attrs.html

This causes it to fail OpenAPI spec validation

Dominant language
Rust
Stars
740
Forks
127
PR merge metrics
No merged PRs in 30d

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.

More from GREsau/okapi

All issues in GREsau/okapi

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.