diff --git a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs index 123ce39a..cf70e95f 100644 --- a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs +++ b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs @@ -117,6 +117,16 @@ public string Generate() case HttpStatusCode.OK: AppendAddSuccessResponseForStatusCodeOk(sb, responseModel); break; + case HttpStatusCode.NotFound: + if (string.IsNullOrEmpty(customErrorResponseModel)) + { + sb.AppendLine(8, $"responseBuilder.AddErrorResponse(HttpStatusCode.{responseModel.StatusCode});"); + } + else + { + sb.AppendLine(8, $"responseBuilder.AddErrorResponse<{customErrorResponseModel}>(HttpStatusCode.{responseModel.StatusCode});"); + } + break; case HttpStatusCode.BadRequest: if (string.IsNullOrEmpty(customErrorResponseModel)) { @@ -153,7 +163,6 @@ public string Generate() case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: diff --git a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResult.cs b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResult.cs index 9b7bb12a..cca7359d 100644 --- a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResult.cs +++ b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResult.cs @@ -236,6 +236,13 @@ private void AppendContentWithProblemDetails( sb.AppendLine(); AppendMethodContentStatusCodeOk(sb, responseModel); break; + case HttpStatusCode.NotFound: + sb.AppendLine(); + sb.AppendLine(4, $"public string? {responseModel.StatusCode.ToNormalizedString()}Content"); + sb.AppendLine(8, $"=> Is{responseModel.StatusCode.ToNormalizedString()} && ContentObject is string result"); + sb.AppendLine(12, "? result"); + sb.AppendLine(12, $": throw new InvalidOperationException(\"Content is not the expected type - please use the Is{responseModel.StatusCode.ToNormalizedString()} property first.\");"); + break; case HttpStatusCode.BadRequest: sb.AppendLine(); sb.AppendLine(4, $"public ValidationProblemDetails {responseModel.StatusCode.ToNormalizedString()}Content"); @@ -270,7 +277,6 @@ private void AppendContentWithProblemDetails( case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: diff --git a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResultInterface.cs b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResultInterface.cs index 2e335d01..dde62092 100644 --- a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResultInterface.cs +++ b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpointResultInterface.cs @@ -211,6 +211,10 @@ private void AppendContentWithProblemDetails( sb.AppendLine(); AppendMethodContentStatusCodeOk(sb, responseModel); break; + case HttpStatusCode.NotFound: + sb.AppendLine(); + sb.AppendLine(4, $"string? {responseModel.StatusCode.ToNormalizedString()}Content {{ get; }}"); + break; case HttpStatusCode.BadRequest: sb.AppendLine(); sb.AppendLine(4, $"ValidationProblemDetails {responseModel.StatusCode.ToNormalizedString()}Content {{ get; }}"); @@ -242,7 +246,6 @@ private void AppendContentWithProblemDetails( case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: diff --git a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerEndpoints.cs b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerEndpoints.cs index 9491dfbe..efb74b77 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerEndpoints.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerEndpoints.cs @@ -202,6 +202,7 @@ private static void AppendProducesWithProblemDetails( break; case HttpStatusCode.Accepted: case HttpStatusCode.Created: + case HttpStatusCode.NotFound: sb.Append(12, $".Produces(StatusCodes.{responseModel.StatusCode.ToStatusCodesConstant()})"); break; case HttpStatusCode.EarlyHints: @@ -229,7 +230,6 @@ private static void AppendProducesWithProblemDetails( case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: diff --git a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerResult.cs b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerResult.cs index 52516e28..ee471dd4 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerResult.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ContentGenerators/ContentGeneratorServerResult.cs @@ -144,9 +144,12 @@ private void AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails( case HttpStatusCode.Accepted: case HttpStatusCode.Created: sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? uri = null)"); - sb.AppendLine(8, $"=> new(Results.Problem(uri, null, StatusCodes.{item.ResponseModel.StatusCode.ToStatusCodesConstant()}));"); + sb.AppendLine(8, $"=> new(TypedResults.{item.ResponseModel.StatusCode}(uri));"); break; case HttpStatusCode.NotFound: + sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? message = null)"); + sb.AppendLine(8, $"=> new(TypedResults.{item.ResponseModel.StatusCode}(message));"); + break; case HttpStatusCode.Conflict: sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? message = null)"); sb.AppendLine(8, $"=> new(Results.Problem(message, null, StatusCodes.{item.ResponseModel.StatusCode.ToStatusCodesConstant()}));"); diff --git a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerApiGenerator.cs b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerApiGenerator.cs index c87b3e55..3b8529f7 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerApiGenerator.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Minimal/ProjectGenerator/ServerApiGenerator.cs @@ -351,9 +351,6 @@ public void MaintainGlobalUsings( requiredUsings.Add("Atc.Rest.MinimalApi.Filters.Endpoints"); } - // TODO: Check for any use ?? - requiredUsings.Add("Microsoft.AspNetCore.Authorization"); - if (operationSchemaMappings.Any(apiOperation => apiOperation.Model.IsShared)) { requiredUsings.Add($"{projectName}.{ContentGeneratorConstants.Contracts}"); diff --git a/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerController.cs b/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerController.cs index 6b7f509e..4ad0ebe8 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerController.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerController.cs @@ -130,6 +130,9 @@ private static void AppendProducesWithProblemDetails( case HttpStatusCode.OK: AppendProducesForOk(sb, responseModel); break; + case HttpStatusCode.NotFound: + sb.AppendLine(4, $"[ProducesResponseType(typeof(string), StatusCodes.{responseModel.StatusCode.ToStatusCodesConstant()})]"); + break; case HttpStatusCode.BadRequest: sb.AppendLine(4, $"[ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.{responseModel.StatusCode.ToStatusCodesConstant()})]"); break; @@ -160,7 +163,6 @@ private static void AppendProducesWithProblemDetails( case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: diff --git a/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerResult.cs b/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerResult.cs index fe3bc23a..0659c862 100644 --- a/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerResult.cs +++ b/src/Atc.Rest.ApiGenerator.Framework.Mvc/ContentGenerators/ContentGeneratorServerResult.cs @@ -83,11 +83,11 @@ private void AppendMethodContent( { if (useProblemDetailsAsDefaultResponseBody) { - AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails(sb, item, resultName); + AppendMethodContentForOtherStatusCodesThanOkWithProblemDetails(sb, item, resultName); } else { - AppendMethodContentForOtherStatusCodesThenOkWithoutProblemDetails(sb, item, resultName); + AppendMethodContentForOtherStatusCodesThanOkWithoutProblemDetails(sb, item, resultName); } } } @@ -146,7 +146,7 @@ private void AppendMethodContentStatusCodeOk( } } - private void AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails( + private void AppendMethodContentForOtherStatusCodesThanOkWithProblemDetails( StringBuilder sb, ContentGeneratorServerResultMethodParameters item, string resultName) @@ -160,6 +160,10 @@ private void AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails( sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? uri = null)"); sb.AppendLine(8, $"=> new {resultName}({nameof(Results.ResultFactory)}.{nameof(Results.ResultFactory.CreateContentResult)}({nameof(HttpStatusCode)}.{item.ResponseModel.StatusCode}, uri));"); break; + case HttpStatusCode.NotFound: + sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? message = null)"); + sb.AppendLine(8, $"=> new {resultName}(new {item.ResponseModel.StatusCode.ToNormalizedString()}ObjectResult(message));"); + break; case HttpStatusCode.BadRequest: sb.AppendLine(4, $"public static {resultName} {item.ResponseModel.StatusCode.ToNormalizedString()}(string? message = null)"); sb.AppendLine(8, $"=> new {resultName}({nameof(Results.ResultFactory)}.{nameof(Results.ResultFactory.CreateContentResultWithValidationProblemDetails)}({nameof(HttpStatusCode)}.{item.ResponseModel.StatusCode}, message));"); @@ -190,7 +194,6 @@ private void AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails( case HttpStatusCode.Unauthorized: case HttpStatusCode.PaymentRequired: case HttpStatusCode.Forbidden: - case HttpStatusCode.NotFound: case HttpStatusCode.MethodNotAllowed: case HttpStatusCode.NotAcceptable: case HttpStatusCode.ProxyAuthenticationRequired: @@ -233,7 +236,7 @@ private void AppendMethodContentForOtherStatusCodesThenOkWithProblemDetails( } } - private void AppendMethodContentForOtherStatusCodesThenOkWithoutProblemDetails( + private void AppendMethodContentForOtherStatusCodesThanOkWithoutProblemDetails( StringBuilder sb, ContentGeneratorServerResultMethodParameters item, string resultName) diff --git a/src/Atc.Rest.ApiGenerator.Framework/Helpers/StringBuilderEndpointHelper.cs b/src/Atc.Rest.ApiGenerator.Framework/Helpers/StringBuilderEndpointHelper.cs index 04008887..24250760 100644 --- a/src/Atc.Rest.ApiGenerator.Framework/Helpers/StringBuilderEndpointHelper.cs +++ b/src/Atc.Rest.ApiGenerator.Framework/Helpers/StringBuilderEndpointHelper.cs @@ -38,6 +38,7 @@ public static void AppendMethodContentAuthorizationIfNeeded( var authRoles = authorizationForEndpoint.Roles is null ? null : string.Join(',', authorizationForEndpoint.Roles); + var authSchemes = authorizationForEndpoint.AuthenticationSchemes is null ? null : string.Join(',', authorizationForEndpoint.AuthenticationSchemes); diff --git a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs index 79065007..1e07398d 100644 --- a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs +++ b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiDocumentExtensions.cs @@ -364,7 +364,7 @@ public static bool IsUsingRequiredForMicrosoftAspNetCoreAuthorization( foreach (var openApiPath in openApiDocument.Paths) { var isAuthenticationRequired = openApiPath.Value.Extensions.ExtractAuthenticationRequired(); - if (isAuthenticationRequired is not null && isAuthenticationRequired.Value) + if (isAuthenticationRequired is not null) { return true; } @@ -377,7 +377,7 @@ public static bool IsUsingRequiredForMicrosoftAspNetCoreAuthorization( } var isOperationAuthenticationRequired = apiOperationPair.Value.Extensions.ExtractAuthenticationRequired(); - if (isOperationAuthenticationRequired is not null && isOperationAuthenticationRequired.Value) + if (isOperationAuthenticationRequired is not null) { return true; } diff --git a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiPathItemExtensions.cs b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiPathItemExtensions.cs index 0ac111e8..6f5f9fb5 100644 --- a/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiPathItemExtensions.cs +++ b/src/Atc.Rest.ApiGenerator.OpenApi/Extensions/OpenApiPathItemExtensions.cs @@ -56,7 +56,7 @@ public static string GetApiGroupName( if ((authorizationRoles is null || authorizationRoles.Count == 0) && (authenticationSchemes is null || authenticationSchemes.Count == 0) && - authenticationRequiredForPath.HasValueAndFalse()) + authenticationRequiredForPath is null) { return null; } diff --git a/src/Atc.Rest.ApiGenerator/Generators/ServerApiGenerator.cs b/src/Atc.Rest.ApiGenerator/Generators/ServerApiGenerator.cs index 62d59918..4ed70508 100644 --- a/src/Atc.Rest.ApiGenerator/Generators/ServerApiGenerator.cs +++ b/src/Atc.Rest.ApiGenerator/Generators/ServerApiGenerator.cs @@ -79,8 +79,7 @@ public async Task Generate() serverApiGeneratorMvc.GenerateEndpoints(); serverApiGeneratorMvc.MaintainApiSpecification(projectOptions.DocumentFile); - serverApiGeneratorMvc.MaintainGlobalUsings( - projectOptions.ApiOptions.Generator.RemoveNamespaceGroupSeparatorInGlobalUsings); + serverApiGeneratorMvc.MaintainGlobalUsings(projectOptions.ApiOptions.Generator.RemoveNamespaceGroupSeparatorInGlobalUsings); } else { @@ -94,8 +93,7 @@ public async Task Generate() serverApiGeneratorMinimalApi.GenerateEndpoints(); serverApiGeneratorMinimalApi.MaintainApiSpecification(projectOptions.DocumentFile); - serverApiGeneratorMinimalApi.MaintainGlobalUsings( - projectOptions.ApiOptions.Generator.RemoveNamespaceGroupSeparatorInGlobalUsings); + serverApiGeneratorMinimalApi.MaintainGlobalUsings(projectOptions.ApiOptions.Generator.RemoveNamespaceGroupSeparatorInGlobalUsings); } return true; diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs index 264159b6..7913a85a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface ISetAccountNameEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs index 72f164a3..28fc1b63 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUpdateAccountNameEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs index 6def8c88..afc2bbdd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new SetAccountNameEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs index 6380a491..0f8147c5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs index 075ba1ad..3a6eaa86 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UpdateAccountNameEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs index d5de9b2c..b427c3bd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs index d581adaa..c31d3a41 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetAddressesByPostalCodesEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs index f04dc19d..6bb7505d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs index 820db63e..9ac36c73 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetAddressesByPostalCodesEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } IEnumerable
OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs index 13cf0f3b..1d1d9169 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetEventArgByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs index 14813875..90e1b9ad 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,11 +38,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs index 97da800c..63dd7649 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetEventArgsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs index 1c15d9c7..856daae0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetEventArgsEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs index 944b6e04..9099e1ff 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs @@ -19,15 +19,11 @@ public interface IGetEventArgByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } DemoSample.ApiClient.Generated.Contracts.EventArgs.EventArgs OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs index f9f4dd56..7d1cc806 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetEventArgsEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs index e90dad63..8393fa33 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetFileByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs index e2b99e2c..3d4a64d1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs index a4665c4e..ee77feab 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetFileByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } byte[] OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs index 46ba7de1..62c1f1c4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadMultiFilesAsFormDataEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs index d70f6057..b19fedab 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleFileAsFormDataEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs index 2727d3f0..ef23793d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleObjectWithFileAsFormDataEndpointResult : IEndpoint bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs index c8d21023..463ec1eb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleObjectWithFilesAsFormDataEndpointResult : IEndpoin bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs index 16787a4b..ec06c674 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadMultiFilesAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs index c036fd96..abdf560f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs index 5ef606d6..c5639c17 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleFileAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs index b6400159..aa392dab 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs index 3b9d8c37..ce157279 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsy var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleObjectWithFileAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs index c25ca3e9..9b68a2f2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs index 1d2fccb4..cfecdde2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAs var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleObjectWithFilesAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs index efa6d566..5d4fa103 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs index 658b3e19..a699daaf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new CreateItemEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs index 9ab6e3f9..b7d32ad2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs index af8b9d6a..051e2f48 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface ICreateItemEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs index cff86111..e1b69a15 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUpdateItemEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - Guid OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs index 825f3483..c064dab2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UpdateItemEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs index 3abf09f9..492e22af 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public Guid OkContent => IsOk && ContentObject is Guid result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs index 4923958e..690abe36 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs @@ -42,7 +42,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrderByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs index 2e0923df..8e81565d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -50,7 +50,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrdersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs index 4d823b95..bf781228 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -48,9 +48,9 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); responseBuilder.AddErrorResponse(HttpStatusCode.BadGateway); return await responseBuilder.BuildResponseAsync(x => new PatchOrdersIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs index f2886c4a..1c14d0b8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetRouteWithDashEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs index ab8004a3..fe87c422 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,16 +22,8 @@ public GetRouteWithDashEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs index 1e519927..3b0bd2a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,9 +17,5 @@ public interface IGetRouteWithDashEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs index c457e742..a8353c6f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetTasksEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs index a278fbc7..d8373c3c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetTasksEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs index 04843227..63bc4fd9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetTasksEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs index dd2ab217..d6d4770b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new DeleteUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs index c7b575ce..97b77126 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs index e96c9c60..5cf125da 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByEmailEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs index a426c461..7646aae7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs index c01861d9..b15f8ba1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs index 1723b875..37163c4a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs index 63c13304..d9304278 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,8 +38,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUsersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs index 9b404e9b..67a88e03 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,9 +22,6 @@ public GetUsersEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsConflict => StatusCode == HttpStatusCode.Conflict; @@ -33,13 +30,8 @@ public IEnumerable OkContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs index bb23ee5f..02eb2150 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs index b259d9db..05510592 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByEmailEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByEmailEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs index 88cc434a..462962f1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs index 0484e88b..609ec679 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,13 +17,9 @@ public interface IGetUsersEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - bool IsConflict { get; } IEnumerable OkContent { get; } - string? UnauthorizedContent { get; } - string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs index 3db77b1c..0d1a5664 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IPostUserEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsConflict { get; } string? CreatedContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs index ef3e9b2f..6249971f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateMyTestGenderEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateMyTestGenderEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs index d4554366..d51786aa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs index 36e77b77..d61918ac 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new PostUserEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs index 785203b8..3cfb1be4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsCreated public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsConflict => StatusCode == HttpStatusCode.Conflict; @@ -41,13 +38,8 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs index c5fee937..f5a53ca9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,9 +43,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateMyTestGenderEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs index f9ad2ca5..610c15fa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs index 899d3b17..6419af9d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,9 +42,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs index 1cabdbf2..4a51de0b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WOPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs index bfe836a5..1f448057 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/ISetAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface ISetAccountNameEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs index c236a12e..bfce0e62 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/Interfaces/IUpdateAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUpdateAccountNameEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs index 4b73cb8b..afc2bbdd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new SetAccountNameEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs index 849991bf..957561c8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/SetAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs index ad2455e0..3a6eaa86 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UpdateAccountNameEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs index c0fb692a..01f54003 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Accounts/UpdateAccountNameEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs index 4b503a97..c31d3a41 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetAddressesByPostalCodesEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs index e90add1a..e114a598 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/GetAddressesByPostalCodesEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs index 5bf530cd..6d79cc3e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Addresses/Interfaces/IGetAddressesByPostalCodesEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetAddressesByPostalCodesEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } IEnumerable
OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } -} + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs index 57075be3..1d1d9169 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetEventArgByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs index 77b6f9d6..c8cdbe07 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs index 8689bee7..63dd7649 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetEventArgsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs index fe0d8755..856daae0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetEventArgsEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs index 9ec09081..be6a03d6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs @@ -19,15 +19,11 @@ public interface IGetEventArgByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } DemoSample.ApiClient.Generated.Contracts.EventArgs.EventArgs OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs index 46d28cdc..7d1cc806 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetEventArgsEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs index b24ed836..8393fa33 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetFileByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs index 3a23810a..726f3eb8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/GetFileByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs index f11599a4..2685ac7a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IGetFileByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetFileByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } byte[] OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } -} + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs index 0ed2c716..7d46ff43 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadMultiFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadMultiFilesAsFormDataEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs index 20daa9e9..49224d13 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleFileAsFormDataEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs index 4088b195..b6962b2e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleObjectWithFileAsFormDataEndpointResult : IEndpoint bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs index 5b088116..c1425ca0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/Interfaces/IUploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUploadSingleObjectWithFilesAsFormDataEndpointResult : IEndpoin bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs index df17b8c2..ec06c674 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadMultiFilesAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs index 6e5db245..662c2360 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadMultiFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs index bc1a79e5..c5639c17 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleFileAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs index cf013f9e..99d3d554 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs index f972fdc4..ce157279 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsy var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleObjectWithFileAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs index 1fd200f6..f44ab612 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFileAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs index 870b0108..cfecdde2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAs var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UploadSingleObjectWithFilesAsFormDataEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs index 3073bc11..2cbe1ca7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Files/UploadSingleObjectWithFilesAsFormDataEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs index 540e7468..a699daaf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new CreateItemEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs index ffeace3f..b2903218 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/CreateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs index 6f441f59..bc8e63dd 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/ICreateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface ICreateItemEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs index 0f780b02..751c91c0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/Interfaces/IUpdateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IUpdateItemEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - Guid OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs index 7b5c4605..c064dab2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,7 +42,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new UpdateItemEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs index babd88d4..1f1afd16 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Items/UpdateItemEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public Guid OkContent => IsOk && ContentObject is Guid result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs index b3044d3f..690abe36 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs @@ -42,7 +42,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrderByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs index 57a490d8..f52ec9d3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs @@ -38,8 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs index bf260124..f35b8866 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -50,7 +50,7 @@ public async Task ExecuteAsync( responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrdersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs index 0397604a..122d0bc7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -46,8 +46,8 @@ public ProblemDetails UnauthorizedContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs index a72ed6c7..336a2cb7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs @@ -25,5 +25,5 @@ public interface IGetOrderByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs index 0cd179b7..8fe0da47 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -29,5 +29,5 @@ public interface IGetOrdersEndpointResult : IEndpointResponse ProblemDetails UnauthorizedContent { get; } - ProblemDetails NotFoundContent { get; } -} + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IPatchOrdersIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IPatchOrdersIdEndpointResult.verified.cs index 29aac17c..33059f17 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IPatchOrdersIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/Interfaces/IPatchOrdersIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -37,9 +37,9 @@ public interface IPatchOrdersIdEndpointResult : IEndpointResponse ProblemDetails ForbiddenContent { get; } - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } ProblemDetails BadGatewayContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs index 5772a3eb..a23ede24 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -48,9 +48,9 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); responseBuilder.AddErrorResponse(HttpStatusCode.BadGateway); return await responseBuilder.BuildResponseAsync(x => new PatchOrdersIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpointResult.verified.cs index f59a3329..59a0af1b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Orders/PatchOrdersIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -60,8 +60,8 @@ public ProblemDetails ForbiddenContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -74,4 +74,4 @@ public ProblemDetails BadGatewayContent => IsBadGateway && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadGateway property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs index e997ec06..1c14d0b8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetRouteWithDashEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs index eac3dd8c..fe87c422 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/GetRouteWithDashEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,16 +22,8 @@ public GetRouteWithDashEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? OkContent => IsOk && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs index 0707c316..3b0bd2a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/RouteWithDash/Interfaces/IGetRouteWithDashEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,9 +17,5 @@ public interface IGetRouteWithDashEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - string? OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs index 20e66842..a8353c6f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetTasksEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs index 31ea79ca..d8373c3c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetTasksEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs index 85751d11..63bc4fd9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetTasksEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs index acde01cb..42330868 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new DeleteUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs index 4ae2862d..daeada42 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs index f743076d..01ff8dc3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByEmailEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs index 5ca1308b..8ce28336 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByEmailEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs index a40d6e99..28bc6622 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs index f81ecdf0..d19ca634 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs index e9d19bbc..94f9a32d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,8 +38,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUsersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs index 8d971630..a56e0a2c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,9 +22,6 @@ public GetUsersEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsConflict => StatusCode == HttpStatusCode.Conflict; @@ -33,13 +30,8 @@ public IEnumerable OkContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs index 08fae9ff..d63f49ce 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs index e7ddcc94..7818a0b9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByEmailEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByEmailEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByEmailEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs index 80bd278b..e208186a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs index 9b1b5ae1..9657f4cf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,13 +17,9 @@ public interface IGetUsersEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - bool IsConflict { get; } IEnumerable OkContent { get; } - ProblemDetails UnauthorizedContent { get; } - ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs index 7ef393e4..7b292a58 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IPostUserEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IPostUserEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsConflict { get; } ProblemDetails CreatedContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs index 1c4336b2..6180f255 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateMyTestGenderEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateMyTestGenderEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateMyTestGenderEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs index 30aeb468..07982bad 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs index 35f93d28..b939f7e6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddErrorResponse(HttpStatusCode.Created); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new PostUserEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs index 89e779cc..f45c03fc 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/PostUserEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsCreated public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsConflict => StatusCode == HttpStatusCode.Conflict; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs index 3287d873..90538d73 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,9 +43,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateMyTestGenderEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs index 35c96ed4..4a0fc825 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateMyTestGenderEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs index 1b523188..54d1e338 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,9 +42,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs index 3afbb995..c2eadff5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyClient/WPD/src/DemoSample.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs index aef33a8d..a317ab7f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/accounts")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class AccountsController : ControllerBase [HttpPut("{accountId}/name")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UpdateAccountName( UpdateAccountNameParameters parameters, [FromServices] IUpdateAccountNameHandler handler, @@ -36,10 +34,9 @@ public async Task UpdateAccountName( [HttpPost("{accountId}/name")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task SetAccountName( SetAccountNameParameters parameters, [FromServices] ISetAccountNameHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs index b117190d..540a8981 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/addresses")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,11 +21,10 @@ public sealed class AddressesController : ControllerBase [HttpGet("{postalCode}")] [ProducesResponseType(typeof(IEnumerable
), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetAddressesByPostalCodes( GetAddressesByPostalCodesParameters parameters, [FromServices] IGetAddressesByPostalCodesHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs index 4fc1886e..32352b1f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/eventArgs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class EventArgsController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetEventArgs( [FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) @@ -34,11 +32,10 @@ public async Task GetEventArgs( [HttpGet("{id}")] [ProducesResponseType(typeof(Contracts.EventArgs.EventArgs), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetEventArgById( GetEventArgByIdParameters parameters, [FromServices] IGetEventArgByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs index df19492d..3d5673c3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/files")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -23,7 +22,6 @@ public sealed class FilesController : ControllerBase [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UploadMultiFilesAsFormData( UploadMultiFilesAsFormDataParameters parameters, [FromServices] IUploadMultiFilesAsFormDataHandler handler, @@ -38,7 +36,6 @@ public async Task UploadMultiFilesAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UploadSingleFileAsFormData( UploadSingleFileAsFormDataParameters parameters, [FromServices] IUploadSingleFileAsFormDataHandler handler, @@ -53,7 +50,6 @@ public async Task UploadSingleFileAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UploadSingleObjectWithFileAsFormData( UploadSingleObjectWithFileAsFormDataParameters parameters, [FromServices] IUploadSingleObjectWithFileAsFormDataHandler handler, @@ -68,7 +64,6 @@ public async Task UploadSingleObjectWithFileAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UploadSingleObjectWithFilesAsFormData( UploadSingleObjectWithFilesAsFormDataParameters parameters, [FromServices] IUploadSingleObjectWithFilesAsFormDataHandler handler, @@ -82,11 +77,10 @@ public async Task UploadSingleObjectWithFilesAsFormData( [HttpGet("{id}")] [ProducesResponseType(typeof(byte[]), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetFileById( GetFileByIdParameters parameters, [FromServices] IGetFileByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs index 33c2a662..ecec17ec 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/items")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class ItemsController : ControllerBase [HttpPost] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task CreateItem( CreateItemParameters parameters, [FromServices] ICreateItemHandler handler, @@ -36,10 +34,9 @@ public async Task CreateItem( [HttpPut("{id}")] [ProducesResponseType(typeof(Guid), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task UpdateItem( UpdateItemParameters parameters, [FromServices] IUpdateItemHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs index dcf284d3..b298dcc3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/route-with-dash")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class RouteWithDashController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetRouteWithDash( [FromServices] IGetRouteWithDashHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs index 02011162..083dffaa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/tasks")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class TasksController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetTasks( [FromServices] IGetTasksHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs index de390460..f52111d4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WOPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/users")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class UsersController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task GetUsers( [FromServices] IGetUsersHandler handler, @@ -35,7 +33,6 @@ public async Task GetUsers( [HttpPost] [ProducesResponseType(typeof(string), StatusCodes.Status201Created)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task PostUser( PostUserParameters parameters, @@ -50,7 +47,6 @@ public async Task PostUser( [HttpGet("email")] [ProducesResponseType(typeof(User), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task GetUserByEmail( @@ -66,7 +62,6 @@ public async Task GetUserByEmail( [HttpGet("{id}")] [ProducesResponseType(typeof(User), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task GetUserById( @@ -82,7 +77,6 @@ public async Task GetUserById( [HttpPut("{id}")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task UpdateUserById( @@ -98,7 +92,6 @@ public async Task UpdateUserById( [HttpDelete("{id}")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task DeleteUserById( @@ -114,7 +107,6 @@ public async Task DeleteUserById( [HttpPut("{id}/gender")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(string), StatusCodes.Status409Conflict)] public async Task UpdateMyTestGender( @@ -122,4 +114,4 @@ public async Task UpdateMyTestGender( [FromServices] IUpdateMyTestGenderHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Addresses/Results/GetAddressesByPostalCodesResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Addresses/Results/GetAddressesByPostalCodesResult.verified.cs index c307f0c9..64483980 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Addresses/Results/GetAddressesByPostalCodesResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Addresses/Results/GetAddressesByPostalCodesResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetAddressesByPostalCodesResult Ok(IEnumerable
response) /// 404 - NotFound response. /// public static GetAddressesByPostalCodesResult NotFound(string? message = null) - => new GetAddressesByPostalCodesResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetAddressesByPostalCodesResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetAddressesByPostalCodesResult to ActionResult. /// public static implicit operator GetAddressesByPostalCodesResult(List
response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs index 3d1c24c6..bad4144b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetEventArgByIdResult Ok(EventArgs response) /// 404 - NotFound response. /// public static GetEventArgByIdResult NotFound(string? message = null) - => new GetEventArgByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetEventArgByIdResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetEventArgByIdResult to ActionResult. /// public static implicit operator GetEventArgByIdResult(EventArgs response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Files/Results/GetFileByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Files/Results/GetFileByIdResult.verified.cs index e5b56a27..43832462 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Files/Results/GetFileByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Files/Results/GetFileByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,5 +26,5 @@ public static GetFileByIdResult Ok(byte[] bytes, string fileName) /// 404 - NotFound response. /// public static GetFileByIdResult NotFound(string? message = null) - => new GetFileByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); -} + => new GetFileByIdResult(new NotFoundObjectResult(message)); +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs index 3f11b9a1..9ac80437 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetOrderByIdResult Ok(Order response) /// 404 - NotFound response. /// public static GetOrderByIdResult NotFound(string? message = null) - => new GetOrderByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetOrderByIdResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetOrderByIdResult to ActionResult. /// public static implicit operator GetOrderByIdResult(Order response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs index 0834f126..09039f76 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetOrdersResult Ok(Pagination response) /// 404 - NotFound response. /// public static GetOrdersResult NotFound(string? message = null) - => new GetOrdersResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetOrdersResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetOrdersResult to ActionResult. /// public static implicit operator GetOrdersResult(Pagination response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/PatchOrdersIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/PatchOrdersIdResult.verified.cs index 9c105912..ab8c198b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/PatchOrdersIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Orders/Results/PatchOrdersIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,7 +26,7 @@ public static PatchOrdersIdResult Ok(string? message = null) /// 404 - NotFound response. /// public static PatchOrdersIdResult NotFound(string? message = null) - => new PatchOrdersIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new PatchOrdersIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -45,4 +45,4 @@ public static PatchOrdersIdResult BadGateway(string? message = null) /// public static implicit operator PatchOrdersIdResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs index 8d63cb7e..c1a887d7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,7 +26,7 @@ public static DeleteUserByIdResult Ok(string? message = null) /// 404 - NotFound response. /// public static DeleteUserByIdResult NotFound(string? message = null) - => new DeleteUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new DeleteUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -39,4 +39,4 @@ public static DeleteUserByIdResult Conflict(string? message = null) /// public static implicit operator DeleteUserByIdResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByEmailResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByEmailResult.verified.cs index c0d5c7b9..743d73e9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByEmailResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByEmailResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -32,7 +32,7 @@ public static GetUserByEmailResult BadRequest(string? message = null) /// 404 - NotFound response. /// public static GetUserByEmailResult NotFound(string? message = null) - => new GetUserByEmailResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetUserByEmailResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -45,4 +45,4 @@ public static GetUserByEmailResult Conflict(string? message = null) /// public static implicit operator GetUserByEmailResult(User response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs index a68ad23c..20ed5aef 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,7 +26,7 @@ public static GetUserByIdResult Ok(User response) /// 404 - NotFound response. /// public static GetUserByIdResult NotFound(string? message = null) - => new GetUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -39,4 +39,4 @@ public static GetUserByIdResult Conflict(string? message = null) /// public static implicit operator GetUserByIdResult(User response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateMyTestGenderResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateMyTestGenderResult.verified.cs index 8b99948d..80693842 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateMyTestGenderResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateMyTestGenderResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -32,7 +32,7 @@ public static UpdateMyTestGenderResult BadRequest(string? message = null) /// 404 - NotFound response. /// public static UpdateMyTestGenderResult NotFound(string? message = null) - => new UpdateMyTestGenderResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new UpdateMyTestGenderResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -45,4 +45,4 @@ public static UpdateMyTestGenderResult Conflict(string? message = null) /// public static implicit operator UpdateMyTestGenderResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs index f258c9de..1f86b328 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -32,7 +32,7 @@ public static UpdateUserByIdResult BadRequest(string? message = null) /// 404 - NotFound response. /// public static UpdateUserByIdResult NotFound(string? message = null) - => new UpdateUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new UpdateUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -45,4 +45,4 @@ public static UpdateUserByIdResult Conflict(string? message = null) /// public static implicit operator UpdateUserByIdResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs index df5f6121..a317ab7f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AccountsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/accounts")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class AccountsController : ControllerBase [HttpPut("{accountId}/name")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UpdateAccountName( UpdateAccountNameParameters parameters, [FromServices] IUpdateAccountNameHandler handler, @@ -36,10 +34,9 @@ public async Task UpdateAccountName( [HttpPost("{accountId}/name")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task SetAccountName( SetAccountNameParameters parameters, [FromServices] ISetAccountNameHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs index 745b4cae..540a8981 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/AddressesController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/addresses")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,11 +21,10 @@ public sealed class AddressesController : ControllerBase [HttpGet("{postalCode}")] [ProducesResponseType(typeof(IEnumerable
), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetAddressesByPostalCodes( GetAddressesByPostalCodesParameters parameters, [FromServices] IGetAddressesByPostalCodesHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs index a1791fa1..32352b1f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/EventArgsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/eventArgs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class EventArgsController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetEventArgs( [FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) @@ -34,11 +32,10 @@ public async Task GetEventArgs( [HttpGet("{id}")] [ProducesResponseType(typeof(Contracts.EventArgs.EventArgs), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetEventArgById( GetEventArgByIdParameters parameters, [FromServices] IGetEventArgByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs index e1e0b4c0..3d5673c3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/FilesController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/files")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -23,7 +22,6 @@ public sealed class FilesController : ControllerBase [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UploadMultiFilesAsFormData( UploadMultiFilesAsFormDataParameters parameters, [FromServices] IUploadMultiFilesAsFormDataHandler handler, @@ -38,7 +36,6 @@ public async Task UploadMultiFilesAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UploadSingleFileAsFormData( UploadSingleFileAsFormDataParameters parameters, [FromServices] IUploadSingleFileAsFormDataHandler handler, @@ -53,7 +50,6 @@ public async Task UploadSingleFileAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UploadSingleObjectWithFileAsFormData( UploadSingleObjectWithFileAsFormDataParameters parameters, [FromServices] IUploadSingleObjectWithFileAsFormDataHandler handler, @@ -68,7 +64,6 @@ public async Task UploadSingleObjectWithFileAsFormData( [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UploadSingleObjectWithFilesAsFormData( UploadSingleObjectWithFilesAsFormDataParameters parameters, [FromServices] IUploadSingleObjectWithFilesAsFormDataHandler handler, @@ -82,11 +77,10 @@ public async Task UploadSingleObjectWithFilesAsFormData( [HttpGet("{id}")] [ProducesResponseType(typeof(byte[]), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetFileById( GetFileByIdParameters parameters, [FromServices] IGetFileByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs index a2982f58..ecec17ec 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/ItemsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/items")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class ItemsController : ControllerBase [HttpPost] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task CreateItem( CreateItemParameters parameters, [FromServices] ICreateItemHandler handler, @@ -36,10 +34,9 @@ public async Task CreateItem( [HttpPut("{id}")] [ProducesResponseType(typeof(Guid), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task UpdateItem( UpdateItemParameters parameters, [FromServices] IUpdateItemHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/OrdersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/OrdersController.verified.cs index 2af7854b..51a9c5b9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/OrdersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/OrdersController.verified.cs @@ -23,7 +23,7 @@ public sealed class OrdersController : ControllerBase [ProducesResponseType(typeof(Pagination), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrders( GetOrdersParameters parameters, [FromServices] IGetOrdersHandler handler, @@ -38,7 +38,7 @@ public async Task GetOrders( [HttpGet("{id}")] [ProducesResponseType(typeof(Order), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrderById( GetOrderByIdParameters parameters, [FromServices] IGetOrderByIdHandler handler, @@ -55,7 +55,7 @@ public async Task GetOrderById( [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status403Forbidden)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status502BadGateway)] public async Task PatchOrdersId( diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs index 3ebd1771..b298dcc3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/RouteWithDashController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/route-with-dash")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class RouteWithDashController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetRouteWithDash( [FromServices] IGetRouteWithDashHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs index 3a34818d..083dffaa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/TasksController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/tasks")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class TasksController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetTasks( [FromServices] IGetTasksHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs index d756e905..b8b37f2b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/DemoSample/VerifyServerAll/Mvc_WPD/src/DemoSample.Api.Generated/Endpoints/UsersController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace DemoSample.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/users")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class UsersController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task GetUsers( [FromServices] IGetUsersHandler handler, @@ -35,7 +33,6 @@ public async Task GetUsers( [HttpPost] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status201Created)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task PostUser( PostUserParameters parameters, @@ -50,8 +47,7 @@ public async Task PostUser( [HttpGet("email")] [ProducesResponseType(typeof(User), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task GetUserByEmail( GetUserByEmailParameters parameters, @@ -66,8 +62,7 @@ public async Task GetUserByEmail( [HttpGet("{id}")] [ProducesResponseType(typeof(User), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task GetUserById( GetUserByIdParameters parameters, @@ -82,8 +77,7 @@ public async Task GetUserById( [HttpPut("{id}")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task UpdateUserById( UpdateUserByIdParameters parameters, @@ -98,8 +92,7 @@ public async Task UpdateUserById( [HttpDelete("{id}")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task DeleteUserById( DeleteUserByIdParameters parameters, @@ -114,12 +107,11 @@ public async Task DeleteUserById( [HttpPut("{id}/gender")] [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task UpdateMyTestGender( UpdateMyTestGenderParameters parameters, [FromServices] IUpdateMyTestGenderHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WOPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WOPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs index e5f6a20a..45bc866f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WOPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WOPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -66,7 +66,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.PaymentRequired); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.MethodNotAllowed); responseBuilder.AddErrorResponse(HttpStatusCode.NotAcceptable); responseBuilder.AddErrorResponse(HttpStatusCode.ProxyAuthenticationRequired); @@ -102,4 +102,4 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NetworkAuthenticationRequired); return await responseBuilder.BuildResponseAsync(x => new GetExampleEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs index 97ae02c9..edfbddf5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -66,7 +66,7 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); responseBuilder.AddErrorResponse(HttpStatusCode.PaymentRequired); responseBuilder.AddErrorResponse(HttpStatusCode.Forbidden); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.MethodNotAllowed); responseBuilder.AddErrorResponse(HttpStatusCode.NotAcceptable); responseBuilder.AddErrorResponse(HttpStatusCode.ProxyAuthenticationRequired); @@ -102,4 +102,4 @@ public async Task ExecuteAsync( responseBuilder.AddErrorResponse(HttpStatusCode.NetworkAuthenticationRequired); return await responseBuilder.BuildResponseAsync(x => new GetExampleEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpointResult.verified.cs index 3496c5db..10d904f2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/GetExampleEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -332,8 +332,8 @@ public ProblemDetails ForbiddenContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsForbidden property first."); - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -501,4 +501,4 @@ public ProblemDetails NetworkAuthenticationRequiredContent => IsNetworkAuthenticationRequired && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNetworkAuthenticationRequired property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/Interfaces/IGetExampleEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/Interfaces/IGetExampleEndpointResult.verified.cs index 641bbccc..d4e70977 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/Interfaces/IGetExampleEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyClient/WPD/src/ExAllResponseTypes.ApiClient.Generated/Endpoints/Example/Interfaces/IGetExampleEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -189,7 +189,7 @@ public interface IGetExampleEndpointResult : IEndpointResponse ProblemDetails ForbiddenContent { get; } - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails MethodNotAllowedContent { get; } @@ -256,4 +256,4 @@ public interface IGetExampleEndpointResult : IEndpointResponse ProblemDetails NotExtendedContent { get; } ProblemDetails NetworkAuthenticationRequiredContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WOPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WOPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs index 865eaaa3..bbf578a7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WOPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WOPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExAllResponseTypes.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/example")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -86,4 +85,4 @@ public async Task GetExample( [FromServices] IGetExampleHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Contracts/Example/Results/GetExampleResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Contracts/Example/Results/GetExampleResult.verified.cs index 4fb8ac53..ccd230b9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Contracts/Example/Results/GetExampleResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Contracts/Example/Results/GetExampleResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -182,7 +182,7 @@ public static GetExampleResult Forbidden(string? message = null) /// 404 - NotFound response. /// public static GetExampleResult NotFound(string? message = null) - => new GetExampleResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetExampleResult(new NotFoundObjectResult(message)); /// /// 405 - MethodNotAllowed response. diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs index 5b1cdac5..d1e6eec0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAllResponseTypes/VerifyServerAll/Mvc_WPD/src/ExAllResponseTypes.Api.Generated/Endpoints/ExampleController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExAllResponseTypes.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/example")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -47,7 +46,7 @@ public sealed class ExampleController : ControllerBase [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status402PaymentRequired)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status403Forbidden)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status405MethodNotAllowed)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status406NotAcceptable)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status407ProxyAuthenticationRequired)] @@ -86,4 +85,4 @@ public async Task GetExample( [FromServices] IGetExampleHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs index a4f04f77..5f0a9232 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs @@ -44,7 +44,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetCustomersEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs index e8478e78..6600a286 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IAsyncEnumerable> OkContent => IsOk && ContentObject is IAsyncEnumerable> result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs index cff73def..79bf0e1a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs @@ -19,11 +19,7 @@ public interface IGetCustomersEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - IAsyncEnumerable> OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs index ab25fe2c..a80a1fa7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetUsersEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs index ddfb9cbb..404f82e4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetUsersEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IAsyncEnumerable OkContent => IsOk && ContentObject is IAsyncEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs index bf58787b..cd82a2c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WOPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetUsersEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IAsyncEnumerable OkContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs index a08bba9e..5f0a9232 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpoint.verified.cs @@ -44,7 +44,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetCustomersEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs index 21cc9d32..b7ed9e0c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/GetCustomersEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IAsyncEnumerable> OkContent => IsOk && ContentObject is IAsyncEnumerable> result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs index 54c0b936..daae638b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Customers/Interfaces/IGetCustomersEndpointResult.verified.cs @@ -19,11 +19,7 @@ public interface IGetCustomersEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - IAsyncEnumerable> OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs index 35b00910..a80a1fa7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetUsersEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs index 7f3460a4..404f82e4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/GetUsersEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetUsersEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IAsyncEnumerable OkContent => IsOk && ContentObject is IAsyncEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs index 24b9df20..cd82a2c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyClient/WPD/src/ExAsyncEnumerable.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUsersEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetUsersEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IAsyncEnumerable OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs index 33bf6acc..ae2497bb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs @@ -28,8 +28,7 @@ public void DefineEndpoints( .WithDescription("Get customer.") .AddEndpointFilter>() .Produces>>() - .Produces(StatusCodes.Status400BadRequest) - .Produces(StatusCodes.Status401Unauthorized); + .Produces(StatusCodes.Status400BadRequest); } internal async Task GetCustomers( diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs index 8003d44a..769a2a21 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs @@ -26,8 +26,7 @@ public void DefineEndpoints( .WithName("GetUsers") .WithSummary("Get users.") .WithDescription("Get users.") - .Produces>() - .Produces(StatusCodes.Status401Unauthorized); + .Produces>(); } internal async Task GetUsers( diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs index 75d7865b..8267f249 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WOPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs @@ -8,7 +8,6 @@ global using ExAsyncEnumerable.Api.Generated.Contracts.Customers; global using ExAsyncEnumerable.Api.Generated.Contracts.Users; -global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Builder; global using Microsoft.AspNetCore.Http; global using Microsoft.AspNetCore.Mvc; \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs index 2a20e7af..68f469d6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersEndpointDefinition.verified.cs @@ -28,8 +28,7 @@ public void DefineEndpoints( .WithDescription("Get customer.") .AddEndpointFilter>() .Produces>>() - .ProducesValidationProblem() - .ProducesProblem(StatusCodes.Status401Unauthorized); + .ProducesValidationProblem(); } internal async Task GetCustomers( diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs index 27d0926b..769a2a21 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersEndpointDefinition.verified.cs @@ -26,8 +26,7 @@ public void DefineEndpoints( .WithName("GetUsers") .WithSummary("Get users.") .WithDescription("Get users.") - .Produces>() - .ProducesProblem(StatusCodes.Status401Unauthorized); + .Produces>(); } internal async Task GetUsers( diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs index 75d7865b..8267f249 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/MinimalApi_WPD/src/ExAsyncEnumerable.Api.Generated/GlobalUsings.verified.cs @@ -8,7 +8,6 @@ global using ExAsyncEnumerable.Api.Generated.Contracts.Customers; global using ExAsyncEnumerable.Api.Generated.Contracts.Users; -global using Microsoft.AspNetCore.Authorization; global using Microsoft.AspNetCore.Builder; global using Microsoft.AspNetCore.Http; global using Microsoft.AspNetCore.Mvc; \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs index 1b8c7a9c..b883dd48 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs @@ -9,7 +9,6 @@ namespace ExAsyncEnumerable.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/customers")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class CustomersController : ControllerBase [HttpGet] [ProducesResponseType(typeof(IAsyncEnumerable>), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetCustomers( GetCustomersParameters parameters, [FromServices] IGetCustomersHandler handler, diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs index 71c3aa98..42221104 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WOPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs @@ -9,7 +9,6 @@ namespace ExAsyncEnumerable.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/users")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class UsersController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IAsyncEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetUsers( [FromServices] IGetUsersHandler handler, CancellationToken cancellationToken) diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs index 6db13d58..b883dd48 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/CustomersController.verified.cs @@ -9,7 +9,6 @@ namespace ExAsyncEnumerable.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/customers")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class CustomersController : ControllerBase [HttpGet] [ProducesResponseType(typeof(IAsyncEnumerable>), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetCustomers( GetCustomersParameters parameters, [FromServices] IGetCustomersHandler handler, diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs index 5f31281d..42221104 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExAsyncEnumerable/VerifyServerAll/Mvc_WPD/src/ExAsyncEnumerable.Api.Generated/Endpoints/UsersController.verified.cs @@ -9,7 +9,6 @@ namespace ExAsyncEnumerable.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/users")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class UsersController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IAsyncEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetUsers( [FromServices] IGetUsersHandler handler, CancellationToken cancellationToken) diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs index 674518e9..33338c08 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetCatsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs index 5e669538..2d0e0adf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginatedResult OkContent => IsOk && ContentObject is PaginatedResult result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs index bcd1305c..9dea92f3 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IGetCatsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginatedResult OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs index 5506c3d1..c0095e6b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetDogsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs index e1321fb2..11f4f5e5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginatedResult OkContent => IsOk && ContentObject is PaginatedResult result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs index 82de70ec..63dc6ec7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WOPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IGetDogsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginatedResult OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs index f76db805..33338c08 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetCatsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs index 4013e38c..bfb7031d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/GetCatsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginatedResult OkContent => IsOk && ContentObject is PaginatedResult result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs index a0f29edd..2485e39b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Cats/Interfaces/IGetCatsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IGetCatsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginatedResult OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs index 6f1305b7..c0095e6b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetDogsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs index 1338d451..b7c775e6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/GetDogsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginatedResult OkContent => IsOk && ContentObject is PaginatedResult result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs index c621298b..fe71d09f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyClient/WPD/src/ExGenericPagination.ApiClient.Generated/Endpoints/Dogs/Interfaces/IGetDogsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IGetDogsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginatedResult OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs index 3d019a4a..d98c10a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExGenericPagination.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/cats")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,10 +21,9 @@ public sealed class CatsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginatedResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetCats( GetCatsParameters parameters, [FromServices] IGetCatsHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs index 38a14e80..b3e6efd2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WOPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExGenericPagination.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/dogs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,10 +21,9 @@ public sealed class DogsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginatedResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetDogs( GetDogsParameters parameters, [FromServices] IGetDogsHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs index c7873de5..d98c10a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/CatsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExGenericPagination.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/cats")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class CatsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginatedResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetCats( GetCatsParameters parameters, [FromServices] IGetCatsHandler handler, diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs index 9a82f28a..b3e6efd2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExGenericPagination/VerifyServerAll/Mvc_WPD/src/ExGenericPagination.Api.Generated/Endpoints/DogsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExGenericPagination.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/dogs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,10 +21,9 @@ public sealed class DogsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginatedResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetDogs( GetDogsParameters parameters, [FromServices] IGetDogsHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs index 2c7041e6..6370bedf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetEventArgByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs index 8a7ace6b..9482aa34 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,11 +38,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs index 19a4c00c..bfcb8ff8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetEventArgsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs index a2980c70..5d5a8051 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetEventArgsEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs index 8ab18cff..ad31f785 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs @@ -19,15 +19,11 @@ public interface IGetEventArgByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } ExNsWithTask.ApiClient.Generated.Contracts.EventArgs.EventArgs OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs index e06162cd..ccf06982 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetEventArgsEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs index c216bad0..2c6604e8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,8 +42,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrderByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs index 5baa75a5..13fe2de9 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs index c5ceed63..0a238b14 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,8 +43,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrdersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs index 783c1dd2..433c75a2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs index b1d9e3f0..4cf34731 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetOrderByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } Order OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs index 987e6549..92c3721b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetOrdersEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } PaginationResult OkContent { get; } string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs index 608e0c2c..c45f9f50 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetTasksEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs index 3c30ab70..cc9492ee 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetTasksEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs index 900baf89..ccaa5663 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetTasksEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - string? UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs index 8fe4978a..5b1a1fd8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IListTestUnitsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginationResult OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs index 7a905b35..93ccbd47 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ListTestUnitsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs index a43eb852..7b954322 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WOPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginationResult OkContent => IsOk && ContentObject is PaginationResult result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs index 6c7f6bb6..6370bedf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpoint.verified.cs @@ -41,8 +41,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetEventArgByIdEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs index db27926b..a0d370ce 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgByIdEndpointResult.verified.cs @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs index 6fe23bc6..bfcb8ff8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetEventArgsEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs index a3982b5b..5d5a8051 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/GetEventArgsEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetEventArgsEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs index da3943f8..6f88fbec 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgByIdEndpointResult.verified.cs @@ -19,15 +19,11 @@ public interface IGetEventArgByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } ExNsWithTask.ApiClient.Generated.Contracts.EventArgs.EventArgs OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs index 37602756..ccf06982 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/EventArgs/Interfaces/IGetEventArgsEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetEventArgsEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs index 886b24da..2c6604e8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,8 +42,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrderByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs index 8e841354..7b87823c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrderByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs index 670e4ee7..0a238b14 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,8 +43,7 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); return await responseBuilder.BuildResponseAsync(x => new GetOrdersEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs index 68dd2b60..54843b8c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/GetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -41,13 +38,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs index 0e46f994..2c9b1852 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrderByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetOrderByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } Order OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } -} + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs index fe6cb466..418d4399 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Orders/Interfaces/IGetOrdersEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,15 +19,11 @@ public interface IGetOrdersEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } PaginationResult OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } -} + string? NotFoundContent { get; } +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs index 87146d4e..c45f9f50 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpoint.verified.cs @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new GetTasksEndpointResult(x), cancellationToken); } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs index 78fb88ca..cc9492ee 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/GetTasksEndpointResult.verified.cs @@ -22,16 +22,8 @@ public GetTasksEndpointResult(EndpointResponse response) public bool IsOk => StatusCode == HttpStatusCode.OK; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsOk property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs index f82884f0..ccaa5663 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/Tasks/Interfaces/IGetTasksEndpointResult.verified.cs @@ -17,9 +17,5 @@ public interface IGetTasksEndpointResult : IEndpointResponse bool IsOk { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } - - ProblemDetails UnauthorizedContent { get; } } \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs index 19b83274..5d027501 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/Interfaces/IListTestUnitsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IListTestUnitsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - PaginationResult OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs index db41c096..93ccbd47 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -43,7 +43,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ListTestUnitsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs index b5609053..4c3322cc 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyClient/WPD/src/ExNsWithTask.ApiClient.Generated/Endpoints/TestUnits/ListTestUnitsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public PaginationResult OkContent => IsOk && ContentObject is PaginationResult result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs index 5c334eac..b24e47f7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/eventArgs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class EventArgsController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetEventArgs( [FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) @@ -34,11 +32,10 @@ public async Task GetEventArgs( [HttpGet("{id}")] [ProducesResponseType(typeof(Contracts.EventArgs.EventArgs), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetEventArgById( GetEventArgByIdParameters parameters, [FromServices] IGetEventArgByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs index 3977cc59..49cb5c71 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/orders")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class OrdersController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginationResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrders( GetOrdersParameters parameters, @@ -37,11 +35,10 @@ public async Task GetOrders( [HttpGet("{id}")] [ProducesResponseType(typeof(Order), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrderById( GetOrderByIdParameters parameters, [FromServices] IGetOrderByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs index 0c07a8ed..613714a5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/tasks")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class TasksController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task GetTasks( [FromServices] IGetTasksHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs index e58004e2..ef502823 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WOPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/test-units")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,10 +21,9 @@ public sealed class TestUnitsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginationResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task ListTestUnits( ListTestUnitsParameters parameters, [FromServices] IListTestUnitsHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs index 9031ecc7..1200752b 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/EventArgs/Results/GetEventArgByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetEventArgByIdResult Ok(EventArgs response) /// 404 - NotFound response. /// public static GetEventArgByIdResult NotFound(string? message = null) - => new GetEventArgByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetEventArgByIdResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetEventArgByIdResult to ActionResult. /// public static implicit operator GetEventArgByIdResult(EventArgs response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs index d4d519c4..b20894b0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrderByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetOrderByIdResult Ok(Order response) /// 404 - NotFound response. /// public static GetOrderByIdResult NotFound(string? message = null) - => new GetOrderByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetOrderByIdResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetOrderByIdResult to ActionResult. /// public static implicit operator GetOrderByIdResult(Order response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs index aeec30b8..6c474457 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Contracts/Orders/Results/GetOrdersResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,11 +26,11 @@ public static GetOrdersResult Ok(PaginationResult response) /// 404 - NotFound response. /// public static GetOrdersResult NotFound(string? message = null) - => new GetOrdersResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetOrdersResult(new NotFoundObjectResult(message)); /// /// Performs an implicit conversion from GetOrdersResult to ActionResult. /// public static implicit operator GetOrdersResult(PaginationResult response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs index 4b4315f2..b24e47f7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/EventArgsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/eventArgs")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,7 +20,6 @@ public sealed class EventArgsController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetEventArgs( [FromServices] IGetEventArgsHandler handler, CancellationToken cancellationToken) @@ -34,11 +32,10 @@ public async Task GetEventArgs( [HttpGet("{id}")] [ProducesResponseType(typeof(Contracts.EventArgs.EventArgs), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetEventArgById( GetEventArgByIdParameters parameters, [FromServices] IGetEventArgByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs index e71fe2a1..49cb5c71 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/OrdersController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/orders")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,8 +21,7 @@ public sealed class OrdersController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginationResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrders( GetOrdersParameters parameters, [FromServices] IGetOrdersHandler handler, @@ -37,11 +35,10 @@ public async Task GetOrders( [HttpGet("{id}")] [ProducesResponseType(typeof(Order), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] public async Task GetOrderById( GetOrderByIdParameters parameters, [FromServices] IGetOrderByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs index 5c0a2ce2..613714a5 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TasksController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/tasks")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -21,9 +20,8 @@ public sealed class TasksController : ControllerBase /// [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task GetTasks( [FromServices] IGetTasksHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs index 504013a8..ef502823 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExNsWithTask/VerifyServerAll/Mvc_WPD/src/ExNsWithTask.Api.Generated/Endpoints/TestUnitsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace ExNsWithTask.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/api/v1/test-units")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,10 +21,9 @@ public sealed class TestUnitsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(PaginationResult), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task ListTestUnits( ListTestUnitsParameters parameters, [FromServices] IListTestUnitsHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs index 769e969d..33e0d43c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new DeleteUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs index bd400b85..be6ed498 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs index 5c633ea7..61664b88 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs index e0717e5f..271b4986 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs index a2888b10..0c66cd51 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs index fe1cc743..415963a7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs index a2e438c3..334cecd1 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse string? BadRequestContent { get; } - string? UnauthorizedContent { get; } - string? NotFoundContent { get; } string? ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs index 512fa57c..f4aee1b4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,9 +42,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs index 3021a5a7..91306ad8 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WOPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,11 +41,6 @@ public string? BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - public string? NotFoundContent => IsNotFound && ContentObject is string result ? result @@ -58,4 +50,4 @@ public string? ConflictContent => IsConflict && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs index cb6dd14f..bf904e02 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new DeleteUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs index e1cb2b93..ab3b5f6a 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/DeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs index 5df7cfc1..c72a182f 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,9 +41,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new GetUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs index 23671452..04a5f69d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/GetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs index 12e2fd5b..119d8190 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IDeleteUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IDeleteUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs index 7c76b543..9c7dcdd7 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IGetUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IGetUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs index 218d0729..b9011108 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/Interfaces/IUpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,8 +19,6 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - bool IsNotFound { get; } bool IsConflict { get; } @@ -29,9 +27,7 @@ public interface IUpdateUserByIdEndpointResult : IEndpointResponse ValidationProblemDetails BadRequestContent { get; } - ProblemDetails UnauthorizedContent { get; } - - ProblemDetails NotFoundContent { get; } + string? NotFoundContent { get; } ProblemDetails ConflictContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs index d7523eb9..b55a91fb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -42,9 +42,8 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); - responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); + responseBuilder.AddErrorResponse(HttpStatusCode.NotFound); responseBuilder.AddErrorResponse(HttpStatusCode.Conflict); return await responseBuilder.BuildResponseAsync(x => new UpdateUserByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs index 3c46c7df..93a5d847 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyClient/WPD/src/ExUsers.ApiClient.Generated/Endpoints/Users/UpdateUserByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public bool IsNotFound => StatusCode == HttpStatusCode.NotFound; @@ -44,13 +41,8 @@ public ValidationProblemDetails BadRequestContent ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); - - public ProblemDetails NotFoundContent - => IsNotFound && ContentObject is ProblemDetails result + public string? NotFoundContent + => IsNotFound && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsNotFound property first."); @@ -58,4 +50,4 @@ public ProblemDetails ConflictContent => IsConflict && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsConflict property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs index fb7e0283..6dd28a28 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/DeleteUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,7 +26,7 @@ public static DeleteUserByIdResult Ok(string? message = null) /// 404 - NotFound response. /// public static DeleteUserByIdResult NotFound(string? message = null) - => new DeleteUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new DeleteUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -39,4 +39,4 @@ public static DeleteUserByIdResult Conflict(string? message = null) /// public static implicit operator DeleteUserByIdResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs index e2bebc9c..6eb3c8af 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/GetUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -26,7 +26,7 @@ public static GetUserByIdResult Ok(User response) /// 404 - NotFound response. /// public static GetUserByIdResult NotFound(string? message = null) - => new GetUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new GetUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -39,4 +39,4 @@ public static GetUserByIdResult Conflict(string? message = null) /// public static implicit operator GetUserByIdResult(User response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs index ac8d5bdf..20ff9284 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Contracts/Users/Results/UpdateUserByIdResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -32,7 +32,7 @@ public static UpdateUserByIdResult BadRequest(string? message = null) /// 404 - NotFound response. /// public static UpdateUserByIdResult NotFound(string? message = null) - => new UpdateUserByIdResult(ResultFactory.CreateContentResultWithProblemDetails(HttpStatusCode.NotFound, message)); + => new UpdateUserByIdResult(new NotFoundObjectResult(message)); /// /// 409 - Conflict response. @@ -45,4 +45,4 @@ public static UpdateUserByIdResult Conflict(string? message = null) /// public static implicit operator UpdateUserByIdResult(string response) => Ok(response); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Endpoints/UsersController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Endpoints/UsersController.verified.cs index 42d4d30d..40302d24 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Endpoints/UsersController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/ExUsers/VerifyServerAll/Mvc_WPD/src/ExUsers.Api.Generated/Endpoints/UsersController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -51,7 +51,7 @@ public async Task PostUser( [ProducesResponseType(typeof(User), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task GetUserById( GetUserByIdParameters parameters, @@ -67,7 +67,7 @@ public async Task GetUserById( [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task UpdateUserById( UpdateUserByIdParameters parameters, @@ -83,11 +83,11 @@ public async Task UpdateUserById( [ProducesResponseType(typeof(string), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)] + [ProducesResponseType(typeof(string), StatusCodes.Status404NotFound)] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status409Conflict)] public async Task DeleteUserById( DeleteUserByIdParameters parameters, [FromServices] IDeleteUserByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs index fa7898bd..633bf68d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddErrorResponse(HttpStatusCode.Created); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new CreatePetsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs index e62db02e..aa461c4d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,16 +22,8 @@ public CreatePetsEndpointResult(EndpointResponse response) public bool IsCreated => StatusCode == HttpStatusCode.Created; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public string? CreatedContent => IsCreated && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsCreated property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs index 1c03f32e..44a8fee2 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,9 +17,5 @@ public interface ICreatePetsEndpointResult : IEndpointResponse bool IsCreated { get; } - bool IsUnauthorized { get; } - string? CreatedContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs index 7ae5facd..14c4301c 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IListPetsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs index d421cb2f..2650f3b0 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IShowPetByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - Pet OkContent { get; } string? BadRequestContent { get; } - - string? UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs index 84e9c591..0b7bf9a4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ListPetsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs index f5cd5ce5..82e4db54 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs index a09f1ad2..6e788592 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ShowPetByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs index 4be5064d..92e0adfa 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WOPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public Pet OkContent => IsOk && ContentObject is Pet result ? result @@ -37,9 +34,4 @@ public string? BadRequestContent => IsBadRequest && ContentObject is string result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public string? UnauthorizedContent - => IsUnauthorized && ContentObject is string result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs index 5318569f..155450bf 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -38,7 +38,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddErrorResponse(HttpStatusCode.Created); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new CreatePetsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs index 054ebe7a..e5a14403 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/CreatePetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -22,16 +22,8 @@ public CreatePetsEndpointResult(EndpointResponse response) public bool IsCreated => StatusCode == HttpStatusCode.Created; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public ProblemDetails CreatedContent => IsCreated && ContentObject is ProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsCreated property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs index d9795176..75ddfd1e 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/ICreatePetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -17,9 +17,5 @@ public interface ICreatePetsEndpointResult : IEndpointResponse bool IsCreated { get; } - bool IsUnauthorized { get; } - ProblemDetails CreatedContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs index 596fc590..043b099d 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IListPetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IListPetsEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - IEnumerable OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs index 2f448c62..7d6385bb 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/Interfaces/IShowPetByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -19,11 +19,7 @@ public interface IShowPetByIdEndpointResult : IEndpointResponse bool IsBadRequest { get; } - bool IsUnauthorized { get; } - Pet OkContent { get; } ValidationProblemDetails BadRequestContent { get; } - - ProblemDetails UnauthorizedContent { get; } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs index e3ca9ca8..0b7bf9a4 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse>(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ListPetsEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs index 2e938c3f..154e1f42 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ListPetsEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public IEnumerable OkContent => IsOk && ContentObject is IEnumerable result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs index 1361c714..6e788592 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpoint.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -41,7 +41,6 @@ public async Task ExecuteAsync( var responseBuilder = httpMessageFactory.FromResponse(response); responseBuilder.AddSuccessResponse(HttpStatusCode.OK); responseBuilder.AddErrorResponse(HttpStatusCode.BadRequest); - responseBuilder.AddErrorResponse(HttpStatusCode.Unauthorized); return await responseBuilder.BuildResponseAsync(x => new ShowPetByIdEndpointResult(x), cancellationToken); } -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs index 6bbe6493..5485a4c6 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyClient/WPD/src/PetStore.ApiClient.Generated/Endpoints/Pets/ShowPetByIdEndpointResult.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -25,9 +25,6 @@ public bool IsOk public bool IsBadRequest => StatusCode == HttpStatusCode.BadRequest; - public bool IsUnauthorized - => StatusCode == HttpStatusCode.Unauthorized; - public Pet OkContent => IsOk && ContentObject is Pet result ? result @@ -37,9 +34,4 @@ public ValidationProblemDetails BadRequestContent => IsBadRequest && ContentObject is ValidationProblemDetails result ? result : throw new InvalidOperationException("Content is not the expected type - please use the IsBadRequest property first."); - - public ProblemDetails UnauthorizedContent - => IsUnauthorized && ContentObject is ProblemDetails result - ? result - : throw new InvalidOperationException("Content is not the expected type - please use the IsUnauthorized property first."); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WOPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WOPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs index e83fd001..97374049 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WOPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WOPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace PetStore.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/v1/pets")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class PetsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task ListPets( ListPetsParameters parameters, [FromServices] IListPetsHandler handler, @@ -35,7 +33,6 @@ public async Task ListPets( /// [HttpPost] [ProducesResponseType(typeof(string), StatusCodes.Status201Created)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task CreatePets( [FromServices] ICreatePetsHandler handler, CancellationToken cancellationToken) @@ -48,10 +45,9 @@ public async Task CreatePets( [HttpGet("{petId}")] [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] public async Task ShowPetById( ShowPetByIdParameters parameters, [FromServices] IShowPetByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs index b8bc33c7..b6ec1e40 100644 --- a/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs +++ b/test/Atc.Rest.ApiGenerator.CLI.Tests/Scenarios/PetStore/VerifyServerAll/Mvc_WPD/src/PetStore.Api.Generated/Endpoints/PetsController.verified.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // This code was auto-generated by ApiGenerator x.x.x.x. // // Changes to this file may cause incorrect behavior and will be lost if @@ -9,7 +9,6 @@ namespace PetStore.Api.Generated.Endpoints; /// /// Endpoint definitions. /// -[Authorize] [ApiController] [Route("/v1/pets")] [GeneratedCode("ApiGenerator", "x.x.x.x")] @@ -22,7 +21,6 @@ public sealed class PetsController : ControllerBase [HttpGet] [ProducesResponseType(typeof(IEnumerable), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task ListPets( ListPetsParameters parameters, [FromServices] IListPetsHandler handler, @@ -35,7 +33,6 @@ public async Task ListPets( /// [HttpPost] [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status201Created)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task CreatePets( [FromServices] ICreatePetsHandler handler, CancellationToken cancellationToken) @@ -48,10 +45,9 @@ public async Task CreatePets( [HttpGet("{petId}")] [ProducesResponseType(typeof(Pet), StatusCodes.Status200OK)] [ProducesResponseType(typeof(ValidationProblemDetails), StatusCodes.Status400BadRequest)] - [ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status401Unauthorized)] public async Task ShowPetById( ShowPetByIdParameters parameters, [FromServices] IShowPetByIdHandler handler, CancellationToken cancellationToken) => await handler.ExecuteAsync(parameters, cancellationToken); -} +} \ No newline at end of file diff --git a/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs b/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs index bd8a8318..70ee1290 100644 --- a/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs +++ b/test/Atc.Rest.ApiGenerator.OpenApi.Tests/Extensions/OpenApiPathItemExtensionsTests.cs @@ -108,6 +108,12 @@ public void ExtractApiPathAuthorization( }, }; + if (expectedUseAllowAnonymous is null) + { + apiPath.Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired); + apiPath.Operations.Values.First().Extensions.Remove(SecurityExtensionNameConstants.AuthenticationRequired); + } + // Act var result = apiPath.ExtractApiPathAuthorization();