Skip to content

Request and response examples #140

@icnocop

Description

@icnocop

Hi.

Thank you for TypedSignalR.Client.DevTools.

I would like to request the ability to pre-fill a JSON template for user defined input types on hub methods.

For example:

Image

The feature would be similar to using
Swashbuckle.Examples
or
NSwag.Examples

I would then decorate a hub method with one or more examples from which the user can choose.

[SignalRRequestExample(typeof(UserDefinedType), typeof(UserDefinedTypeExample))]
public Task<UserDefinedType> Echo(UserDefinedType instance)
{
    ...
}

public class UserDefinedTypeExample : SignalRExampleProvider<UserDefinedType>
{
    public override UserDefinedType GetExample()
    {
        return new UserDefinedType
        {
            Guid = Guid.NewGuid();
            DateTime = DateTime.UtcNow;
        };
    }
}

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions