You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note**the support for $ref resolution has additional complexities, if you add nested $ids to you schema. Here, json-schema-library has only partial support ([@see integration test result](https://github.com/sagold/json-schema-library/actions/runs/4037856805/jobs/6941448741)). Thus, it is recommended to omit the features of changing scopes by nested $ids. For more details, see [json-schema.org: Structuring a complex schema](https://json-schema.org/understanding-json-schema/structuring.html#base-uri).
231
+
**Note**JSON Schema $ref-keyword can become tricky when combined with $ids in sub-schemas. For more details, see [json-schema.org: Structuring a complex schema](https://json-schema.org/understanding-json-schema/structuring.html#base-uri).
232
232
233
233
<details><summary>Adding remote schema to compileSchema</summary>
> 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.
1197
+
1196
1198
In version v10.0.0, we've made significant changes to the library’s API, particularly in how we handle drafts and schemas. These changes are required to support features like `dynamicAnchor`, `unevaluatedItems`, and `oneOfIndex` and to integrate with the headless-json-editor. The previous approach of directly working with JSON schema objects lacked the flexibility needed for more advanced features and extensibility.
1197
1199
1198
1200
The new implementation revolves around compiling schemas into a **SchemaNode** tree. This change offers a more fitting, simpler, and extensible approach to working with JSON schemas.
@@ -1204,8 +1206,7 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
1204
1206
1205
1207
#### Breaking Changes:
1206
1208
1207
-
-**`compileSchema`** is now a standalone function and replaces the `Draft` class.
1208
-
- All return values for JSON Schema are now `SchemaNode` objects that contain a `schema` property.
1209
+
**`compileSchema`** is now a standalone function and replaces the `Draft` class. All return values for JSON Schema are now `SchemaNode` objects that contain a `schema` property.
1209
1210
1210
1211
```ts
1211
1212
// PREVIOUSLY
@@ -1215,44 +1216,36 @@ The new implementation revolves around compiling schemas into a **SchemaNode** t
**Draft Customization**: Customizing drafts has changed completely. The previous methods of extending drafts are no longer valid, and draft handling is now centered around `SchemaNode`.
**Removed Configuration Option**: The `templateDefaultOptions` property has been removed from the global settings object. You should now configure it using the `compileSchema` options:
**Changed remote $id support** in `addRemoteSchema`. An `$id`has to be a valid url (previously any value was accepted)
1256
1249
1257
1250
### v9.0.0
1258
1251
@@ -1283,34 +1276,3 @@ With version `v8.0.0`, _getData_ was improved to better support optional propert
1283
1276
-`resolveDynamicSchema` - Resolves all dynamic schema definitions for the given input data and returns the resulting JSON Schema without any dynamic schema definitions.
With version `v5.0.0` the API has changed to es6 modules, where there is no `default` export, only named exports. Additionally all code has been rewritten in TypeScript. When directly accessing files, switch to `dist/module/*.js`-files for plain js-modules.
1313
-
1314
-
### v4.0.0
1315
-
1316
-
With version `v4.0.0` the API has changed in order to use the defined (root) schema in draft as default where possible. This means most methods have a changed signature, where `data` is passed before an optional `schema` argument.
0 commit comments