restspace/svelte-schema-form

schemas with `$ref` don't work

Closed this issue · 2 comments

<script>
    import { SubmitForm } from '@restspace/svelte-schema-form'

    const schema = {
        type: 'object',
        properties: {
            x: { $ref: '#/definitions/a'},
        },
        definitions: {
            a: {
                type: 'string',
            },
        },
    }
    const value = {}

    const submit = (e) => {
        alert(JSON.stringify(e.detail.value, undefined, 2))
    }
</script>

<SubmitForm {schema} {value} on:submit={submit} />

image

Hey, $ref isn't yet supported so this is currently expected behaviour.

@restspace can this be re-opened then until it is supported? i was going to try and make a PR adding support for it