Git Product home page Git Product logo

Comments (3)

handrews avatar handrews commented on July 28, 2024

Another wrinkle is that usually when I use this source I don't care about associating it with a base URI — I just want it to work for everything, which is not supported by the current Source interface. And having an InMemorySource like this essentially serves as a manually populated cache for the catalog's automatically managed cache. So perhaps a public interface to load schemas directly into the catalog would be a better option? This would be distinct from Catalog.add_schema(). [EDIT: Or if it's Ok for end users to use Catalog.add_schema() I could just make a documentation/tutorial PR about that?]

I'm not sure what the best design is here, I just know that it's my most common use case and feels like it involves too much boilerplate for something that's technically even more straightforward than the two supported sources.

from jschon.

handrews avatar handrews commented on July 28, 2024

OK so in the end all that happened here is that I assumed that since there was a tutorial for reference resolution that talked about Sources, that I needed a source even for an in-memory thing.

Of course this is not true, just instantiating a JSONSchema object caches it in the relevant catalog. I'll look at the documentation and see if I think there's a way to make this a bit more clear for the workflow of pre-populating the catalog with all relevant schemas.

As usual with jshcon, in the end there is much less of a problem and a much easier solution than I initially feared. 😅 😁

from jschon.

handrews avatar handrews commented on July 28, 2024

...and I still don't know what I'm talking about. I'm going to close this, and when I'm absolutely sure I know what I mean I will file an issue grounded in actual use cases and passing/failing tests.

from jschon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.