Skip to content

schemars deprecated schemas #737

Closed as duplicate
Closed as duplicate

Description

@jeroenvervaeke

schemars deprecated a lot of types for 1.0.0

Changelog:
https://github.com/GREsau/schemars/blob/master/CHANGELOG.md#removed-%EF%B8%8F-breaking-changes-%EF%B8%8F-1

Removed types:

  • RootSchema
  • SchemaObject
  • Metadata
  • SubschemaValidation
  • NumberValidation
  • StringValidation
  • ArrayValidation
  • ObjectValidation
  • InstanceType
  • SingleOrVec

I'm thinking about adding the types to this crate and remove the dependency on schemars.

Would this change be welcome?
If so I'll implement it.

Activity

  1. ahl commented on Jan 19, 2025

    @ahl
    Collaborator

    Agreed that we'll need a solution if we migrate off of schemars. In exploring this, I've observed that there's significant opportunity to improve upon the types from schemars. I've been exploring generating the types using the schema files for various JSON Schema drafts in a sort of bootstrapping mode for typify. This work is wrapped up with a prototype for multi-file support, improved errors, etc.

    While the offer is appreciated, I'll decline for now. And even when schemars 1.0 does come out, I think that typify can safely stay with 0.8. Thank you!

  2. dzmitry-lahoda commented on Aug 5, 2025

    @dzmitry-lahoda

    schemars: i made design more cleaner
    oxide: oh, let copy paste bad design and maintain it, why would we ever think just migrate?

    you can use schemars1 feature for migration

  3. ahl commented on Aug 5, 2025

    @ahl
    Collaborator

    @dzmitry-lahoda I'm not sure I follow your point. Schemars removed the structures we use to deserialize json schema.

  4. dzmitry-lahoda commented on Aug 5, 2025

    @dzmitry-lahoda

    we migrate off of schemars.
    remove the dependency on schemars.

    so getting off schemars and maintain something own?

    while could

    curl https://json-schema.org/draft/2020-12/meta/meta-data | typify > metadata.rs

    like thinkg,

    with Meta struct market with schemars attributes.

    up until https://json-schema.org/draft/2020-12/schema.

    schema files for various JSON Schema drafts in a sort of bootstrapping mode for typify.

    why only boostrap? why not improve typify until generated code is good enough for typify itself?

  5. ahl commented on Aug 5, 2025

    @ahl
    Collaborator

    schema files for various JSON Schema drafts in a sort of bootstrapping mode for typify.

    why only boostrap? why not improve typify until generated code is good enough for typify itself?

    By "bootstrap" I mean, make a minimal schema to consume the 2020-12 meta schema (which schemars cannot) and then do as you say: use typify output as the actual structures to represent various JSON schema drafts.

  6. dzmitry-lahoda commented on Sep 3, 2025

    @dzmitry-lahoda

    seems some of my deps migrated to 1(aide, serde_with), will donate to anybody for migration PR(when merged) 43 USD equivalent in crypto

  7. eveeifyeve commented on Sep 13, 2025

    @eveeifyeve

    It seems like they moved to Schema and removed all the types because it was becoming cluttered.

    And schema just calls now serde_json::Value

  8. webern commented on Aug 10, 2026

    @webern

    I would suggest closing this in favor of #886 which has more discussion.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions