diff --git a/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs b/src/Atc.Rest.ApiGenerator.Client.CSharp/ContentGenerators/ContentGeneratorClientEndpoint.cs index 123ce39a8..cf70e95f5 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 9b7bb12ae..cca7359d2 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 2e335d010..dde620922 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 9491dfbef..efb74b77d 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 52516e28c..ee471dd42 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 c87b3e550..3b8529f79 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 6b7f509e8..4ad0ebe80 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 fe3bc23ae..0659c8625 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 040088874..24250760b 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 790650075..1e07398dd 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 0ac111e8e..6f5f9fb53 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 62d599187..4ed705081 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 264159b68..7913a85ac 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 72f164a33..28fc1b63c 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 6def8c88d..afc2bbdd2 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 6380a491b..0f8147c54 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 075ba1ad1..3a6eaa866 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 d5de9b2c9..b427c3bdf 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 d581adaaf..c31d3a41c 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 f04dc19d9..6bb7505d8 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 820db63ea..9ac36c735 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 13cf0f3b5..1d1d91691 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 148138751..90e1b9ade 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 97da800c4..63dd7649d 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 1c15d9c7c..856daae01 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 944b6e044..9099e1ff5 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 f9f4dd567..7d1cc806e 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 e90dad637..8393fa33e 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 e2b99e2c4..3d4a64d1d 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 a4665c4e3..ee77feab3 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 46ba7de10..62c1f1c42 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 d70f60573..b19fedabd 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 2727d3f04..ef23793da 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 c8d210234..463ec1eb9 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 16787a4b2..ec06c6743 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 c036fd960..abdf560f8 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 5ef606d69..c5639c17f 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 b6400159a..aa392dabc 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 3b9d8c371..ce157279d 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 c25ca3e98..9b68a2f21 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 1d2fccb41..cfecdde2c 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 efa6d566d..5d4fa103c 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 658b3e19c..a699daaf8 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 9ab6e3f96..b7d32ad21 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 af8b9d6a3..051e2f48b 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 cff861110..e1b69a154 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 825f3483b..c064dab2b 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 3abf09f99..492e22af0 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 4923958e4..690abe36b 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 2e0923dff..8e81565d8 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 4d823b952..bf7812281 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 f2886c4a9..1c14d0b8c 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 ab8004a3b..fe87c4227 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 1e519927c..3b0bd2a26 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 c457e7428..a8353c6fc 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 a278fbc75..d8373c3c1 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 048432276..63bc4fd9f 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 dd2ab217a..d6d4770b7 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 c7b575ce5..97b771267 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 e96c9c60f..5cf125da6 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 a426c461d..7646aae7d 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 c01861d9c..b15f8ba18 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 1723b8750..37163c4a6 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 63c133047..d93042784 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 9b404e9bb..67a88e035 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 bb23ee5f3..02eb21503 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 b259d9db2..055105928 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 88cc434ad..462962f19 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 0484e88b4..609ec6794 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 3db77b1ca..0d1a5664c 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 ef3e9b2f4..6249971f8 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 d45543669..d51786aa3 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 36e77b777..d61918acf 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 785203b83..3cfb1be4a 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 c5fee9374..f5a53ca99 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 f9ad2ca5f..610c15fa7 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 899d3b17f..6419af9d9 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 1cabdbf2b..4a51de0b1 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 bfe836a5f..1f4480576 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 c236a12e5..bfce0e62f 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 4b73cb8ba..afc2bbdd2 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 849991bf2..957561c8d 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 ad2455e0c..3a6eaa866 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 c0fb692ad..01f540030 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 4b503a97f..c31d3a41c 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 e90add1a8..e114a5981 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 5bf530cd4..6d79cc3e2 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 57075be3b..1d1d91691 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 77b6f9d60..c8cdbe079 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 8689bee7b..63dd7649d 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 fe0d8755f..856daae01 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 9ec09081d..be6a03d6f 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 46d28cdca..7d1cc806e 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 b24ed836d..8393fa33e 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 3a23810a8..726f3eb89 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 f11599a49..2685ac7aa 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 0ed2c716b..7d46ff43e 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 20daa9e9b..49224d133 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 4088b1955..b6962b2e4 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 5b088116d..c1425ca0f 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 df17b8c2c..ec06c6743 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 6e5db245b..662c23602 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 bc1a79e55..c5639c17f 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 cf013f9ee..99d3d554f 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 f972fdc40..ce157279d 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 1fd200f68..f44ab612f 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 870b0108a..cfecdde2c 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 3073bc114..2cbe1ca74 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 540e74689..a699daaf8 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 ffeace3f9..b29032181 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 6f441f597..bc8e63dd2 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 0f780b020..751c91c0f 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 7b5c4605e..c064dab2b 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 babd88d41..1f1afd165 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 b3044d3fb..690abe36b 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 57a490d84..f52ec9d37 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 bf260124d..f35b8866c 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 0397604a3..122d0bc7e 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 a72ed6c77..336a2cb75 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 0cd179b70..8fe0da47d 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 29aac17c4..33059f17a 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 5772a3eb5..a23ede249 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 f59a33291..59a0af1b2 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 e997ec060..1c14d0b8c 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 eac3dd8c8..fe87c4227 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 0707c316d..3b0bd2a26 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 20e66842a..a8353c6fc 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 31ea79ca2..d8373c3c1 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 85751d11b..63bc4fd9f 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 acde01cb8..423308682 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 4ae2862d4..daeada42a 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 f743076d3..01ff8dc32 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 5ca1308bf..8ce283361 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 a40d6e990..28bc66221 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 f81ecdf00..d19ca634d 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 e9d19bbc4..94f9a32dc 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 8d971630a..a56e0a2c4 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 08fae9ff8..d63f49ce2 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 e7ddcc941..7818a0b94 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 80bd278b8..e208186af 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 9b1b5ae18..9657f4cff 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 7ef393e4d..7b292a58b 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 1c4336b2f..6180f2553 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 30aeb4684..07982bad4 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 35f93d28d..b939f7e69 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 89e779cca..f45c03fc4 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 3287d873f..90538d731 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 35c96ed47..4a0fc8254 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 1b5231886..54d1e3385 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 3afbb9954..c2eadff50 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 aef33a8d9..a317ab7f1 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 b117190dc..540a89818 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 4fc1886e4..32352b1f3 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 df19492db..3d5673c38 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 33c2a662a..ecec17ec3 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 dcf284d3a..b298dcc34 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 020111628..083dffaab 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 de390460c..f52111d46 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 c307f0c90..64483980a 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 3d1c24c6e..bad4144bf 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 e5b56a274..438324624 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 3f11b9a1d..9ac80437c 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 0834f126d..09039f761 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 9c1059128..ab8c198b9 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 8d63cb7ec..c1a887d7e 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 c0d5c7b97..743d73e90 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 a68ad23c2..20ed5aef2 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 8b99948dd..806938425 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 f258c9de6..1f86b328b 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 df5f61217..a317ab7f1 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 745b4cae1..540a89818 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 a1791fa1f..32352b1f3 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 e1e0b4c07..3d5673c38 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 a2982f58f..ecec17ec3 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 2af7854b6..51a9c5b96 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 3ebd17718..b298dcc34 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 3a34818dd..083dffaab 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 d756e905d..b8b37f2b9 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 e5f6a20a7..45bc866f1 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 97ae02c9a..edfbddf55 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 3496c5db4..10d904f27 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 641bbccc9..d4e709779 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 865eaaa38..bbf578a7d 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 4fb8ac53e..ccd230b9a 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 5b1cdac59..d1e6eec0f 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 a4f04f77d..5f0a9232a 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 e8478e78c..6600a2866 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 cff73def8..79bf0e1a8 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 ab25fe2c5..a80a1fa71 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 ddfb9cbb9..404f82e42 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 bf58787bd..cd82a2c62 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 a08bba9e8..5f0a9232a 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 21cc9d32f..b7ed9e0ca 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 54c0b9360..daae638b5 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 35b00910a..a80a1fa71 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 7f3460a4d..404f82e42 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 24b9df208..cd82a2c62 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 33bf6accc..ae2497bbe 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 8003d44a3..769a2a21a 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 75d7865b4..8267f2492 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 2a20e7afa..68f469d6f 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 27d0926b3..769a2a21a 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 75d7865b4..8267f2492 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 1b8c7a9c4..b883dd489 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 71c3aa98c..422211041 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 6db13d58d..b883dd489 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 5f31281db..422211041 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 674518e90..33338c088 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 5e6695380..2d0e0adf0 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 bcd1305cf..9dea92f34 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 5506c3d1e..c0095e6ba 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 e1321fb2f..11f4f5e53 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 82de70ec3..63dc6ec7a 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 f76db8050..33338c088 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 4013e38c4..bfb7031d8 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 a0f29eddb..2485e39bf 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 6f1305b75..c0095e6ba 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 1338d4519..b7c775e60 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 c621298b3..fe71d09f6 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 3d019a4ac..d98c10a2c 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 38a14e80a..b3e6efd2e 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 c7873de59..d98c10a2c 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 9a82f28ad..b3e6efd2e 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 2c7041e69..6370bedfc 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 8a7ace6b1..9482aa343 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 19a4c00c1..bfcb8ff8f 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 a2980c70a..5d5a80518 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 8ab18cff8..ad31f7857 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 e06162cd1..ccf069826 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 c216bad07..2c6604e8c 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 5baa75a5a..13fe2de9b 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 c5ceed630..0a238b144 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 783c1dd2f..433c75a2e 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 b1d9e3f0e..4cf347310 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 987e65498..92c3721b3 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 608e0c2cd..c45f9f500 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 3c30ab70c..cc9492eec 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 900baf897..ccaa56635 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 8fe4978a9..5b1a1fd8d 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 7a905b356..93ccbd47e 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 a43eb852d..7b9543220 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 6c7f6bb69..6370bedfc 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 db27926ba..a0d370ce6 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 6fe23bc6b..bfcb8ff8f 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 a3982b5b5..5d5a80518 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 da3943f84..6f88fbec9 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 376027560..ccf069826 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 886b24da0..2c6604e8c 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 8e841354c..7b87823cc 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 670e4ee78..0a238b144 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 68dd2b600..54843b8c4 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 0e46f994a..2c9b1852e 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 fe6cb466a..418d43994 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 87146d4e3..c45f9f500 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 78fb88ca2..cc9492eec 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 f82884f05..ccaa56635 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 19b83274c..5d0275018 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 db41c0965..93ccbd47e 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 b5609053b..4c3322cc9 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 5c334eacf..b24e47f72 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 3977cc59d..49cb5c716 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 0c07a8ed6..613714a54 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 e58004e2c..ef502823d 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 9031ecc71..1200752ba 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 d4d519c44..b20894b08 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 aeec30b81..6c474457c 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 4b4315f23..b24e47f72 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 e71fe2a10..49cb5c716 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 5c0a2ce2f..613714a54 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 504013a84..ef502823d 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 769e969db..33e0d43c8 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 bd400b855..be6ed4981 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 5c633ea72..61664b88b 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 e0717e5f2..271b49862 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 a2888b10e..0c66cd51c 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 fe1cc743a..415963a77 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 a2e438c33..334cecd15 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 512fa57c6..f4aee1b4d 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 3021a5a77..91306ad88 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 cb6dd14f4..bf904e02d 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 e1cb2b93c..ab3b5f6af 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 5df7cfc19..c72a182f2 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 236714525..04a5f69d4 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 12e2fd5b8..119d8190f 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 7c76b5433..9c7dcdd7c 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 218d07294..b90111085 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 d7523eb9c..b55a91fb0 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 3c46c7dfd..93a5d8475 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 fb7e02830..6dd28a28e 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 e2bebc9c8..6eb3c8af6 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 ac8d5bdf4..20ff92843 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 42d4d30dc..40302d24b 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 fa7898bd9..633bf68da 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 e62db02e1..aa461c4dc 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 1c03f32ef..44a8fee2a 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 7ae5facd8..14c4301c5 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 d421cb2f4..2650f3b09 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 84e9c591c..0b7bf9a49 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 f5cd5ce5f..82e4db547 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 a09f1ad23..6e7885924 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 4be5064df..92e0adfa5 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 5318569f0..155450bf9 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 054ebe7a2..e5a144037 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 d9795176c..75ddfd1e0 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 596fc5902..043b099d6 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 2f448c626..7d6385bba 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 e3ca9ca8b..0b7bf9a49 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 2e938c3f6..154e1f42d 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 1361c7149..6e7885924 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 6bbe64936..5485a4c66 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 e83fd001a..973740494 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 b8bc33c7e..b6ec1e405 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 bd8a83181..70ee1290e 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();