Skip to content

Commit

Permalink
docs: Update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 authored Feb 8, 2025
1 parent d69a5d3 commit d8df940
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,49 @@
fn retrieve(&self, uri: &Uri<String>) -> Result<Value, Box<dyn std::error::Error + Send + Sync>>
```

- Simplified `Registry` creation API:
- Removed `RegistryOptions::try_new` and `RegistryOptions::try_from_resources` in favor of `Registry::build`
- Removed `Registry::try_with_resource_and_retriever` - use `Registry::options().retriever()` instead
- Registry creation is now consistently done through the builder pattern

```rust
// Before (0.28.x)
let registry = Registry::options()
.draft(Draft::Draft7)
.try_new(
"http://example.com/schema",
resource
)?;

let registry = Registry::options()
.draft(Draft::Draft7)
.try_from_resources([
("http://example.com/schema", resource)
].into_iter())?;

let registry = Registry.try_with_resource_and_retriever(
"http://example.com/schema",
resource,
retriever
)?;

// After (0.29.0)
let registry = Registry::options()
.draft(Draft::Draft7)
.build([
("http://example.com/schema", resource)
])?;

let registry = Registry::options()
.draft(Draft::Draft7)
.build([
("http://example.com/schema", resource)
])?;

let registry = Registry::options()
.retriever(retriever)
.build(resources)?;

### Added

- Support non-blocking retrieval for external resources during schema resolution via the new `resolve-async` feature. [#385](https://github.com/Stranger6667/jsonschema/issues/385)
Expand Down

0 comments on commit d8df940

Please sign in to comment.