-
-
Notifications
You must be signed in to change notification settings - Fork 528
fix docs typos #1836
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
fix docs typos #1836
Conversation
|
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.
Thanks for the PR! A clean documentation is way more professional. Happy to merge this once the commit is solved
|
||
```tsx | ||
import createFetchClient from "openapi-fetch"; | ||
import createClient from "openapi-react-query"; | ||
import type { paths } from "./my-openapi-3-schema"; // generated by openapi-typescript |
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.
We use double quotes in this repository and I think we should keep documentation with the same rules (default biome ones)
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.
Updated, thanks. My autoformat on save was the culprit, lol.
@@ -25,11 +25,11 @@ Next, generate TypeScript types from your OpenAPI schema using openapi-typescrip | |||
npx openapi-typescript ./path/to/api/v1.yaml -o ./src/lib/api/v1.d.ts | |||
``` | |||
|
|||
> ⚠️ Be sure to <a href="https://redocly.com/docs/cli/commands/lint/" target="_blank" rel="noopener noreferrer">validate your schemas</a>! openapi-typescript will err on invalid schemas. | |||
> ⚠️ Be sure to <a href="https://redocly.com/docs/cli/commands/lint/" target="_blank" rel="noopener noreferrer">validate your schemas</a>! openapi-typescript will error on invalid schemas. |
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.
“err“ is correct; that is a verb. “Error” is a noun, so this isn’t correct.
However, this sentence only applies to 6.x, not 7.x (since that will validate). So we could just remove this altogether.
@@ -42,25 +42,25 @@ const fetchClient = createFetchClient<paths>({ | |||
const $api = createClient(fetchClient); | |||
|
|||
const MyComponent = () => { | |||
const { data, error, isLoading } = $api.useQuery( | |||
const { data, error, isPending } = $api.useQuery( |
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.
const { data, error, isPending } = $api.useQuery( | |
const { data, error, isLoading } = $api.useQuery( |
? I’m confused; this should be isLoading
, shouldn’t it? Why the change?
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.
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.
You have v5 as a peer dependency.
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.
Ah thanks for explaining! I missed that. I think we have some other docs out-of-date, then. This is good for now!
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.
Great fixes, thank you!
Changes
Just fixing some docs typos.
How to Review
NA
Checklist
docs/
updated (if necessary)pnpm run update:examples
run (only applicable for openapi-typescript)