Skip to content

Conversation

@simon-wacker
Copy link
Contributor

@simon-wacker simon-wacker commented Oct 22, 2025

There are some problems:

  1. If the schema is not available offline it needs to be downloaded. A downloaded schema can reference other schemas by URIs. These URIs need not be resolvable according to https://json-schema.org/draft/2020-12/json-schema-core#section-8.2.3 It is therefore unknown in general where to download these referenced schemas.
  2. The library I decided to use, namely https://github.com/json-everything/json-everything, supports the downloads of external references but advices against it in https://docs.json-everything.net/schema/examples/external-schemas/#example-schema-fetching And the fetching mechanism is non-async even though it is definitely an async operation. I worked around it by using Task.Wait() and Task.Result whose usage is strongly discouraged by Microsoft.
  3. The library json-everything seems to be poorly maintained, in particular, documentation is outdated.

Possible solutions:

  1. Download schemata in advance semi-manually and safe them. How do we handle multiple versions then? And how do we keep it up to date?
  2. Find a better library ... A possible alternative may be https://github.com/RicoSuter/NJsonSchema

@simon-wacker simon-wacker marked this pull request as draft October 22, 2025 13:40
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.

2 participants