rest-api-design

Design RESTful API endpoints with OpenAPI 3.1 contracts and bounded pagination.

3|1|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/Probably-Group/Dev-AID --skill rest-api-design-probably-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rest-api-design
Source: https://github.com/Probably-Group/Dev-AID/tree/main/.dev-aid/skills/expert/rest-api-design
Command: npx skills add https://github.com/Probably-Group/Dev-AID --skill rest-api-design-probably-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

It prevents fragile or insecure REST APIs by enforcing consistent resource modeling, correct HTTP semantics, bounded pagination, and secure request/response patterns that reduce common vulnerability classes.

Core Features & Use Cases

  • Resource-first endpoint modeling: Uses noun-based, pluralized collections, consistent instance URLs, nested resource conventions, and action sub-resources.
  • Production-ready OpenAPI specs: Requires OpenAPI 3.1 structure, standardized components, and predictable schemas for requests, responses, and errors.
  • Safe API contracts: Enforces authentication, authorization per resource, strict input validation, bounded pagination, standard error envelopes, and safe HTTP status code usage.
  • Security guardrails: Applies anti-pattern bans and explicit mitigations aligned with IDOR, mass assignment, information disclosure, and unbounded consumption risks.

Quick Start

Use the rest-api-design skill to generate an OpenAPI 3.1 specification for your REST endpoints with secure auth, paginated list responses, consistent error schemas, and correct HTTP status codes for CRUD operations.

Frequently Asked Questions about rest-api-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a REST API with proper pagination and resource modeling?

Secure a REST API by enforcing per-resource authorization, strict input validation via schemas, and rate limiting. You must also ban anti-patterns like IDOR and mass assignment while configuring safe CORS to prevent information leakage and unbounded consumption risks.

How do I generate an OpenAPI 3.1 specification for CRUD endpoints?

Generate OpenAPI 3.1 specifications by defining standardized components, predictable request and response schemas, and standard error envelopes. Apply correct HTTP method semantics and safe status codes to document versioning for REST services.

What is the best way to prevent IDOR and mass assignment in REST APIs?

Prevent IDOR and mass assignment by enforcing authentication and per-resource authorization alongside strict input validation via schemas. Applying these security guardrails stops attackers from accessing unauthorized objects or bulk modifying attributes.

Does this REST API design approach support cursor-based pagination?

Yes, this REST API design approach supports bounded pagination using both standard page/limit strategies and optional cursor patterns. These pagination strategies prevent unbounded result sets and ensure reliable list responses.

How do I document versioning for REST services in an OpenAPI contract?

Document versioning for REST services within an OpenAPI 3.1 contract by structuring standardized components and defining predictable schemas for requests, responses, and errors. This ensures consistent API version management across endpoints.