Add v2 REST API and application service layer - #253
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a transport-independent application layer and resource-oriented v2 REST API while retaining legacy endpoints.
Changes:
- Adds v2 resources, REST error mapping, authentication, and split Swagger documents.
- Migrates shared application, configuration, release, node, and service-instance workflows into application services.
- Adds unit, integration, architecture, and compatibility tests plus API documentation.
Reviewed changes
Copilot reviewed 59 out of 60 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.gitignore |
Tracks application release sources. |
AgileConfig.sln |
Adds application projects. |
docs/api-v2.md |
Documents v2 API. |
docs/application-layer.md |
Documents layer responsibilities. |
src/AgileConfig.Server.Application/AgileConfig.Server.Application.csproj |
Defines application project. |
src/AgileConfig.Server.Application/ApplicationError.cs |
Defines use-case errors. |
src/AgileConfig.Server.Application/ApplicationManagement.cs |
Defines application contracts. |
src/AgileConfig.Server.Application/ApplicationManagementService.cs |
Implements application workflows. |
src/AgileConfig.Server.Application/ApplicationResult.cs |
Adds result abstractions. |
src/AgileConfig.Server.Application/Configurations/ConfigurationManagementContracts.cs |
Defines configuration contracts. |
src/AgileConfig.Server.Application/Configurations/ConfigurationManagementService.cs |
Implements configuration workflows. |
src/AgileConfig.Server.Application/Configurations/PublishedConfigurationQueryService.cs |
Queries published configurations. |
src/AgileConfig.Server.Application/ICurrentUserAccessor.cs |
Abstracts current-user access. |
src/AgileConfig.Server.Application/Nodes/NodeManagementModels.cs |
Defines node contracts. |
src/AgileConfig.Server.Application/Nodes/NodeManagementService.cs |
Implements node workflows. |
src/AgileConfig.Server.Application/Releases/ReleaseManagementContracts.cs |
Defines release contracts. |
src/AgileConfig.Server.Application/Releases/ReleaseManagementService.cs |
Implements release workflows. |
src/AgileConfig.Server.Application/ServiceCollectionExt.cs |
Registers application services. |
src/AgileConfig.Server.Application/ServiceInstances/ServiceInstanceManagementModels.cs |
Defines service-instance contracts. |
src/AgileConfig.Server.Application/ServiceInstances/ServiceInstanceManagementService.cs |
Implements registry workflows. |
src/AgileConfig.Server.Apisite/AgileConfig.Server.Apisite.csproj |
References application layer. |
src/AgileConfig.Server.Apisite/Application/AppsettingsPreviewModeAccessor.cs |
Adapts preview settings. |
src/AgileConfig.Server.Apisite/Application/HttpCurrentUserAccessor.cs |
Adapts HTTP user context. |
src/AgileConfig.Server.Apisite/Controllers/AppController.cs |
Migrates legacy application actions. |
src/AgileConfig.Server.Apisite/Controllers/ConfigController.cs |
Migrates legacy configuration actions. |
src/AgileConfig.Server.Apisite/Controllers/ServerNodeController.cs |
Migrates node management. |
src/AgileConfig.Server.Apisite/Controllers/ServiceController.cs |
Migrates service management. |
src/AgileConfig.Server.Apisite/Controllers/api/AppController.cs |
Removes controller delegation. |
src/AgileConfig.Server.Apisite/Controllers/api/ConfigController.cs |
Uses configuration services. |
src/AgileConfig.Server.Apisite/Controllers/api/NodeController.cs |
Uses node services. |
src/AgileConfig.Server.Apisite/Controllers/api/RegisterCenterController.cs |
Uses registry services. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/ApplicationsController.cs |
Adds v2 application endpoints. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/ConfigurationsController.cs |
Adds v2 configuration endpoints. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/ApplicationModels.cs |
Defines application resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/ConfigurationModels.cs |
Defines configuration resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/NodeModels.cs |
Defines node resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/ReleaseModels.cs |
Defines release resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/ServiceInstanceModels.cs |
Defines registry resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/Models/V2MappingExtensions.cs |
Maps entities to v2 resources. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/NodesController.cs |
Adds v2 node endpoints. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/PublishedConfigurationsController.cs |
Adds authenticated configuration pulls. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/ReleasesController.cs |
Adds release and rollback endpoints. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/ServiceInstancesController.cs |
Adds registry endpoints. |
src/AgileConfig.Server.Apisite/Controllers/api/v2/V2EnvironmentFilterAttribute.cs |
Validates environments. |
src/AgileConfig.Server.Apisite/Startup.cs |
Registers services and Swagger documents. |
test/AgileConfig.Server.ApplicationTests/AgileConfig.Server.ApplicationTests.csproj |
Defines application tests. |
test/AgileConfig.Server.ApplicationTests/ApplicationLayerDependencyTests.cs |
Enforces layer boundaries. |
test/AgileConfig.Server.ApplicationTests/ApplicationManagementServiceTests.cs |
Tests application workflows. |
test/AgileConfig.Server.ApplicationTests/ConfigurationManagementServiceTests.cs |
Tests configuration workflows. |
test/AgileConfig.Server.ApplicationTests/NodeManagementServiceTests.cs |
Tests node workflows. |
test/AgileConfig.Server.ApplicationTests/PublishedConfigurationQueryServiceTests.cs |
Tests published queries. |
test/AgileConfig.Server.ApplicationTests/ReleaseManagementServiceTests.cs |
Tests release workflows. |
test/AgileConfig.Server.ApplicationTests/ServiceInstanceManagementServiceTests.cs |
Tests registry workflows. |
test/ApiSiteTests/ControllerDependencyArchitectureTests.cs |
Prevents controller dependencies. |
test/ApiSiteTests/SwaggerDocumentIntegrationTests.cs |
Verifies Swagger separation. |
test/ApiSiteTests/TestApiConfigController.cs |
Updates configuration mocks. |
test/ApiSiteTests/TestAppController.cs |
Updates application mocks. |
test/ApiSiteTests/V2ApiSiteTestHost.cs |
Provides isolated API host. |
test/ApiSiteTests/V2ControllerErrorMappingTests.cs |
Tests HTTP error mapping. |
test/ApiSiteTests/V2RestApiEndpointsIntegrationTests.cs |
Exercises v2 REST behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgileConfig.Server.Applicationso legacy and v2 controllers share transport-independent use cases without controller-to-controller dependenciesVerification
dotnet build AgileConfig.sln --no-restoregit diff --checkDocker-backed MongoDB, MySQL, and PostgreSQL tests were not run locally.