Skip to content

schemars stability guarantees? #51

Closed

Description

@afnanenayet

I was curious about the stability guarantees that schemars provides, referencing this thread: rustgd/cgmath#516 (comment)

Specifically:

Would it work if the struct has fields serialized by different versions of this crate?

Activity

  1. GREsau commented on Jun 1, 2025

    @GREsau
    Owner

    In case you're still interested, the readme now contains some info on versioning and stability: https://github.com/GREsau/schemars?tab=readme-ov-file#versioning-and-stability

    Schemars follows semantic versioning, with the following caveats:

    • Increasing MSRV (Minimum Supported Rust Version) is considered a semver-minor change. Schemars aims to support the past year of stable rust versions, but this is not guaranteed.
    • External libraries that are supported via optional dependencies (see Feature Flags) may be removed in a minor version change, particularly if a newer semver-incompatible version has been released for a long time.
    • The exact structure of generated schemas (both for built-in implementations on standard library types, and for #[derive(JsonSchema)] implementations) may change between versions of schemars - this is not considered a breaking change.
    • Exported items that are marked with #[doc(hidden)] and have names beginning with _ are not part of the public API, and may be changed or removed without notice.
    • If a bug is found in schemars that causes attributes to be incorrectly processed or silently ignored by #[derive(JsonSchema)], a subsequent version of schemars may instead fail compilation when encountering such attributes. This is considered a bug fix, and not a breaking change.

    Of course, until schemars, reaches 1.0, breaking changes are likely

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions