Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class Ajv extends AjvCore {
: draft4MetaSchema
this.addMetaSchema(metaSchema, META_SCHEMA_ID, false)
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID

// Add a copy of the schema for HTTPS references:
const httpsId = META_SCHEMA_ID.replace(/^http:/, "https:")
const httpsSchema = JSON.parse(JSON.stringify(metaSchema)) as AnySchemaObject
httpsSchema.id = httpsSchema.$schema = httpsId + "#"
this.addMetaSchema(httpsSchema, httpsId, false)
}

defaultMeta(): string | AnySchemaObject | undefined {
Expand Down