src/AspNetCore/Mvc/Mvc/src/JsonProblemDetails/IJsonProblemDetailsBuilderExtensions.cs
/// <summary>
/// This methods adds json problem details abilities to <see cref="ApiVersioningOptions"/> via 
/// <see cref="OptionsServiceCollectionExtensions.Configure{TOptions}(IServiceCollection, Action{TOptions})"/>.
/// This means the order of configuring <see cref="ApiVersioningOptions"/> matters. You have to call it after
/// <see cref="ApiVersioningServiceCollectionExtensions.AddApiVersioning(IServiceCollection)"/>.
/// </summary>
This methods adds json problem details abilities to  via
.
This means the order of configuring  matters. You have to call it after
.
This methods adds json problem details abilities to via . This means the order of configuring matters . You have to call it after .
public static IJsonProblemDetailsBuilder ConfigureApiVersioningOptions(this IJsonProblemDetailsBuilder builder)
        {
            var services = builder.Services ?? throw new ArgumentException();
            services.AddOptions<ApiVersioningOptions>().Configure<ProblemDetailsMiddlewareContextProvider>((options, problemDetailsMiddlewareContextProvider) => {
                options.ErrorResponses = new ApiVersionProblemDetailsResponseProvider(problemDetailsMiddlewareContextProvider);
            });
            return builder;
        }
public static IJsonProblemDetailsBuilder ConfigureApiVersioningOptions ( this IJsonProblemDetailsBuilder builder ) { var services = builder . Services ?? throw new ArgumentException ( ) ; services . AddOptions < ApiVersioningOptions > ( ) . Configure < ProblemDetailsMiddlewareContextProvider > ( ( options , problemDetailsMiddlewareContextProvider ) => { options . ErrorResponses = new ApiVersionProblemDetailsResponseProvider ( problemDetailsMiddlewareContextProvider ) ; } ) ; return builder ; }
This methods adds json problem details abilities to  via
.
This methods adds json problem details abilities to via .
IJsonProblemDetailsBuilder
this