Skip to content

Commit 62718ce

Browse files
committed
Add OpenAPI dialect support and expose registration functions
1 parent fef4665 commit 62718ce

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ All files | 81.81 | 66.66 | 80 | 88.88 |
2626

2727
## Limitations
2828

29-
The following are know limitations I'm hopeful can be addressed.
29+
The following are known limitations I'm hopeful can be addressed.
3030

3131
- Coverage can only be reported for `**/*.schema.json` and `**/schema.json`
3232
files.
3333
- Coverage can't be reported for embedded schemas.
3434
- Schemas in YAML aren't supported.
35-
- Custom vocabularies aren't supported.
36-
- There's no way to load schemas.
3735

3836
## Vitest
3937

src/vitest/coverage-provider.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import "@hyperjump/json-schema/draft-2019-09";
1515
import "@hyperjump/json-schema/draft-07";
1616
import "@hyperjump/json-schema/draft-06";
1717
import "@hyperjump/json-schema/draft-04";
18+
import "@hyperjump/json-schema/openapi-3-0";
19+
import "@hyperjump/json-schema/openapi-3-1";
1820
import { compile, getSchema } from "@hyperjump/json-schema/experimental";
1921
import { astToCoverageMap } from "../coverage-util.js";
2022
import { fromJson } from "../json-util.js";

src/vitest/json-schema-matcher.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import "@hyperjump/json-schema/draft-2019-09";
66
import "@hyperjump/json-schema/draft-07";
77
import "@hyperjump/json-schema/draft-06";
88
import "@hyperjump/json-schema/draft-04";
9+
import "@hyperjump/json-schema/openapi-3-0";
10+
import "@hyperjump/json-schema/openapi-3-1";
911
import { BASIC } from "@hyperjump/json-schema/experimental";
1012
import { TestCoverageEvaluationPlugin } from "../test-coverage-evaluation-plugin.js";
1113

@@ -57,3 +59,5 @@ export const matchJsonSchema = async (instance, uriOrSchema) => {
5759
};
5860

5961
export const toMatchJsonSchema = matchJsonSchema;
62+
export { registerSchema, unregisterSchema } from "@hyperjump/json-schema/draft-2020-12";
63+
export { loadDialect, defineVocabulary, addKeyword } from "@hyperjump/json-schema/experimental";

0 commit comments

Comments
 (0)