forked from SchemaStore/schemastore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Vector SIL Kit Registry Configuration (SchemaStore#3036)
* 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
Showing
13 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ative_test/sil-kit-registry-configuration/full-wrong-additional-root.silkit-registry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
15 changes: 15 additions & 0 deletions
15
...ative_test/sil-kit-registry-configuration/full-wrong-additional-root.silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
16 changes: 16 additions & 0 deletions
16
src/negative_test/sil-kit-registry-configuration/no-log-from-remotes.silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
15 changes: 15 additions & 0 deletions
15
src/negative_test/sil-kit-registry-configuration/no-remote-logging.silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
1 change: 1 addition & 0 deletions
1
src/negative_test/sil-kit-registry-configuration/not-object.sillkit.silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
1 change: 1 addition & 0 deletions
1
src/test/sil-kit-registry-configuration/empty.silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
20 changes: 20 additions & 0 deletions
20
src/test/sil-kit-registry-configuration/full.silkit-registry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
5 changes: 5 additions & 0 deletions
5
src/test/sil-kit-registry-configuration/logging.silkit-registry.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
src/test/sil-kit-registry-configuration/silkit-registry.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
src/test/sil-kit-registry-configuration/silkit-registry.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
13
src/test/sil-kit-registry-configuration/silkit-registry.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |