Skip to content

Add support for OpenAPI SpecificationExtensions to the SwaggerExample.Create method #223

Open
@TomBruns

Description

@TomBruns

I use this package to create multiple examples for request bodies that contain complex POCO objects, ex:

        public IEnumerable<SwaggerExample<AuthorizePaymentRequestDTO>> GetExamples()
        {
            yield return SwaggerExample.Create(
                name: "AUTH-SchemeCard-USD",
                summary: "Make a payment (in USD) using a Card",
                description: "This example shows a payment Auth request using a Card (plain text)",
                value: new AuthorizePaymentRequestDTO()
                {
                    MerchantCode = @"test",
                    Amount = new Shared.AmountDTO()
                    {
                        Value = 1000,
                        CurrencyCode = Shared.CurrencyCode.USD
                    }
                } 
              );
         }

Would you consider adding support for an Extensions property similar to the one here: OpenApiExample.Extensions Property

This is related to OpenAPI specification extensions

This capability could be used by some portal tools to extend example support to include example specific values for:

  • Custom HTTP Header Fields [FromHeader]
  • Path parameters [FromRoute]
  • Query String parameters [FromQuery]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions