diff --git a/.github/workflows/pull-request-sonar.yml b/.github/workflows/pull-request-sonar.yml index 95b71b7..dfc41a1 100644 --- a/.github/workflows/pull-request-sonar.yml +++ b/.github/workflows/pull-request-sonar.yml @@ -3,7 +3,7 @@ on: pull_request: types: [opened, synchronize, reopened] paths: - - "src/*" + - "src/**" workflow_dispatch: # defaults: diff --git a/.github/workflows/push-image.yaml b/.github/workflows/push-image.yaml index 192a850..770ccbc 100644 --- a/.github/workflows/push-image.yaml +++ b/.github/workflows/push-image.yaml @@ -3,7 +3,7 @@ name: Publish Image on: push: paths: - - 'src/*' + - 'src/**' branches: - main workflow_dispatch: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 313285b..fb90996 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -2,7 +2,6 @@ # docker-compose -f ../docker/docker-compose.yml up -d --build # docker-compose -f ../docker/docker-compose.yml down --remove-orphans -version: '3.8' services: # cachorro.api: # hostname: cachorro-api @@ -43,15 +42,15 @@ services: ports: - 1433:1433 - sonarqube: - image: sonarqube:10.4.1-community - hostname: sonar-canal-deploy - container_name: sonar-canal-deploy - restart: always - networks: - - cachorro-net - ports: - - 9044:9000 + # sonarqube: + # image: sonarqube:10.4.1-community + # hostname: sonar-canal-deploy + # container_name: sonar-canal-deploy + # restart: always + # networks: + # - cachorro-net + # ports: + # - 9044:9000 networks: cachorro-net: diff --git a/src/DEPLOY.Cachorro.Api/Controllers/TestsResourcesController.cs b/src/DEPLOY.Cachorro.Api/Controllers/TestsResourcesController.cs index 50db436..a1925f8 100644 --- a/src/DEPLOY.Cachorro.Api/Controllers/TestsResourcesController.cs +++ b/src/DEPLOY.Cachorro.Api/Controllers/TestsResourcesController.cs @@ -3,9 +3,12 @@ using Azure.Security.KeyVault.Secrets; using DEPLOY.Cachorro.Api.Extensions.AppConfiguration.Configs; using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; +using System; using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.Api.Controllers { @@ -34,7 +37,7 @@ public TestsResourcesController( } [HttpGet("keyvault/withoptions/{key}")] - public async Task GetAsync(string key) + public async Task GetKeyAsync(string key) { SecretClientOptions options = new SecretClientOptions() { diff --git a/src/DEPLOY.Cachorro.Api/Controllers/v1/AdocoesController.cs b/src/DEPLOY.Cachorro.Api/Controllers/v1/AdocoesController.cs index a50d1bd..65cdeb6 100644 --- a/src/DEPLOY.Cachorro.Api/Controllers/v1/AdocoesController.cs +++ b/src/DEPLOY.Cachorro.Api/Controllers/v1/AdocoesController.cs @@ -1,8 +1,13 @@ using Asp.Versioning; using DEPLOY.Cachorro.Application.Interfaces.Services; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; +using System; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.Api.Controllers.v1 { diff --git a/src/DEPLOY.Cachorro.Api/Controllers/v1/CachorrosController.cs b/src/DEPLOY.Cachorro.Api/Controllers/v1/CachorrosController.cs index e8fbebc..9c18e23 100644 --- a/src/DEPLOY.Cachorro.Api/Controllers/v1/CachorrosController.cs +++ b/src/DEPLOY.Cachorro.Api/Controllers/v1/CachorrosController.cs @@ -3,8 +3,14 @@ using DEPLOY.Cachorro.Application.Dtos; using DEPLOY.Cachorro.Application.Interfaces.Services; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.Api.Controllers.v1 { diff --git a/src/DEPLOY.Cachorro.Api/Controllers/v1/TutoresController.cs b/src/DEPLOY.Cachorro.Api/Controllers/v1/TutoresController.cs index 561975e..c1f5be3 100644 --- a/src/DEPLOY.Cachorro.Api/Controllers/v1/TutoresController.cs +++ b/src/DEPLOY.Cachorro.Api/Controllers/v1/TutoresController.cs @@ -2,9 +2,13 @@ using DEPLOY.Cachorro.Application.Dtos; using DEPLOY.Cachorro.Application.Interfaces.Services; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.Api.Controllers.v1 { @@ -82,19 +86,21 @@ public async Task CreateAsync( CancellationToken cancellationToken = default) { var item = await _tutorAppServices.InsertAsync( - tutorDto, + tutorDto, cancellationToken); if (item.Erros.Any()) return UnprocessableEntity(item.Erros); return CreatedAtAction("GetById", - new { + new + { id = item.Id, version = new ApiVersion( 1, 0) - .ToString() }, + .ToString() + }, item); } @@ -119,11 +125,11 @@ public async Task UpdateAsync( var retorned = await _tutorAppServices.UpdateAsync( id, - tutorDto, + tutorDto, cancellationToken); - return !retorned.Any() ? NoContent() - : UnprocessableEntity(retorned); + return !retorned.Any() ? NoContent() + : UnprocessableEntity(retorned); } [HttpDelete("{id:long}")] diff --git a/src/DEPLOY.Cachorro.Api/DEPLOY.Cachorro.Api.csproj b/src/DEPLOY.Cachorro.Api/DEPLOY.Cachorro.Api.csproj index 9e686e6..77bae57 100644 --- a/src/DEPLOY.Cachorro.Api/DEPLOY.Cachorro.Api.csproj +++ b/src/DEPLOY.Cachorro.Api/DEPLOY.Cachorro.Api.csproj @@ -6,11 +6,10 @@ $(NoWarn);1591 $(NoWarn);8604 $(NoWarn);8603 - enable - CachorroAPI_Local - true + $(NoWarn);8602 + CachorroAPI_MVP + True Linux - /subscriptions/f4574f09-7fab-45bd-8eb5-508b8c6aa04a/resourceGroups/rg-canaldeploy-dev/providers/microsoft.insights/components/appi-cachorroapi-dev 2.3.0 diff --git a/src/DEPLOY.Cachorro.Api/Extensions/AppConfiguration/AppConfigurationExtension.cs b/src/DEPLOY.Cachorro.Api/Extensions/AppConfiguration/AppConfigurationExtension.cs index 2afd7c0..0a25d86 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/AppConfiguration/AppConfigurationExtension.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/AppConfiguration/AppConfigurationExtension.cs @@ -1,6 +1,9 @@ using DEPLOY.Cachorro.Api.Extensions.AppConfiguration.Configs; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.AzureAppConfiguration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement; +using System; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.Api.Extensions.AppConfiguration diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Auth/AuthExtension.cs b/src/DEPLOY.Cachorro.Api/Extensions/Auth/AuthExtension.cs index 6fb429a..8869d94 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Auth/AuthExtension.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Auth/AuthExtension.cs @@ -1,6 +1,8 @@ using Azure.Identity; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Azure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Identity.Web; using System.Diagnostics.CodeAnalysis; diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Database/DatabaseExtension.cs b/src/DEPLOY.Cachorro.Api/Extensions/Database/DatabaseExtension.cs index c8241a8..2117a08 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Database/DatabaseExtension.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Database/DatabaseExtension.cs @@ -1,6 +1,9 @@ using DEPLOY.Cachorro.Infra.Repository; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.Api.Extensions.Database diff --git a/src/DEPLOY.Cachorro.Api/Extensions/KeyVault/KeyVaultExtension.cs b/src/DEPLOY.Cachorro.Api/Extensions/KeyVault/KeyVaultExtension.cs index 4ce7b51..d33adcc 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/KeyVault/KeyVaultExtension.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/KeyVault/KeyVaultExtension.cs @@ -1,5 +1,7 @@ using Azure.Identity; using Microsoft.Extensions.Azure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.Api.Extensions.KeyVault diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/ConfigureSwaggerOptions.cs b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/ConfigureSwaggerOptions.cs index 6134a54..3dc323a 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/ConfigureSwaggerOptions.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/ConfigureSwaggerOptions.cs @@ -1,9 +1,11 @@ using Asp.Versioning; using Asp.Versioning.ApiExplorer; using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Text; diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerDefaultValues.cs b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerDefaultValues.cs index ba73fe8..fae73ad 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerDefaultValues.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerDefaultValues.cs @@ -2,7 +2,9 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json; namespace DEPLOY.Cachorro.Api.Extensions.Swagger diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerExtension.cs b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerExtension.cs index 271d091..430bac9 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerExtension.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Swagger/SwaggerExtension.cs @@ -1,7 +1,12 @@ using Asp.Versioning; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; namespace DEPLOY.Cachorro.Api.Extensions.Swagger { diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/AppInsightsExtensions.cs b/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/AppInsightsExtensions.cs index 25d7cc0..6c04caa 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/AppInsightsExtensions.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/AppInsightsExtensions.cs @@ -1,5 +1,7 @@ using Microsoft.ApplicationInsights.DependencyCollector; using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.Api.Extensions.Telemetria diff --git a/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/LoggingExtensions.cs b/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/LoggingExtensions.cs index 2c4404b..45deec9 100644 --- a/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/LoggingExtensions.cs +++ b/src/DEPLOY.Cachorro.Api/Extensions/Telemetria/LoggingExtensions.cs @@ -1,4 +1,6 @@ -using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.Api.Extensions.Telemetria { diff --git a/src/DEPLOY.Cachorro.Api/Program.cs b/src/DEPLOY.Cachorro.Api/Program.cs index 6f5d886..e0696c2 100644 --- a/src/DEPLOY.Cachorro.Api/Program.cs +++ b/src/DEPLOY.Cachorro.Api/Program.cs @@ -7,6 +7,9 @@ using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; using DEPLOY.Cachorro.Infra.CrossCutting; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; namespace DEPLOY.Cachorro.Api { [ExcludeFromCodeCoverage] diff --git a/src/DEPLOY.Cachorro.MinimalApi/DEPLOY.Cachorro.MinimalApi.csproj b/src/DEPLOY.Cachorro.MinimalApi/DEPLOY.Cachorro.MinimalApi.csproj index 4a62a2f..0b23fdd 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/DEPLOY.Cachorro.MinimalApi.csproj +++ b/src/DEPLOY.Cachorro.MinimalApi/DEPLOY.Cachorro.MinimalApi.csproj @@ -7,12 +7,10 @@ $(NoWarn);8604 $(NoWarn);8603 $(NoWarn);8602 - enable - CachorroAPI_Local + CachorroAPI_MVP True Linux - /subscriptions/f4574f09-7fab-45bd-8eb5-508b8c6aa04a/resourceGroups/rg-canaldeploy-dev/providers/microsoft.insights/components/appi-cachorroapi-dev - 1.1.0-MinimalApi + 1.3.0-MinimalApi diff --git a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/TestResourcesEndpoints.cs b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/TestResourcesEndpoints.cs index ceea4dc..c166b8a 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/TestResourcesEndpoints.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/TestResourcesEndpoints.cs @@ -2,10 +2,21 @@ using Azure.Core; using Azure.Identity; using Azure.Security.KeyVault.Secrets; +using DEPLOY.Cachorro.Application.Dtos; using DEPLOY.Cachorro.MinimalApi.Configs; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Routing; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Options; using Microsoft.FeatureManagement; using Microsoft.OpenApi.Models; +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.MinimalApi.Endpoints { @@ -30,7 +41,7 @@ public static void MapTestResourcesEndpoints(this IEndpointRouteBuilder app) IConfiguration configuration, CancellationToken cancellationToken) => { - async Task GetAsync( + async Task GetKeyAsync( string key) { SecretClientOptions options = new SecretClientOptions() @@ -56,7 +67,7 @@ async Task GetAsync( return TypedResults.Ok(secretValue); } - return await GetAsync(key); + return await GetKeyAsync(key); }) .WithOpenApi(operation => new(operation) { @@ -99,7 +110,7 @@ string key IOptions settings, CancellationToken cancellationToken) => { - async Task GetAsync() + async Task> GetAsync() { return TypedResults.Ok(settings.Value.ValorDaMensagem); } diff --git a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/AdocoesEndpoints.cs b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/AdocoesEndpoints.cs index b535000..7d6817c 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/AdocoesEndpoints.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/AdocoesEndpoints.cs @@ -1,7 +1,15 @@ using Asp.Versioning; using DEPLOY.Cachorro.Application.Interfaces.Services; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Routing; using Microsoft.OpenApi.Models; +using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.MinimalApi.Endpoints.v1 { diff --git a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/CachorroEndpoints.cs b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/CachorroEndpoints.cs index 321529f..79d6738 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/CachorroEndpoints.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/CachorroEndpoints.cs @@ -1,9 +1,17 @@ using Asp.Versioning; using DEPLOY.Cachorro.Application.Dtos; using DEPLOY.Cachorro.Application.Interfaces.Services; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.AspNetCore.Routing; using Microsoft.OpenApi.Models; +using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.MinimalApi.Endpoints.v1 { diff --git a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/TutorEndpoints.cs b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/TutorEndpoints.cs index 5907e53..a13191d 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/TutorEndpoints.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v1/TutorEndpoints.cs @@ -1,9 +1,17 @@ using Asp.Versioning; using DEPLOY.Cachorro.Application.Dtos; using DEPLOY.Cachorro.Application.Interfaces.Services; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Routing; using Microsoft.OpenApi.Models; +using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; namespace DEPLOY.Cachorro.MinimalApi.Endpoints.v1 { @@ -113,7 +121,7 @@ async Task CreateTutorAsync() Description = "Operação para cadastrar tutor", Tags = new List { new() { Name = "Tutores" } } }); - + tutores.MapPut("/{id:long}", async ( long id, TutorDto tutorDto, diff --git a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v2/CachorroEndpoints.cs b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v2/CachorroEndpoints.cs index decad01..6437383 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v2/CachorroEndpoints.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Endpoints/v2/CachorroEndpoints.cs @@ -1,5 +1,9 @@ using Asp.Versioning; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Routing; using Microsoft.OpenApi.Models; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Endpoints.v2 diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/AppConfiguration/AppConfigurationExtension.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/AppConfiguration/AppConfigurationExtension.cs index fc1a27e..d6cef77 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/AppConfiguration/AppConfigurationExtension.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/AppConfiguration/AppConfigurationExtension.cs @@ -1,6 +1,9 @@ using DEPLOY.Cachorro.MinimalApi.Configs; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration.AzureAppConfiguration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.FeatureManagement; +using System; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Extensions.AppConfiguration diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Auth/AuthExtension.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Auth/AuthExtension.cs index 00da686..c1a905a 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Auth/AuthExtension.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Auth/AuthExtension.cs @@ -1,6 +1,8 @@ using Azure.Identity; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Azure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Identity.Web; using System.Diagnostics.CodeAnalysis; diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Database/DatabaseExtension.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Database/DatabaseExtension.cs index 8003b49..787bfe2 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Database/DatabaseExtension.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Database/DatabaseExtension.cs @@ -1,6 +1,10 @@ using DEPLOY.Cachorro.Infra.Repository; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Extensions.Database diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/KeyVault/KeyVaultExtension.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/KeyVault/KeyVaultExtension.cs index 4e3cddf..4b963cb 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/KeyVault/KeyVaultExtension.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/KeyVault/KeyVaultExtension.cs @@ -1,5 +1,7 @@ using Azure.Identity; using Microsoft.Extensions.Azure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Extensions.KeyVault diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/ConfigureSwaggerOptions.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/ConfigureSwaggerOptions.cs index 4ef57a6..29edd73 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/ConfigureSwaggerOptions.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/ConfigureSwaggerOptions.cs @@ -1,9 +1,11 @@ using Asp.Versioning; using Asp.Versioning.ApiExplorer; using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; using System.Text; diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerDefaultValues.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerDefaultValues.cs index 2c0ac7e..6e47539 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerDefaultValues.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerDefaultValues.cs @@ -2,7 +2,9 @@ using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.OpenApi.Models; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text.Json; namespace DEPLOY.Cachorro.MinimalApi.Extensions.Swagger diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerExtension.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerExtension.cs index e70f552..f84a95a 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerExtension.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Swagger/SwaggerExtension.cs @@ -1,7 +1,12 @@ using Asp.Versioning; +using Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Swashbuckle.AspNetCore.SwaggerGen; +using System; using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; namespace DEPLOY.Cachorro.MinimalApi.Extensions.Swagger { diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/AppInsightsExtensions.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/AppInsightsExtensions.cs index 8e6554b..16028ab 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/AppInsightsExtensions.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/AppInsightsExtensions.cs @@ -1,5 +1,7 @@ using Microsoft.ApplicationInsights.DependencyCollector; using Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Extensions.Telemetria diff --git a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/LoggingExtensions.cs b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/LoggingExtensions.cs index 24eba01..b7a1266 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/LoggingExtensions.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Extensions/Telemetria/LoggingExtensions.cs @@ -1,4 +1,6 @@ -using System.Diagnostics.CodeAnalysis; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using System.Diagnostics.CodeAnalysis; namespace DEPLOY.Cachorro.MinimalApi.Extensions.Telemetria { diff --git a/src/DEPLOY.Cachorro.MinimalApi/Program.cs b/src/DEPLOY.Cachorro.MinimalApi/Program.cs index 07dec40..b173b35 100644 --- a/src/DEPLOY.Cachorro.MinimalApi/Program.cs +++ b/src/DEPLOY.Cachorro.MinimalApi/Program.cs @@ -10,6 +10,9 @@ using DEPLOY.Cachorro.MinimalApi.Endpoints; using DEPLOY.Cachorro.MinimalApi.Extensions.KeyVault; using DEPLOY.Cachorro.MinimalApi.Extensions.AppConfiguration; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; var builder = WebApplication.CreateBuilder(args);