Skip to content

Commit

Permalink
Add Vector SIL Kit Registry Configuration (SchemaStore#3036)
Browse files Browse the repository at this point in the history
* Add Vector SIL Kit Registry Configuration.

* Change supported file matches for Vector SIL Kit Registry Configuration.

* Remove modifications to package lock.

* Fix Prettier errors for Vector SIL Kit Registry Configuration.

* Fix positive test failure in SIL Kit Registry Configuration Schema

* Fix schema and tests for SIL Kit Registry Configuration.

* Remove 'remote' option for Logging in SIL Kit Registry Configuration Schema.

* Remove LogFromRemotes from SIL Kit Registry Configuration Schema.
  • Loading branch information
cam-laf authored and Javier Matias-Cabrera committed Jul 19, 2023
1 parent 781cfbc commit 250ea6f
Show file tree
Hide file tree
Showing 13 changed files with 232 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -3357,6 +3357,19 @@
],
"url": "https://json.schemastore.org/sil-kit-participant-configuration.json"
},
{
"name": "SIL Kit Registry Configuration",
"description": "Configuration file for Vector SIL Kit Registry Service",
"fileMatch": [
"silkit-registry.yaml",
"silkit-registry.yml",
"silkit-registry.json",
"*.silkit-registry.yaml",
"*.silkit-registry.yml",
"*.silkit-registry.json"
],
"url": "https://json.schemastore.org/sil-kit-registry-configuration.json"
},
{
"name": "size-limit configuration",
"description": "Configuration file for size-limit",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "Registryonfiguration.schema.json",
"Description": "Sample Registry Configuration using all fields",
"Logging": {
"Sinks": [
{
"Level": "Trace",
"LogName": "Trace",
"Type": "File"
},
{
"Level": "Info",
"Type": "Stdout"
},
{
"Level": "Error",
"Type": "File"
}
],
"FlushLevel": "Warn"
},
"SchemaVersion": 0,
"SomeAdditionalField": "This is not valid"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'$schema': RegistryConfiguration.schema.json
SchemaVersion: 0
Description: Sample Registry Configuration using all fields
SomeAdditionalField: This is not valid
Logging:
Sinks:
- Level: Trace
LogName: Trace
Type: File
- Level: Info
Type: Stdout
- Level: Error
Type: File
FlushLevel: Warn
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'$schema': RegistryConfiguration.schema.json
SchemaVersion: 0
Description: Sample Registry Configuration using all fields
SomeAdditionalField: This is not valid
Logging:
Sinks:
- Level: Trace
LogName: Trace
Type: File
- Level: Info
Type: Stdout
- Level: Error
Type: File
FlushLevel: Warn
LogFromRemotes: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
'$schema': RegistryConfiguration.schema.json
SchemaVersion: 0
Description: Sample Registry Configuration using all fields
Logging:
Sinks:
- Level: Trace
LogName: Trace
Type: File
- Level: Info
Type: Stdout
- Level: Error
Type: Remote
LogFromRemotes: true
FlushLevel: Warn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5
76 changes: 76 additions & 0 deletions src/schemas/json/sil-kit-registry-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"Logging": {
"type": "object",
"description": "Configures the properties of the SIL Kit Logging Service",
"properties": {
"FlushLevel": {
"type": "string",
"enum": ["Critical", "Error", "Warn", "Info", "Debug", "Trace", "Off"]
},
"Sinks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"enum": ["File", "Stdout"]
},
"Level": {
"type": "string",
"enum": [
"Critical",
"Error",
"Warn",
"Info",
"Debug",
"Trace",
"Off"
],
"default": "Info"
},
"LogName": {
"type": "string",
"description": "Log name; Results in the following filename: <LogName>_%y-%m-%dT%h-%m-%s.txt"
}
},
"additionalProperties": false,
"required": ["Type"]
}
}
},
"additionalProperties": false,
"required": ["Sinks"]
}
},
"description": "JSON schema for SIL KIT Registry configuration files.",
"properties": {
"$schema": {
"type": "string",
"description": "The schema file",
"default": "",
"examples": ["./RegistryConfiguration.schema.json"]
},
"SchemaVersion": {
"anyOf": [{ "type": "integer" }, { "type": "string" }],
"default": 0,
"description": "Version of the schema used to validate this document"
},
"Description": {
"type": "string",
"description": "Free text field allowing a user to describe the configuration file in their own words. The contents of this field are not parsed or used internally.",
"default": ""
},
"ListenUri": {
"type": "string",
"description": "The configured registry instance will listen on this address for incoming connections. Optional; This field overrides the -u, and --listen-uri command line parameters."
},
"Logging": {
"$ref": "#/definitions/Logging"
}
},
"type": "object"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
20 changes: 20 additions & 0 deletions src/test/sil-kit-registry-configuration/full.silkit-registry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "RegistryConfiguration.schema.json",
"Description": "This is a registry configuration description",
"ListenUri": "silkit://0.0.0.0:8501",
"Logging": {
"Sinks": [
{
"Level": "Trace",
"LogName": "Trace",
"Type": "File"
},
{
"Level": "Info",
"Type": "Stdout"
}
],
"FlushLevel": "Warn"
},
"SchemaVersion": "2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Description: Sample configuration for CAN
Logging:
Sinks:
- Level: Info
Type: Stdout
20 changes: 20 additions & 0 deletions src/test/sil-kit-registry-configuration/silkit-registry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "RegistryConfiguration.schema.json",
"Description": "This is a registry configuration description",
"ListenUri": "silkit://0.0.0.0:8501",
"Logging": {
"Sinks": [
{
"Level": "Trace",
"LogName": "Trace",
"Type": "File"
},
{
"Level": "Info",
"Type": "Stdout"
}
],
"FlushLevel": "Warn"
},
"SchemaVersion": 2
}
13 changes: 13 additions & 0 deletions src/test/sil-kit-registry-configuration/silkit-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'$schema': RegistryConfiguration.schema.json
SchemaVersion: 2
Description: Sample Registry Configuration using all fields
ListenUri: silkit://0.0.0.0:8501
Logging:
Sinks:
- Level: Trace
LogName: Trace
Type: File
- Level: Info
Type: Stdout
FlushLevel: Warn
13 changes: 13 additions & 0 deletions src/test/sil-kit-registry-configuration/silkit-registry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'$schema': RegistryConfiguration.schema.json
SchemaVersion: 2
Description: Sample Registry Configuration using all fields
ListenUri: silkit://0.0.0.0:8501
Logging:
Sinks:
- Level: Trace
LogName: Trace
Type: File
- Level: Info
Type: Stdout
FlushLevel: Warn

0 comments on commit 250ea6f

Please sign in to comment.