Skip to content

matt/feat/add-ignore-serde-with#1

Open
matthewgapp wants to merge 2 commits intomasterfrom
matt/feat/add-ignore-serde-with
Open

matt/feat/add-ignore-serde-with#1
matthewgapp wants to merge 2 commits intomasterfrom
matt/feat/add-ignore-serde-with

Conversation

@matthewgapp
Copy link

@matthewgapp matthewgapp commented Nov 14, 2025

Note

Introduces #[schemars(ignore_serde_with)] to ignore a field’s serde with module when generating schemas, with docs and tests.

  • Attributes/Derive:
    • Add #[schemars(ignore_serde_with)] on fields; when set, ignore serde with for schema type selection unless #[schemars(with = ...)]/#[schemars(schema_with = ...)] is provided.
    • Extend FieldAttrs with ignore_serde_with flag; update attribute parsing and is_default accordingly.
  • Docs:
    • Update docs/_includes/attributes.md under with to document ignore_serde_with with example and behavior notes.
  • Tests:
    • Add serde_only_with_mod and StructIgnoreSerdeWith in schemars/tests/integration/schema_with.rs to verify integer schema when serde with is ignored.
  • Misc:
    • Minor refactor of get_meta_ident formatting in schemars_derive/src/attr/schemars_to_serde.rs.

Written by Cursor Bugbot for commit 7e2c84d. This will update automatically on new commits. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant