diff --git a/core/src/main/java/io/github/sebastiantoepfer/jsonschema/core/vocab/core/VocabularyKeywordType.java b/core/src/main/java/io/github/sebastiantoepfer/jsonschema/core/vocab/core/VocabularyKeywordType.java index 92177c7f..764ae661 100644 --- a/core/src/main/java/io/github/sebastiantoepfer/jsonschema/core/vocab/core/VocabularyKeywordType.java +++ b/core/src/main/java/io/github/sebastiantoepfer/jsonschema/core/vocab/core/VocabularyKeywordType.java @@ -25,6 +25,7 @@ import io.github.sebastiantoepfer.jsonschema.InstanceType; import io.github.sebastiantoepfer.jsonschema.JsonSchema; +import io.github.sebastiantoepfer.jsonschema.keyword.Identifier; import io.github.sebastiantoepfer.jsonschema.keyword.Keyword; import io.github.sebastiantoepfer.jsonschema.keyword.KeywordType; import io.github.sebastiantoepfer.jsonschema.vocabulary.spi.VocabularyDefinition; @@ -32,8 +33,6 @@ import jakarta.json.JsonObject; import jakarta.json.JsonValue; import java.net.URI; -import java.util.Collection; -import java.util.List; import java.util.Objects; import java.util.stream.Stream; @@ -62,7 +61,7 @@ public Keyword createKeyword(final JsonSchema schema, final JsonValue value) { return result; } - public final class VocabularyKeyword implements Keyword, VocabularyDefinitions { + public final class VocabularyKeyword implements Identifier, VocabularyDefinitions { private final JsonObject vocabularies; @@ -75,8 +74,8 @@ public final class VocabularyKeyword implements Keyword, VocabularyDefinitions { } @Override - public Collection categories() { - return List.of(); + public URI asUri() { + return definitions().map(VocabularyDefinition::id).findFirst().orElseThrow(); } @Override