-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi,
I am trying to validate a quite simple schema, but I've problems and probably it's related to my setup.
I am using Svelte 5 in a Wails3 project.
This is my CodeMirror instance in a component.
<CodeMirror
value={mapping}
on:change={onChange}
class="flex-1 w-full"
lineWrapping
theme={$mode === "dark" ? oneDark : undefined}
extensions={[
jsonSchema(schema),
]}
/>
And this is my schema definition:
export const schema: JSONSchema7 = {
type: "object",
patternProperties: {
"^[1-9]\d*$": {
type: "array",
items: {
type: "object",
properties: {
doc: { type: "integer", minimum: 1 },
after: { type: "integer", minimum: 1 },
blank: { type: "boolean" }
},
required: ["doc"],
additionalProperties: false
}
}
},
additionalProperties: false
};
The properties must be numbers starting from 1.
Can please someone give me some guidance?
Metadata
Metadata
Assignees
Labels
No labels