Skip to content

Feature Request: Method to list all registered schemas #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
adam-homeboost opened this issue Jan 15, 2025 · 10 comments
Closed

Feature Request: Method to list all registered schemas #74

adam-homeboost opened this issue Jan 15, 2025 · 10 comments
Assignees

Comments

@adam-homeboost
Copy link

Great library!

I would like a way to get a list of all the registered schemas in the repository.

My main use case for this is during testing it would be nice to be able to clear the registry between tests in order to start with a clean slate per test, if needed. So a list of schema urls would allow dynamic calls to unregister. A function to clear the repository would do just as well.

@jdesrosiers
Copy link
Collaborator

Sure. It should be easy enough to add both operations.

@jdesrosiers
Copy link
Collaborator

Actually, clearing the registry gets a little complicated because it would remove meta-schemas as well as user schemas, so I think for now let's just add the method to list all registered schemas and not the one to clear the repository.

I'm going to ask a student to contribute this one because this should be pretty easy and should be a good learning experience.

Acceptance Criteria

  • Expose a function to get a list of all registered schemas
  • Define types for the function
  • Add tests for the function
  • Add documentation to the README for the function

@pavanydg
Copy link
Contributor

@jdesrosiers can I work on this?

@jdesrosiers
Copy link
Collaborator

@pavanydg It's yours. Thanks!

@Karan-Palan
Copy link

Hey @pavanydg , are you still working on this?

@pavanydg
Copy link
Contributor

@Karan-Palan yes.

@jdesrosiers
Copy link
Collaborator

@pavanydg Is there something wrong? It's been over a week and this should be a very simple task. Ask for help if you need it. If you don't have time, let's let someone else have a chance.

@arpitkuriyal
Copy link

arpitkuriyal commented Feb 1, 2025

Hello @jdesrosiers, this issue looks interesting, and i think it is a great way to get started with understanding the JSON schema validator. If @pavanydg is no longer actively working on it, I’d love to take it on. Please let me know if it's available.

@jdesrosiers
Copy link
Collaborator

@arpitkuriyal Thanks for your interest. @pavanydg has been in regular contact with me since my last message and is still working on it.

@jdesrosiers
Copy link
Collaborator

The getAllRegisteredSchemaUris function is now released in v1.11.0. Thanks @pavanydg!

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

No branches or pull requests

5 participants