Search Results for

    Show / Hide Table of Contents

    Class ApiVersioningExtensions

    Defines a collection of extensions for API versioning.

    Inheritance
    System.Object
    ApiVersioningExtensions
    Namespace: MADE.Web.Extensions
    Assembly: MADE.Web.dll
    Syntax
    public static class ApiVersioningExtensions : object

    Methods

    | Improve this Doc View Source

    AddApiVersionHeaderSupport(IServiceCollection, String, Int32, Int32)

    Adds request header API versioning for controllers and APIs to the specified services collection.

    Declaration
    public static IServiceCollection AddApiVersionHeaderSupport(this IServiceCollection services, string apiHeaderName = "x-api-version", int defaultMajor = 1, int defaultMinor = 0)
    Parameters
    Type Name Description
    IServiceCollection services

    The services available in the application.

    System.String apiHeaderName

    The name of the header that is required when making requests to API endpoints. Default, x-api-version.

    System.Int32 defaultMajor

    The default major version of the API. Default, 1.

    System.Int32 defaultMinor

    The default minor version of the API. Default, 0.

    Returns
    Type Description
    IServiceCollection

    The configured services object.

    | Improve this Doc View Source

    AddApiVersionSupport(IServiceCollection, Int32, Int32)

    Adds request API versioning for controllers and APIs to the specified services collection.

    Declaration
    public static IServiceCollection AddApiVersionSupport(this IServiceCollection services, int defaultMajor = 1, int defaultMinor = 0)
    Parameters
    Type Name Description
    IServiceCollection services

    The services available in the application.

    System.Int32 defaultMajor

    The default major version of the API. Default, 1.

    System.Int32 defaultMinor

    The default minor version of the API. Default, 0.

    Returns
    Type Description
    IServiceCollection

    The configured services object.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps