Skip to content

Commit 8d842da

Browse files
committed
Added ConfigureSom command to Swagger documentation
1 parent 0d73547 commit 8d842da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Configuration/Swagger.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ public void Apply(OpenApiSchema schema, SchemaFilterContext context)
180180
Mapping = new Dictionary<string, string>
181181
{
182182
[CommandTypeConstants.TriggerCapture] = "#/components/schemas/TriggerCaptureCommand",
183-
[CommandTypeConstants.TriggerPipeline] = "#/components/schemas/TriggerPipelineCommand"
183+
[CommandTypeConstants.TriggerPipeline] = "#/components/schemas/TriggerPipelineCommand",
184+
[CommandTypeConstants.ConfigureSom] = "#/components/schemas/ConfigureSomCommand"
184185
}
185186
};
186187
}
@@ -228,6 +229,13 @@ public void Apply(OpenApiSchema schema, SchemaFilterContext context)
228229
["mode"] = new OpenApiInteger(1)
229230
};
230231
}
232+
else if (context.Type == typeof(ConfigureSomCommand))
233+
{
234+
schema.Example = new OpenApiObject
235+
{
236+
["commandType"] = new OpenApiString(CommandTypeConstants.ConfigureSom)
237+
};
238+
}
231239
else if (context.Type == typeof(CreateFlightPlanDto))
232240
{
233241
schema.Example = new OpenApiObject

0 commit comments

Comments
 (0)