aibdd.form.api-spec

Generate OpenAPI 3.0.0 YAML specifications from Gherkin feature files.

1|Updated Apr 20, 2025
One-click install
npx skills add https://github.com/j7-dev/wp-power-checkout --skill aibdd-form-api-spec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aibdd.form.api-spec
Source: https://github.com/j7-dev/wp-power-checkout/tree/main/.github/skills/aibdd.form.api-spec
Command: npx skills add https://github.com/j7-dev/wp-power-checkout --skill aibdd-form-api-spec

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of OpenAPI (Swagger) specifications from Behavior-Driven Development (BDD) feature files, streamlining API documentation and ensuring consistency between documentation and implementation.

Core Features & Use Cases

  • Automated Spec Generation: Converts .feature files into api.yml compliant with OpenAPI 3.0.0.
  • Endpoint Mapping: Each Feature file maps to a distinct API endpoint.
  • Schema Derivation: Extracts request and response schemas from Gherkin steps and datatables.
  • Use Case: After writing BDD tests for a new API endpoint, use this Skill to automatically generate the corresponding OpenAPI specification, ensuring your documentation is always up-to-date with your tests.

Quick Start

Generate the API specification file from all completed feature files located in the '/features/specs' directory.

Frequently Asked Questions about aibdd.form.api-spec

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

FAQPage Schema
How do I generate OpenAPI specs from BDD feature files?

To generate OpenAPI specs from BDD feature files, you use an automated tool that parses completed Gherkin syntax and datatables to derive a compliant OpenAPI 3.0.0 YAML file. It maps each feature file directly to a distinct API endpoint.

Can BDD Gherkin scenarios automatically infer HTTP methods and request bodies?

Yes, BDD Gherkin scenarios can automatically infer HTTP methods, paths, request bodies, and response schemas. The generation process maps command and query features to extract path and query parameters while mapping appropriate HTTP response status codes.

What is the best way to keep API documentation up-to-date with BDD tests?

The best way to keep API documentation up-to-date with BDD tests is to derive OpenAPI specifications directly from your feature files. This ensures your Swagger documentation accurately reflects your test scenarios without manual updates.

Does OpenAPI spec generation from Gherkin support query and path parameter extraction?

Yes, OpenAPI spec generation from Gherkin supports automatic query and path parameter extraction. It processes command and query features to map Gherkin steps and datatables into structured request parameters and response schemas.

How are Gherkin datatables mapped to request and response schemas in OpenAPI?

Gherkin datatables are mapped to request and response schemas by parsing the structured data within the feature steps. This derivation process translates the tabular BDD syntax into the required JSON schema definitions for the OpenAPI 3.0.0 specification.

What limitations exist when converting feature files to OpenAPI YAML?

When converting feature files to OpenAPI YAML, the output is strictly limited to OpenAPI 3.0.0 compliance and relies entirely on the structural completeness of your Gherkin syntax. Complex schemas may require well-defined datatables to ensure accurate API specification inference.