Skip to content

schemas with $ref don't work #7

Closed
@DetachHead

Description

@DetachHead
<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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions