Add description and documentation support to API Definition endpoint#25022
Open
tntwist wants to merge 6 commits intoabpframework:devfrom
Open
Add description and documentation support to API Definition endpoint#25022tntwist wants to merge 6 commits intoabpframework:devfrom
tntwist wants to merge 6 commits intoabpframework:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional description/documentation data to ABP’s API Definition endpoint so consumers (proxy/code generators, API explorers) can access summaries/remarks/display metadata without relying on OpenAPI.
Changes:
- Extends API definition models (controllers/actions/parameters/return values/types/properties) with documentation-related fields.
- Introduces
includeDescriptionsrequest flag and XML-doc extraction viaIXmlDocumentationProvider/XmlDocumentationProvider. - Adds integration test coverage plus a documented test app service/DTO and enables XML doc generation for the test app.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/IDocumentedAppService.cs | Adds a documented test app service contract with XML docs for extraction tests. |
| framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/Dto/DocumentedDto.cs | Adds a documented DTO with XML docs + Description/Display attributes for type/property description tests. |
| framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs | Adds a documented app service implementation used by API definition integration tests. |
| framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj | Enables XML documentation file generation for the test app assembly. |
| framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Description_Tests.cs | Adds tests validating default behavior vs includeDescriptions and interaction with includeTypes. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/TypeApiDescriptionModel.cs | Adds Summary/Remarks/Description/DisplayName fields to type modeling. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ReturnValueApiDescriptionModel.cs | Adds return value Summary support. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/PropertyApiDescriptionModel.cs | Adds Summary/Description/DisplayName fields to property modeling. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs | Adds Summary/Description/DisplayName fields to parameter modeling. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/MethodParameterApiDescriptionModel.cs | Adds Summary/Description/DisplayName fields to method parameter modeling. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs | Adds controller documentation fields and includes them in sub-model creation. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModelRequestDto.cs | Adds IncludeDescriptions request flag. |
| framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs | Adds action documentation fields. |
| framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs | Populates descriptions based on XML docs and attributes; wires includeDescriptions and type/property enrichment. |
| framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/XmlDocumentationProvider.cs | New XML documentation reader with per-assembly caching. |
| framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/IXmlDocumentationProvider.cs | New abstraction for XML doc extraction. |
You can also share your feedback on Copilot code review. Take the survey.
...src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/XmlDocumentationProvider.cs
Outdated
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/MethodParameterApiDescriptionModel.cs
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ControllerApiDescriptionModel.cs
Show resolved
Hide resolved
...src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs
Outdated
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/TypeApiDescriptionModel.cs
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ReturnValueApiDescriptionModel.cs
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/PropertyApiDescriptionModel.cs
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ParameterApiDescriptionModel.cs
Show resolved
Hide resolved
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ActionApiDescriptionModel.cs
Show resolved
Hide resolved
Contributor
Author
|
The pr build and test failed to to flaky sqlite tests. |
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/IApiDescriptionModelProvider.cs
Outdated
Show resolved
Hide resolved
...c/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController.cs
Show resolved
Hide resolved
...work/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/InterfaceOnlyDocumentedAppService.cs
Show resolved
Hide resolved
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs
Show resolved
Hide resolved
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs
Show resolved
Hide resolved
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs
Show resolved
Hide resolved
framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Application/DocumentedAppService.cs
Show resolved
Hide resolved
…ed XML documentation handling and caching
maliming
approved these changes
Mar 9, 2026
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.
Description
The API definition endpoint provides metadata about available endpoints, DTOs, and types, but lacks any description or documentation information. Users who need summaries, remarks, display names or descriptions currently have to fall back to the OpenAPI specification. This change brings that information directly into the ABP API definition model, making it available to dynamic proxy generators, code generators, and API explorers without requiring an OpenAPI dependency.
Checklist
How to test it?
Usage
Default — no descriptions (backward compatible, dont overbloat if not documentation not required.)
GET /api/abp/api-definition
With descriptions
GET /api/abp/api-definition?includeDescriptions=true
With descriptions and type information
GET /api/abp/api-definition?includeDescriptions=true&includeTypes=true