django-openapi-contract-validator

Validate Django REST Framework APIs against their OpenAPI contracts.

1|Updated Mar 17, 2025
One-click install
npx skills add https://github.com/MaciWP/CV_Astro --skill django-openapi-contract-validator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: django-openapi-contract-validator
Source: https://github.com/MaciWP/CV_Astro/tree/main/.claude/skills/django-openapi-contract-validator
Command: npx skills add https://github.com/MaciWP/CV_Astro --skill django-openapi-contract-validator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Django REST Framework, drf-spectacular, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automatically validates your Django REST Framework API against its OpenAPI (Swagger) contract, ensuring that your implementation matches the specification and preventing discrepancies.

Core Features & Use Cases

  • Schema Compliance: Verify that API request and response bodies adhere to the defined schemas, preventing data inconsistencies.
  • Parameter Validation: Check that all required parameters are handled correctly and that their types and constraints match the contract.
  • Use Case: Validate a Django DRF /products endpoint against its OpenAPI specification, ensuring that the API's actual behavior (e.g., response structure, error codes) matches the documented contract.

Quick Start

Validate the Django DRF /users/{id} GET endpoint against its OpenAPI contract, checking that the response schema matches the specification.