-
Notifications
You must be signed in to change notification settings - Fork 21
docs(superagent-wrapper): Restructure documentation as Diátaxis #1039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ence section
This commit refactors the documentation for the `@api-ts/superagent-wrapper` package, migrating technical details from the main README into a dedicated, structured Reference section following the Diátaxis framework.
**Motivation:**
The previous documentation, while providing a getting started guide, lacked a formal, easily navigable technical reference for the package's core components. Users needing specific details about function signatures, parameters, return types, or the structure of the generated API client had to infer them from the narrative guide and examples. Adopting the Diátaxis framework provides a standardized, clear structure for technical information, improving user experience and maintainability.
**Changes Implemented:**
1. **Established Diátaxis Reference Structure:** Created a new documentation structure under `docs/reference/superagent-wrapper/` specifically for reference material.
2. **Component-Based File Organization:** Split the reference documentation into multiple MDX files, each focusing on a distinct component or concept:
* `index.mdx`: Provides an overview and entry point for the `@api-ts/superagent-wrapper` reference section.
* `superagent-request-factory.mdx`: Contains the detailed technical reference for the `superagentRequestFactory` function.
* `supertest-request-factory.mdx`: Contains the detailed technical reference for the `supertestRequestFactory` function.
* `build-api-client.mdx`: Contains the detailed technical reference for the `buildApiClient` function.
* `api-client.mdx`: Provides a comprehensive description of the structure of the `ApiClient` object returned by `buildApiClient`, including its operation methods, the `PreparedRequest` methods (`.decode()`, `.decodeExpecting()`), and the structure of the `ApiResponse`/`SpecificApiResponse` objects.
3. **Content Migration and Enhancement:** Extracted technical details and examples from the original README and rewrote them into formal reference documentation. This includes:
* Precise descriptions of each function's purpose.
* Clear representation of function signatures (including conceptual type definitions where applicable).
* Detailed breakdown of parameters and return values.
* Technical explanation of the generated `ApiClient` object's structure and behavior.
* Explicit documentation of the `.decode()` and `.decodeExpecting()` methods and the response objects they return, including notes on type narrowing.
**Benefits (Impact on Users):**
* **Improved Findability:** Users can now directly navigate to the specific component they need information about (e.g., `buildApiClient`, `.decode()`).
* **Enhanced Clarity:** Provides clear, unambiguous technical descriptions separate from narrative guides.
* **Better Organization:** Structured according to a well-regarded documentation framework (Diátaxis).
* **Increased Detail:** Offers more explicit information on signatures, types, and the behavior of the generated client than was previously available.
* **Consistency:** Aligns the documentation approach with other packages potentially using the same framework (e.g., `@api-ts/io-ts-http`).
This restructuring significantly improves the quality and usability of the technical documentation for `@api-ts/superagent-wrapper`.
vmccarty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
🎉 This PR is included in version @api-ts/typed-express-router@2.0.0-beta.1 🎉 The release is available on npm package (@beta dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/express-wrapper@2.0.0-beta.1 🎉 The release is available on npm package (@beta dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/typed-express-router@1.1.14 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/express-wrapper@1.0.34 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/superagent-wrapper@1.3.4 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version @api-ts/openapi-generator@5.8.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
This PR refactors the documentation for the
@api-ts/superagent-wrapperpackage, migrating technical details from the main README into a dedicated, structured Reference section following the Diátaxis framework.Motivation:
Adopting the Diátaxis framework provides a standardized, clear structure for technical information, improving user experience and maintainability.
Changes Implemented:
docs/reference/superagent-wrapper/specifically for reference material.index.mdx: Provides an overview and entry point for the@api-ts/superagent-wrapperreference section.superagent-request-factory.mdx: Contains the detailed technical reference for thesuperagentRequestFactoryfunction.supertest-request-factory.mdx: Contains the detailed technical reference for thesupertestRequestFactoryfunction.build-api-client.mdx: Contains the detailed technical reference for thebuildApiClientfunction.api-client.mdx: Provides a comprehensive description of the structure of theApiClientobject returned bybuildApiClient, including its operation methods, thePreparedRequestmethods (.decode(),.decodeExpecting()), and the structure of theApiResponse/SpecificApiResponseobjects.ApiClientobject's structure and behavior..decode()and.decodeExpecting()methods and the response objects they return, including notes on type narrowing.Benefits (Impact on Users):
buildApiClient,.decode()).@api-ts/io-ts-http).This restructuring significantly improves the quality and usability of the technical documentation for
@api-ts/superagent-wrapper.