Skip to content

Conversation

@youngjungithub
Copy link
Contributor

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.

@youngjungithub youngjungithub requested review from a team as code owners April 17, 2025 15:50
@youngjungithub youngjungithub marked this pull request as draft April 17, 2025 15:53
@youngjungithub youngjungithub marked this pull request as ready for review April 17, 2025 15:59
Comment on lines 29 to 30
can lead to undefined behavior. The library tries to prevent this statically where
possible.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Path and Body Parameters:
- Path and body parameters:


### Usage Examples

- Route with Path Parameter and Multiple Responses:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Route with Path Parameter and Multiple Responses:
- Route with path parameter and multiple responses:

});
```

- Route with Request Body:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`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
Copy link
Contributor

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
@omeradeel26 omeradeel26 merged commit 58b65fb into master Apr 17, 2025
6 checks passed
@omeradeel26 omeradeel26 deleted the codehike branch April 17, 2025 20:40
@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

@github-actions
Copy link

🎉 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 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants