Skip to content

Conversation

@odow
Copy link
Collaborator

@odow odow commented Jan 14, 2026

I'll comment in-line

backwards compatibility, `SingleIssue` is aliased to `ValidationResult`, so
existing `isa` checks will continue to work.
The `SingleIssue` type from v1.x has been removed and replaced by
`ValidationResult`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird to keep this only so isa works. If anyone is constructing them or trying to query field values it will break.


### 3. `diagnose` Function

The previously deprecated `diagnose` function has been removed. Use
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. This was from a long time ago.

### 4. Inverse Argument Order

The `validate` and `isvalid` functions where `schema` is the second argument
have been removed. `schema` must be the first argument.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here. There should be only one way to do things.

```julia
schema = Schema(Dict("type" => "object"))
schema.data["type"] # Works - maps to schema.spec
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was ever part of the public API

```julia
schema = Schema(Dict("type" => "object", "required" => ["foo"]))
isvalid(schema, Dict("bar" => 1)) # Returns false (v1.x behavior)
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weird one. The current code you added to work-around was un-tested. I've removed, we can always add it back if someone complains

Schema(spec::AbstractVector{UInt8}) = Schema(JSON.parse(spec))

# Boolean schemas are part of the draft6 specification.
function Schema(b::Bool)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@odow odow requested a review from quinnj January 14, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants