Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Prevent flattened additionalProperties keys from colliding with declared properties

Open
#1,059 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
compilers, tooling

Research direction

No file or test path is named. Start by tracing the generated representation and serialization/deserialization paths for declared properties and typed additionalProperties; compare the proposed map wrapper or newtype options. Done means declared names cannot be inserted as additional keys, and the requested construction, conflict-free serialization, key routing, and round-trip tests pass.

Written by the indexing model from the issue text.

Description

Problem

For an object schema with declared properties and typed additionalProperties, Typify generates a struct containing the declared fields plus a public flattened map. Callers can insert a declared property name into that map. For example, a map entry named id can conflict with the struct's declared id field and may produce duplicate or ambiguous serialized keys.

Deserialization routes declared names to their declared fields, so unrestricted construction of the flattened map does not preserve the same invariant in both directions.

Possible direction

Represent additional-property keys with a generated newtype or map wrapper that rejects names reserved by declared properties. The exact representation should preserve normal map ergonomics while preventing invalid construction and serialization.

Coverage

Add tests for:

  • constructing the additional-properties map with a declared key;
  • serialization without duplicate/conflicting keys;
  • deserialization of declared and additional keys;
  • serialize/deserialize round trips.

This was identified while reviewing #1039 and is intentionally kept separate from that PR's narrow invalid-Rust fix.

Dominant language
Rust
Stars
905
Forks
116
Avg merge
13h 19m
Merged PRs (30d)
16

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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 oxidecomputer/typify

All issues in oxidecomputer/typify

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.