Thanks for the PR, but the example is correct as is. https://spec.openapis.org/oas/3.1/schema-base is what you should use to validate an OpenAPI document. https://spec.openapis.org/oas/3.1/dialect/base could be used if you have just a JSON Schema that needs validation using the OpenAPI JSON Schema dialect. However, a better way to validate a schema is just to compile it. It's better because it does additional validation that can't be done with meta-schema validation.
registerSchema({ type: "string" }, "https://example.com/string", "https://spec.openapis.org/oas/3.1/dialect/base");
const validator = validate("https://example.com/string"); // Will throw InvalidSchemaError if there's something wrong with the schema
Thanks for the PR, but the example is correct as is.
https://spec.openapis.org/oas/3.1/schema-base
is what you should use to validate an OpenAPI document.https://spec.openapis.org/oas/3.1/dialect/base
could be used if you have just a JSON Schema that needs validation using the OpenAPI JSON Schema dialect. However, a better way to validate a schema is just to compile it. It's better because it does additional validation that can't be done with meta-schema validation.