Валидация REST API эндпоинтов на соответствие OpenAPI схеме и консистентность параметров. Использовать при реализации эндпоинтов, ревью кода или перед слиянием изменений API.
Detected risks:
The 'endpoint-validator' skill is designed to validate REST API endpoints against the OpenAPI specification to ensure they are correctly implemented and maintain consistency in parameter definitions. This tool is essential for developers when creating or modifying API endpoints, as it ensures that the endpoints comply with the defined data structures, enforce proper validation constraints, and adhere to best practices. By using this skill, developers can catch issues early in the development process, which reduces the risk of API errors in production environments.
The skill offers several key capabilities, including validation of the 'DataStructure.php' and 'SaveRecordAction.php' files for completeness and compliance with specified patterns. It checks for the presence of required methods and attributes such as parameter type, description, and validation constraints, ensuring consistency across the API. Additionally, it tests the schema validation in strict mode and generates detailed compliance reports that offer actionable recommendations for improvement. By automating these checks, it saves time during code reviews, ensuring that any changes or additions to the API meet the desired standards.
The primary use cases for this skill include validating new API implementations, reviewing changes to existing endpoints, and preparing API code before merging changes in pull requests. It is particularly useful for teams involved in API development, code reviews, and maintaining consistency across multiple API endpoints. It can be used in any project where OpenAPI compliance and parameter validation are critical.
You should use this skill when implementing new API endpoints, modifying existing ones, reviewing API code changes, before merging API-related pull requests, or after changes to 'DataStructure.php' files.
You need the 'DataStructure.php' and 'SaveRecordAction.php' files for the specific resource you're working with, such as 'Extensions', 'Providers', or 'IncomingRoutes'.
The validation process checks the completeness of parameter definitions in 'DataStructure.php', ensures compliance with the 7-phase pattern in 'SaveRecordAction.php', verifies schema validation in strict mode, and generates a compliance report.
This skill requires tools like Bash, Read, Grep, and Glob to identify and validate the necessary files and parameters.
If validation fails, the skill generates a compliance report with actionable recommendations to address the issues found, such as missing parameters or incorrect validation constraints.
Quick Setup:
.claude/skills/Repository
mikopbx/Core