Skip to content

Commit

Permalink
Temp URL for schema
Browse files Browse the repository at this point in the history
  • Loading branch information
tig committed Sep 25, 2024
1 parent 062c449 commit 8df9b41
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Terminal.Gui/Configuration/ConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Terminal.Gui;
/// </para>
/// <para>
/// Settings are defined in JSON format, according to this schema:
/// https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json
/// https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json
/// </para>
/// <para>
/// Settings that will apply to all applications (global settings) reside in files named <c>config.json</c>.
Expand Down
4 changes: 2 additions & 2 deletions Terminal.Gui/Configuration/SettingsScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Terminal.Gui;
/// <example>
/// <code>
/// {
/// "$schema" : "https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json",
/// "$schema" : "https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json",
/// "Application.UseSystemConsole" : true,
/// "Theme" : "Default",
/// "Themes": {
Expand All @@ -32,7 +32,7 @@ public class SettingsScope : Scope<SettingsScope>
/// <summary>Points to our JSON schema.</summary>
[JsonInclude]
[JsonPropertyName ("$schema")]
public string Schema { get; set; } = "https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json";
public string Schema { get; set; } = "https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json";

/// <summary>Updates the <see cref="SettingsScope"/> with the settings in a JSON string.</summary>
/// <param name="stream">Json document to update the settings with.</param>
Expand Down
5 changes: 2 additions & 3 deletions Terminal.Gui/Resources/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
// note that not all values here will be recreated (e.g. the Light and Dark themes and any property initialized
// null).
//
// TODO: V2 - Reference via http
"$schema": "../../docfx/schemas/tui-config-schema.json",
"$schema": "https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json",

// Set this to true in a .config file to be loaded to cause JSON parsing errors
// to throw exceptions.
Expand All @@ -22,7 +21,7 @@
"Application.NextTabGroupKey": "F6",
"Application.PrevTabGroupKey": "Shift+F6",
"Application.QuitKey": "Esc",
"Application.ArrangeKey": "Ctrl+F5",
"Application.ArrangeKey": "Ctrl+F5",
"Key.Separator": "+",

"Theme": "Default",
Expand Down
2 changes: 1 addition & 1 deletion UICatalog/Resources/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json",
"$schema": "https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json",
"FileDialog.MaxSearchResults": 10000,
"FileDialogStyle.DefaultUseColors": false,
"FileDialogStyle.DefaultUseUnicodeCharacters": false,
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/Configuration/ConfigurationMangerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ public void TestConfigurationManagerUpdateFromJson ()
// Arrange
var json = @"
{
""$schema"": ""https://gui-cs.github.io/Terminal.Gui/schemas/tui-config-schema.json"",
""$schema"": ""https://gui-cs.github.io/Terminal.GuiV2Docs/schemas/tui-config-schema.json"",
""Application.QuitKey"": ""Alt-Z"",
""Theme"": ""Default"",
""Themes"": [
Expand Down
1 change: 0 additions & 1 deletion UnitTests/Configuration/KeyJsonConverterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void TestKey_Serialize (KeyCode key, string expected)
[InlineData (KeyCode.D4, "4")]
[InlineData (KeyCode.Esc, "Esc")]
[InlineData ((KeyCode)'+' | KeyCode.AltMask | KeyCode.CtrlMask, "Ctrl+Alt++")]
[InlineData ((KeyCode)'+' | KeyCode.AltMask | KeyCode.CtrlMask, "Ctrl+Alt++")]
public void TestKeyRoundTripConversion (KeyCode key, string expectedStringTo)
{
// Arrange
Expand Down

0 comments on commit 8df9b41

Please sign in to comment.