Ad default constructors to appease Swagger gen
This commit is contained in:
parent
a64675817a
commit
142d42d00c
|
|
@ -1,13 +1,74 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
namespace Elsa.Server.Api.Endpoints.Signals
|
||||
{
|
||||
public record DispatchSignalRequest(string? WorkflowInstanceId, string? CorrelationId, object? Input);
|
||||
public record DispatchSignalRequest
|
||||
{
|
||||
// Need this for Swagger.
|
||||
public DispatchSignalRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public DispatchSignalRequest(string? workflowInstanceId, string? correlationId, object? input)
|
||||
{
|
||||
WorkflowInstanceId = workflowInstanceId;
|
||||
CorrelationId = correlationId;
|
||||
Input = input;
|
||||
}
|
||||
|
||||
public record DispatchSignalResponse(ICollection<PendingWorkflow> StartedWorkflows);
|
||||
public string? WorkflowInstanceId { get; init; }
|
||||
public string? CorrelationId { get; init; }
|
||||
public object? Input { get; init; }
|
||||
}
|
||||
|
||||
public record ExecuteSignalRequest(string? WorkflowInstanceId, string? CorrelationId, object? Input);
|
||||
public record DispatchSignalResponse
|
||||
{
|
||||
// Need this for Swagger.
|
||||
public DispatchSignalResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public DispatchSignalResponse(ICollection<PendingWorkflow> startedWorkflows)
|
||||
{
|
||||
StartedWorkflows = startedWorkflows;
|
||||
}
|
||||
|
||||
public record ExecuteSignalResponse(ICollection<StartedWorkflow> StartedWorkflows);
|
||||
public ICollection<PendingWorkflow> StartedWorkflows { get; init; } = default!;
|
||||
}
|
||||
|
||||
public record ExecuteSignalRequest
|
||||
{
|
||||
// Need this for Swagger.
|
||||
public ExecuteSignalRequest()
|
||||
{
|
||||
}
|
||||
|
||||
public ExecuteSignalRequest(string? workflowInstanceId, string? correlationId, object? input)
|
||||
{
|
||||
WorkflowInstanceId = workflowInstanceId;
|
||||
CorrelationId = correlationId;
|
||||
Input = input;
|
||||
}
|
||||
|
||||
public string? WorkflowInstanceId { get; init; }
|
||||
public string? CorrelationId { get; init; }
|
||||
public object? Input { get; init; }
|
||||
}
|
||||
|
||||
public record ExecuteSignalResponse
|
||||
{
|
||||
// Need this for Swagger.
|
||||
public ExecuteSignalResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public ExecuteSignalResponse(ICollection<StartedWorkflow> startedWorkflows)
|
||||
{
|
||||
StartedWorkflows = startedWorkflows;
|
||||
}
|
||||
|
||||
public ICollection<StartedWorkflow> StartedWorkflows { get; init; } = new List<StartedWorkflow>();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue