Skip to content

Supporting later versions of JSON Schema #18009

Closed

Description

Summary of the new feature / enhancement

Hello! I'm on the JSON Schema specification team, and I was wondering what drafts are currently supported. I can see by and example in the docs that draft 7 is supported, but this is now several years old, and two newer versions have been released.

Happy to help if needed!

Proposed technical implementation details (optional)

No response

Activity

  1. added
    Issue-Enhancement
    Needs-Triage
    on Sep 1, 2022
  2. gregsdennis commented on Sep 1, 2022

    @gregsdennis
    ContributorAuthor

    It also looks like you're using NJsonSchema (backed by Newtonsoft) to support this. If there's any interest in using System.Text.Json, I'd like to offer my validator JsonSchema.Net as an alternative. It already supports all the latest drafts and I regularly update it.

  3. iSazonov commented on Sep 2, 2022

    @iSazonov
    Collaborator

    If there's any interest in using System.Text.Json

    No doubt we would like to migrate to this new API all Json cmdlets in the repository.

    If you want you can pull PR to update Test-Json cmdlet. We have some issues opened for Test-Json and if they were fixed, that would be great.

  4. gregsdennis commented on Sep 2, 2022

    @gregsdennis
    ContributorAuthor

    Is there a label for this cmdlet that I can use to search for the issues? I couldn't see one, but there are over 100 labels, so...

  5. iSazonov commented on Sep 2, 2022

    @iSazonov
    Collaborator

    Only search
    https://github.com/PowerShell/PowerShell/issues?q=is%3Aissue+is%3Aopen+%22Test-Json%22+label%3AWG-Cmdlets-Utility

    GitHub
    PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
  6. dkaszews commented on Sep 2, 2022

    @dkaszews
    Contributor

    Migrating to a different provider just because it currently has more up to date features seems like fools errand - a lot of effort, and later may turn out that yet another one (including our original one) is now updated faster.

    It's better to ask our current provider to support newer versions of the schema, and once they do we can just bump the library version. If they are open source, you can open a PR yourself.

  7. dkaszews commented on Sep 2, 2022

    @dkaszews
    Contributor

    Only search https://github.com/PowerShell/PowerShell/issues?q=is%3Aissue+is%3Aopen+%22Test-Json%22+label%3AWG-Cmdlets-Utility

    GitHub**Issues · PowerShell/PowerShell**PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.

    Hint: adding "in:title" to search usually yields much better results.

    GitHub
    PowerShell for every system! Contribute to PowerShell/PowerShell development by creating an account on GitHub.
  8. gregsdennis commented on Sep 2, 2022

    @gregsdennis
    ContributorAuthor

    Dominik Kowalski (@dkaszews) I am proposing to use my own validator, and I'm fine with doing the work to move over.

    I'm also a member of the JSON Schema core team (as a co-author of the spec), and I'm employed specifically to work with tooling providers, like PowerShell.

    I keep my implementation up to date, and I actively develop new features (on an unpublished branch) as we're adding them to the next version of the spec as a platform for viability. As a result of all of this, my implementation has been the first to publish new JSON Schema features for the past two iterations (at least).

    I've had conversations with the owner of NJsonSchema, and while there is an effort to move over, it's been quite slow. I believe my last contact with them was almost a year ago, with no progress for the library in that direction during that time.

  9. dkaszews commented on Sep 3, 2022

    @dkaszews
    Contributor

    Greg Dennis (@gregsdennis) If you're member of the JSON Schema team and provide reference implementations then that is completely different case 🙂

  10. iSazonov commented on Sep 3, 2022

    @iSazonov
    Collaborator

    Dominik Kowalski (@dkaszews) Key here is that NJsonSchema backed by Newtonsoft and JsonSchema.Net is on System.Text.Json - modern implementation (NJsonSchema is frozen project - no new feature, only bug fixes). It is right way for PowerSHell to migrate from NewtonSoft to System.Text.Json.

  11. dkaszews commented on Sep 3, 2022

    @dkaszews
    Contributor

    Ilya (@iSazonov) Thanks for explanation, I was not aware of this. From what I saw, Test-Json can be easily migrated as it pretty much just forwards strings or filenames for JSON and its schema. Other cmdlets might be more difficult, but Test-Json is the only one that uses JSON schema and returns just true or false, so I see no downside in swapping to a better provider immediately.

  12. iSazonov commented on Sep 3, 2022

    @iSazonov
    Collaborator

    Other cmdlets might be more difficult

    Yes, I pulled two PR (for Test-Json and ConvertTo-Json) but closed them recently (no progress in review). It is impossible to migrate without breaking changes. But the migration is inevitable at some point.

  13. ghost added
    In-PR
    on Sep 3, 2022
  14. ghost removed
    In-PR
    on Sep 21, 2022
  15. ghost added
    In-PR
    on Sep 21, 2022
  16. ghost removed
    In-PR
    on May 4, 2023
  17. ghost added
    Resolution-Fixed
    on May 4, 2023
  18. ghost removed
    Needs-Triage
    on May 4, 2023
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

    Issue-EnhancementResolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions