# zipmark/rspec_api_documentation

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zipmark-rspec-api-documentation).**

1,452 stars · 368 forks · Ruby · MIT

## Links

- GitHub: https://github.com/zipmark/rspec_api_documentation
- awesome-repositories: https://awesome-repositories.com/repository/zipmark-rspec-api-documentation.md

## Topics

`api` `rspec` `ruby`

## Description

This project is an automated documentation generator that synchronizes API reference materials with actual code behavior. By capturing live HTTP request and response data during the execution of existing test suites, it ensures that documentation remains accurate and consistent with the underlying application.

The tool distinguishes itself by integrating directly into the test runner lifecycle, allowing developers to define API specifications and metadata within their test blocks. This approach enables a test-driven documentation workflow where API behavior is recorded and mapped to structured documentation fields automatically.

The framework supports a broad range of output options, including the generation of standardized OpenAPI schemas, Markdown, and HTML files. It provides granular control over the final output through content filtering and resource organization, allowing for the selective inclusion of endpoints and the logical grouping of API examples.

## Tags

### Web Development

- [API Documentation Tools](https://awesome-repositories.com/f/web-development/api-documentation-tools.md) — Provides a utility that captures live HTTP request and response data during test execution to ensure documentation remains synchronized with code.
- [API Schema Exports](https://awesome-repositories.com/f/web-development/api-schema-generation/api-schema-exports.md) — Converts captured API specifications into standard formats like JSON, HTML, and OpenAPI for sharing across different platforms. ([source](https://github.com/zipmark/rspec_api_documentation#readme))
- [Request Body Documentation](https://awesome-repositories.com/f/web-development/request-body-documentation.md) — Allows developers to define HTTP headers, query parameters, and request bodies directly within test blocks to document expected API behavior. ([source](https://github.com/zipmark/rspec_api_documentation/blob/master/README.md))
- [OpenAPI Specification Generators](https://awesome-repositories.com/f/web-development/restful-apis/documentation-schemas/openapi-specification-generators.md) — Converts application test cases into standardized OpenAPI schemas to ensure compatibility with external API design and testing tools.

### Part of an Awesome List

- [Live API Documentation Generators](https://awesome-repositories.com/f/awesome-lists/devtools/documentation-and-api-tools/live-api-documentation-generators.md) — Triggers live HTTP requests during test execution to record real-world request and response data for documentation. ([source](https://github.com/zipmark/rspec_api_documentation/blob/master/README.md))

### Development Tools & Productivity

- [API Documentation Generators](https://awesome-repositories.com/f/development-tools-productivity/api-documentation-generators.md) — Automatically generates API documentation by scanning and processing existing test suites to ensure accuracy and consistency. ([source](https://github.com/zipmark/rspec_api_documentation#readme))
- [Test-Driven Documentation Generators](https://awesome-repositories.com/f/development-tools-productivity/api-documentation-generators/test-driven-documentation-generators.md) — Extracts API specifications and request examples from existing test suites to produce documentation in formats like OpenAPI and Markdown.

### Software Engineering & Architecture

- [Automated API Documentation](https://awesome-repositories.com/f/software-engineering-architecture/automated-api-documentation.md) — Generates accurate and up-to-date API reference materials by extracting request and response data directly from existing test suites.
- [Attribute-to-Specification Mapping](https://awesome-repositories.com/f/software-engineering-architecture/attribute-to-specification-mapping.md) — Uses a domain-specific language within test blocks to map test parameters and metadata to structured API documentation fields.
- [Request Interception Middleware](https://awesome-repositories.com/f/software-engineering-architecture/request-interception-middleware.md) — Captures live HTTP traffic by injecting a recording layer into the application stack during the execution of automated test cases.

### Testing & Quality Assurance

- [Test Lifecycle Hooks](https://awesome-repositories.com/f/testing-quality-assurance/general-testing-utilities/test-utilities-assertions/test-lifecycle-execution-control/test-lifecycle-hooks.md) — Hooks into the test runner lifecycle to intercept and record request and response data during the execution of existing test suites.
- [Test-Driven Development Workflows](https://awesome-repositories.com/f/testing-quality-assurance/test-driven-development-workflows.md) — Maintains documentation as a natural part of the development process by capturing API behavior during the execution of automated tests.
