koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

Support for $ref external schema references #421

Closed romainfd closed 4 months ago

romainfd commented 7 months ago

Hello,

Following up with #82: is there planning to support external files and URLs to be referenced using $ref?

The answer mentioned "a minimal piece of code to solve the most simple use cases" but I couldn't find additional information about that in the doc or code. Does it mean that local files could be supported? Has the situation changed since the initial issue?

Best regards and thank you for the great library!

albanm commented 7 months ago

Hello,

In the current code only local references inside the schema are resolved. The plan for the incoming major version is to integrate closely with ajv, it will be at least possible to have a bunch of schemas referencing each others loaded at once. I will keep this issue open to explore if it would be doable to include remote fetching of schemas (probably by being compatible with ajv loadSchema method and async compiling).

But in the best case scenario this will be coming in a few weeks or month, so don't count on it for your immediate plans.

romainfd commented 7 months ago

Hello,

Thank you for the very fast answer! We were mostly interested by local references between a bunch of schemas. We will find a workaround for the time being!

Good luck with the investigation