-
Notifications
You must be signed in to change notification settings - Fork 21
feat(docs): Add core @api-ts/io-ts-http docs to Docusaurus #1037
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
35eb83f to
7f1b629
Compare
| can lead to undefined behavior. The library tries to prevent this statically where | ||
| possible. |
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.
| can lead to undefined behavior. The library tries to prevent this statically where | |
| possible. | |
| can lead to undefined behavior. The library tries to prevent this where statically |
|
|
||
| ### Overview | ||
|
|
||
| Creates a codec that represents a value of a specified type or `undefined`. This is |
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.
Implied subject again. Add it to the sentence.
|
|
||
| ### Overview | ||
|
|
||
| Creates a codec for an object type where properties whose codecs can resolve to |
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.
Add the implied subject.
|
|
||
| ### Overview | ||
|
|
||
| Creates a codec that decodes a nested structure into a flat object and encodes a flat |
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.
| Creates a codec that decodes a nested structure into a flat object and encodes a flat | |
| The `flattened` combinator creates a codec that decodes a nested structure into a flat |
It's odd that this sentence omits the subject. Add the implied subject to the sentence so we're not talking around it.
|
|
||
| ### Overview | ||
|
|
||
| A helper function that builds `io-ts` codecs specifically for HTTP requests. It defines |
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.
Add the implied subject.
| // Decoded type: { message: string; count: number } | ||
| ``` | ||
|
|
||
| - Path and Body Parameters: |
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.
| - Path and Body Parameters: | |
| - Path and body parameters: |
|
|
||
| ### Usage Examples | ||
|
|
||
| - Route with Path Parameter and Multiple Responses: |
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.
| - Route with Path Parameter and Multiple Responses: | |
| - Route with path parameter and multiple responses: |
| }); | ||
| ``` | ||
|
|
||
| - Route with Request Body: |
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.
| - Route with Request Body: | |
| - Route with request body: |
| ### Advanced Usage Notes | ||
|
|
||
| - Non-Object Request Body: If a route requires a non-object body (e.g., a raw string), | ||
| `httpRequest` cannot define this directly. Use `t.intersection` to combine an |
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.
| `httpRequest` cannot define this directly. Use `t.intersection` to combine an | |
| `httpRequest` can't define this directly. Use `t.intersection` to combine an |
Conjunctions are okay and even good. They read more naturally.
|
|
||
| ### Overview | ||
|
|
||
| A helper function that defines a single HTTP route, specifying its path, method, request |
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.
Add the implied subject.
Introduces initial Docusaurus documentation files (.mdx) for key components of the `@api-ts/io-ts-http` package, including: `apiSpec`, `httpRoute`, `httpRequest`, `GenericHttpRequest`, `flattened`, `optional`, and `optionalize`. This is part of the effort to consolidate fragmented documentation (READMEs, Confluence, etc.) into a single source of truth on the new Docusaurus website. chore: add vivian's feedback
aaec846 to
3e6d373
Compare
|
🎉 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 📦🚀 |
Introduces initial Docusaurus documentation files (.mdx) for key
components of the
@api-ts/io-ts-httppackage, including:apiSpec,httpRoute,httpRequest,GenericHttpRequest,flattened,optional, andoptionalize.This is part of the effort to consolidate fragmented documentation
(READMEs, Confluence, etc.) into a single source of truth on the
new Docusaurus website.