Skip to content

Commit 2c4f679

Browse files
committed
docs: remove simple if support from addRemote
1 parent e2636b6 commit 2c4f679

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h1 align="center">
44
<img src="./docs/json-schema-library-10.png" width="192" alt="json-schema-library">
55
<br/>
6-
json-schema-library
6+
json-schema-library
77
</h1>
88

99
> **json-schema-library** provides tools and utilities for working with JSON Schema - enabling creation, validation, and schema exploration. Unlike most validators and editors, which hide the inner workings, this library is designed for developers building custom tools around JSON Schema. It runs in both Node and browser environments, prioritizing flexibility and extensibility over minimal memory footprint or raw performance.
@@ -695,7 +695,6 @@ expect(childNodes.map((n) => n.schema)).to.deep.equal([{ type: "string" }, { typ
695695
`addRemote` lets you add additional schemas that can be referenced by an URL using `$ref`. Use this to combine multiple schemas without changing the actual schema.
696696

697697
Each schemas is referenced by their unique `$id` (since draft-06, previously `id`). Usually an `$id` is specified as an url, for example `https://mydomain.com/schema/schema-name` or with a file extension like `https://mydomain.com/schema/schema-name.json`.
698-
~~At least in _json-schema-library_ you can use any name, just ensure the `$id` is unique across all schemas.~
699698

700699
On a compiled schema
701700

@@ -1139,15 +1138,11 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
11391138
- **`compileSchema`** is now a standalone function and replaces the `Draft` class.
11401139
- All return values for JSON Schema are now `SchemaNode` objects that contain a `schema` property.
11411140

1142-
**Previously**:
1143-
11441141
```ts
1142+
// PREVIOUSLY
11451143
const draft = new Draft(schema);
1146-
```
1147-
1148-
**Now**:
11491144

1150-
```ts
1145+
// NOW
11511146
const node = compileSchema(schema);
11521147
```
11531148

@@ -1180,6 +1175,8 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
11801175
});
11811176
```
11821177

1178+
- **Changed remote $id support** in `addRemote`. An `$id` has to be a valid url (previously any value was accepted)
1179+
11831180
This update involves some significant changes in how you work with the library, so please carefully review the migration guide and adjust your implementation accordingly.
11841181

11851182
This format should help users quickly understand the changes, what has been renamed, and how to adapt to the new API.

0 commit comments

Comments
 (0)