Abp api

From burakdmir/abp-skills · View interactive version

Abp api is an AI agent skill from the GitHub repository burakdmir/abp-skills. ABP Framework v10.x (10.4–10.6) API development: Auto API Controllers, dynamic and static C#/JS client proxies, Swagger, API versioning, Integration Services. Use when you need a REST API, controller, dynamic proxy or client generation in ABP.

How to use this skill

Skill file

ABP Framework — API Development

ABP Framework v10.x (10.4–10.6) API development. Auto API Controllers, Dynamic/Static C# Clients, Swagger, API Versioning.

Trigger

Auto API Controllers

PreConfigure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ConventionalControllers.Create(typeof(BookStoreApplicationModule).Assembly);
});

HTTP Method Mapping

| Prefix | HTTP |

|---|---|

| GetList, GetAll, Get | GET |

| Put, Update | PUT |

| Delete, Remove | DELETE |

| Create, Add, Insert, Post | POST |

| Patch | PATCH |

Route Examples

| Method | Route |

|---|---|

| GetAsync(Guid id) | /api/app/book/{id} |

| GetListAsync() | /api/app/book |

| CreateAsync(CreateBookDto input) | /api/app/book |

| UpdateAsync(Guid id, UpdateBookDto input) | /api/app/book/{id} |

| DeleteAsync(Guid id) | /api/app/book/{id} |

RemoteService

[RemoteService(IsEnabled = false)]  // Don't expose as API
public class PersonAppService : ApplicationService { }

Dynamic C# Client Proxies

abp add-package Volo.Abp.Http.Client
context.Services.AddHttpClientProxies(typeof(BookStoreApplicationContractsModule).Assembly);
{ "RemoteServices": { "Default": { "BaseUrl": "http://localhost:53929/" } } }
// Usage — inject the interface
var books = await _bookAppService.GetListAsync();

Static C# Client Proxies

abp generate-proxy -t csharp
abp generate-proxy -t csharp --without-contracts

Swagger

context.Services.AddAbpSwaggerGen(options =>
{
    options.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
});

// Init
app.UseSwagger();
app.UseAbpSwaggerUI(options => options.SwaggerEndpoint("/swagger/v1/swagger.json", "v1"));

API Versioning

[ApiVersion("1.0")]
[ApiVersion("2.0")]
public class BookAppService : ApplicationService, IBookAppService { }

Best Practices

  1. Use Auto API Controllers — don't write controllers manually
  2. Use dynamic client proxies — don't use HttpClient manually
  3. Prefer static proxies in production
  4. Add JWT auth in Swagger
  5. Ensure backward compatibility with API versioning

v10.6+

Related

DDD · UI · Microservices · Authorization · Docs: https://abp.io/docs/latest/framework/api-development

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.