Skip to content

Commit f80c8cc

Browse files
committed
requiredがfalseであるサンプルも追加
1 parent d5e46a1 commit f80c8cc

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CommandForgeGenerator.Tests/GenerateSampleTextCommand.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,27 @@ public partial class TextCommand : ICommandForgeCommand
88

99
public readonly string Character;
1010
public readonly string? Body;
11+
public readonly string? VoiceId;
1112

1213

1314
public static TextCommand Create(int commandId, global::Newtonsoft.Json.Linq.JToken json)
1415
{
1516

1617
var Character = (string)json["character"];
1718
var Body = json["body"] == null ? null : (string)json["body"];
19+
var VoiceId = json["voiceId"] == null ? null : (string)json["voiceId"];
1820

1921

20-
return new TextCommand(commandId, Character, Body);
22+
return new TextCommand(commandId, Character, Body, VoiceId);
2123
}
2224

23-
public TextCommand(int commandId, string Character, string? Body)
25+
public TextCommand(int commandId, string Character, string? Body, string? VoiceId)
2426
{
2527
CommandId = (CommandId)commandId;
2628

2729
this.Character = Character;
2830
this.Body = Body;
31+
this.VoiceId = VoiceId;
2932

3033
}
3134
}

CommandForgeGenerator.Tests/Test.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ string GetSampleYaml()
8686
body:
8787
type: string
8888
multiline: true
89+
voiceId:
90+
type: string
91+
multiline: true
92+
required: false
8993
9094
- id: emote
9195
label: エモート

0 commit comments

Comments
 (0)