Skip to content

Commit

Permalink
Validate resolver before starting (close #65)
Browse files Browse the repository at this point in the history
  • Loading branch information
istreeter committed Oct 30, 2021
1 parent 96b9445 commit 5dbceaa
Show file tree
Hide file tree
Showing 5 changed files with 385 additions and 1 deletion.
@@ -0,0 +1,91 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for an Iglu resolver's configuration",
"self": {
"vendor": "com.snowplowanalytics.iglu",
"name": "resolver-config",
"format": "jsonschema",
"version": "1-0-0"
},

"type": "object",

"properties": {

"cacheSize": {
"type": "integer",
"minimum": 0
},

"repositories": {
"type": "array",
"items": {
"type": "object",

"properties": {

"name": {
"type": "string"
},

"priority": {
"type": "integer"
},

"vendorPrefixes": {
"type": "array",
"items": {
"type": "string"
}
},

"connection": {
"type": "object",
"oneOf": [
{
"properties": {
"embedded": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": ["path"],
"additionalProperties": false
}
},
"required": ["embedded"],
"additionalProperties": false
},
{
"properties": {
"http": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"format": "uri"
}
},
"required": ["uri"],
"additionalProperties": false
}
},
"required": ["http"],
"additionalProperties": false
}
]
}
},
"required": ["name", "priority", "vendorPrefixes", "connection"],
"additionalProperties": false
}
}

},

"required": ["cacheSize", "repositories"],
"additionalProperties": false
}

@@ -0,0 +1,93 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for an Iglu resolver's configuration",
"self": {
"vendor": "com.snowplowanalytics.iglu",
"name": "resolver-config",
"format": "jsonschema",
"version": "1-0-1"
},

"type": "object",

"properties": {

"cacheSize": {
"type": "integer",
"minimum": 0
},

"repositories": {
"type": "array",
"items": {
"type": "object",

"properties": {

"name": {
"type": "string"
},

"priority": {
"type": "integer"
},

"vendorPrefixes": {
"type": "array",
"items": {
"type": "string"
}
},

"connection": {
"type": "object",
"oneOf": [
{
"properties": {
"embedded": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": ["path"],
"additionalProperties": false
}
},
"required": ["embedded"],
"additionalProperties": false
},
{
"properties": {
"http": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"format": "uri"
},
"apikey": {
"type": ["string", "null"]
}
},
"required": ["uri"],
"additionalProperties": false
}
},
"required": ["http"],
"additionalProperties": false
}
]
}
},
"required": ["name", "priority", "vendorPrefixes", "connection"],
"additionalProperties": false
}
}

},

"required": ["cacheSize", "repositories"],
"additionalProperties": false
}
@@ -0,0 +1,97 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for an Iglu resolver's configuration",
"self": {
"vendor": "com.snowplowanalytics.iglu",
"name": "resolver-config",
"format": "jsonschema",
"version": "1-0-2"
},

"type": "object",

"properties": {

"cacheSize": {
"type": "number"
},

"cacheTtl": {
"type": ["integer", "null"],
"minimum": 1
},

"repositories": {
"type": "array",
"items": {
"type": "object",

"properties": {

"name": {
"type": "string"
},

"priority": {
"type": "number"
},

"vendorPrefixes": {
"type": "array",
"items": {
"type": "string"
}
},

"connection": {
"type": "object",
"oneOf": [
{
"properties": {
"embedded": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": ["path"],
"additionalProperties": false
}
},
"required": ["embedded"],
"additionalProperties": false
},
{
"properties": {
"http": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"format": "uri"
},
"apikey": {
"type": ["string", "null"]
}
},
"required": ["uri"],
"additionalProperties": false
}
},
"required": ["http"],
"additionalProperties": false
}
]
}
},
"required": ["name", "priority", "vendorPrefixes", "connection"],
"additionalProperties": false
}
}

},

"required": ["cacheSize", "repositories"],
"additionalProperties": false
}
@@ -0,0 +1,97 @@
{
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
"description": "Schema for an Iglu resolver's configuration",
"self": {
"vendor": "com.snowplowanalytics.iglu",
"name": "resolver-config",
"format": "jsonschema",
"version": "1-0-3"
},

"type": "object",

"properties": {

"cacheSize": {
"type": "number"
},

"cacheTtl": {
"type": ["integer", "null"],
"minimum": 0
},

"repositories": {
"type": "array",
"items": {
"type": "object",

"properties": {

"name": {
"type": "string"
},

"priority": {
"type": "number"
},

"vendorPrefixes": {
"type": "array",
"items": {
"type": "string"
}
},

"connection": {
"type": "object",
"oneOf": [
{
"properties": {
"embedded": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
},
"required": ["path"],
"additionalProperties": false
}
},
"required": ["embedded"],
"additionalProperties": false
},
{
"properties": {
"http": {
"type": "object",
"properties": {
"uri": {
"type": "string",
"format": "uri"
},
"apikey": {
"type": ["string", "null"]
}
},
"required": ["uri"],
"additionalProperties": false
}
},
"required": ["http"],
"additionalProperties": false
}
]
}
},
"required": ["name", "priority", "vendorPrefixes", "connection"],
"additionalProperties": false
}
}

},

"required": ["cacheSize", "repositories"],
"additionalProperties": false
}

0 comments on commit 5dbceaa

Please sign in to comment.