一键导入
servicestack-dto-design
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Designs request/response DTOs using DTO-first, message-based ServiceStack conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Designs stable, discoverable APIs using routes, metadata, and versioning conventions.
Implements authentication using ServiceStack Auth Providers and session handling.
Applies role-, permission-, and ownership-based authorization using ServiceStack idioms.
Implements AutoQuery services, custom filters, and permission-aware querying.
Controls OpenAPI / metadata exposure without compromising ServiceStack-first design.
Uses OrmLite via the implicit Db connection and understands transaction semantics and rollback behavior.
| name | servicestack-dto-design |
| description | Designs request/response DTOs using DTO-first, message-based ServiceStack conventions. |
ServiceStack APIs are defined by their Request DTOs. Follow these principles for robust API design.
GetCustomers, CreateOrder).IReturn<T> to define the response type.
public class GetCustomer : IReturn<CustomerResponse>
{
public int Id { get; set; }
}
IVerb interfaces (e.g., IGet, IPost) to restrict allowed HTTP methods.[Route] attribute to define the API endpoint.
[Route("/customers/{Id}", "GET")]
ResponseStatus property to enable structured error handling by clients.
public class CustomerResponse
{
public Customer Result { get; set; }
public ResponseStatus ResponseStatus { get; set; }
}
GetCustomersResponse instead of List<Customer>) for future extensibility.ServiceModel) so they can be shared with clients without code generation.DataTable) in DTOs.[Api("Description")] and [ApiMember(Description="...")] attributes to enrich metadata/Swagger.