Skip to content
Back to skills

Swagger Openapi Patterns

ASecurity

Use when designing APIs with OpenAPI/Swagger.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 10, 2026
ai-agentstestingapidocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add LoopyLuci/Skills --skill swagger-openapi-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swagger Openapi Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Swagger Openapi Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/loopyluci-swagger-openapi-patterns/badge)](https://www.skillsdirectory.com/skills/loopyluci-swagger-openapi-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: swagger-openapi-patterns
description: "Use when designing APIs with OpenAPI/Swagger."
version: 1.0.0
author: Hermes Agent
license: MIT
metadata:
  hermes:
    tags: [OpenAPI, Swagger, API-design, REST, specification, codegen]
    related_skills: [api-design-and-documentation, api-testing-patterns, api-rate-limiting, graphql-api-implementation]
---

# OpenAPI/Swagger Patterns

Designing APIs with OpenAPI Specification — from spec-first design through code generation, validation, documentation, and SDK generation.

## When to Use

- Designing REST APIs with OpenAPI 3.x
- Spec-first API development (spec → code)
- Auto-generating API documentation
- Generating client SDKs from spec
- Validating API requests/responses against spec

## OpenAPI Patterns

```yaml
openapi: 3.0.3
info:
  title: User API
  version: 1.0.0
  description: Manages user accounts and profiles

paths:
  /users/{userId}:
    get:
      summary: Get user by ID
      parameters:
        - name: userId
          in: path
          required: true
          schema: $ref: '#/components/schemas/UserId'
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema: $ref: '#/components/schemas/User'

components:
  schemas:
    UserId:
      type: string
      pattern: '^usr_[a-zA-Z0-9]{24}$'
      example: usr_abc123def456ghi789jkl0
    User:
      type: object
      required: [id, email, name]
      properties:
        id: $ref: '#/components/schemas/UserId'
        email: { type: string, format: email }
        name: { type: string, minLength: 1, maxLength: 100 }
        createdAt: { type: string, format: date-time }
```

## Verification Checklist

- [ ] Spec-first design (spec written before implementation)
- [ ] All endpoints documented with request/response schemas
- [ ] Reusable components defined ($ref, not inline)
- [ ] Validation: spec validates (openapi-generator validate)
- [ ] Request/response validation middleware in API server
- [ ] Client SDKs generated (openapi-generator)
- [ ] API documentation published (Swagger UI, Redoc)
- [ ] Breaking changes detected in CI (openapi-diff)
- [ ] Pagination, error responses, rate limiting documented

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…