Skip to content

Commit

Permalink
Update repo (#1704)
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow authored Jun 19, 2024
1 parent 2770a0b commit 3845e55
Show file tree
Hide file tree
Showing 30 changed files with 194 additions and 196 deletions.
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "drwpow/openapi-typescript" }],
"$schema": "https://unpkg.com/@changesets/config@3.0.1/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "openapi-ts/openapi-typescript" }],
"ignore": ["openapi-typescript-docs", "@example/*"],
"commit": false,
"fixed": [],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ _(in case it’s not obvious)_

**Checklist**

- [ ] I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md))
- [ ] I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md))
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report-ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ _(in case it’s not obvious)_
**Checklist**

- [ ] My OpenAPI schema passes the [Redocly validator](https://redocly.com/docs/cli/commands/lint/) (`npx @redocly/cli@latest lint`)
- [ ] I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md))
- [ ] I’m willing to open a PR (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md))
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ _Write out the proposed syntax change. Please reference any prior art or similar

**Checklist**

- [ ] I’m willing to open a PR for this (see [CONTRIBUTING.md](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md))
- [ ] I’m willing to open a PR for this (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/CONTRIBUTING.md))
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request-ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ _Outline the change to the library. If this is for the CLI, propose a flag name

**Checklist**

- [ ] I’m willing to open a PR for this (see [CONTRIBUTING.md](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md))
- [ ] I’m willing to open a PR for this (see [CONTRIBUTING.md](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/CONTRIBUTING.md))
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Contributions are appreciated and welcome! See the appropriate guide for each pa

## ♥️ Thanks

- Thanks to [the Project Sponsors](#sponsors) for keeping this project going!
- Thanks to [dozens of lovely, smart contributors](https://github.com/drwpow/openapi-typescript/graphs/contributors) that made this library possible
- Thanks to [the Project Sponsors](#-sponsors) for keeping this project going!
- Thanks to [dozens of lovely, smart contributors](https://github.com/openapi-ts/openapi-typescript/graphs/contributors) that made this library possible
- Thanks to [Vitepress](https://vitepress.dev/) for the docs site
- Thanks to [Cloudflare Pages](https://pages.cloudflare.com/) for docs site hosting
- Thanks to [Algolia](https://www.algolia.com/) for the docs site search
6 changes: 2 additions & 4 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ export const en = defineConfig({
indexName: "openapi-ts",
},
},
socialLinks: [
{ icon: "github", link: "https://github.com/drwpow/openapi-typescript" },
],
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
footer: {
message:
'Released under the <a href="https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.',
'Released under the <a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT License</a>.',
},
},
});
2 changes: 1 addition & 1 deletion docs/.vitepress/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const shared = defineConfig({
locales: { ...zhSearch },
},
},
socialLinks: [{ icon: "github", link: "https://github.com/drwpow/openapi-typescript" }],
socialLinks: [{ icon: "github", link: "https://github.com/openapi-ts/openapi-typescript" }],
},
transformPageData({ relativePath, frontmatter }) {
frontmatter.head ??= [];
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const zh = defineConfig({

footer: {
message:
'基于 <a href="https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT</a> 许可发布',
'基于 <a href="https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE">MIT</a> 许可发布',
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions docs/6.x/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Quickstart

openapi-typescript turns [OpenAPI 3.0 & 3.1](https://spec.openapis.org/oas/latest.html) schemas into TypeScript quickly using Node.js. No Java/node-gyp/running OpenAPI servers necessary.

The code is [MIT-licensed](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE) and free for use.
The code is [MIT-licensed](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE) and free for use.

## Features

Expand All @@ -20,7 +20,7 @@ _Note: OpenAPI 2.x is supported with versions `5.x` and previous_

## Examples

👀 [See examples](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/examples/)
👀 [See examples](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/examples/)

## Setup

Expand Down
6 changes: 3 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ See the [README](./README.md) for basic setup.

## Corrections / small edits

Corrections are always welcome! Please go straight to [opening a PR](https://github.com/drwpow/openapi-typescript/pulls) for correcting typos or misinformation. Small grammar edits are also welcome such as shortening verbose language or clarifying confusing statements.
Corrections are always welcome! Please go straight to [opening a PR](https://github.com/openapi-ts/openapi-typescript/pulls) for correcting typos or misinformation. Small grammar edits are also welcome such as shortening verbose language or clarifying confusing statements.

## Styling fixes

Styling fixes are also welcome (contrast improvements, styling bugs, general frontend improvements). You can also go straight to [opening a PR](https://github.com/drwpow/openapi-typescript/pulls) for those.
Styling fixes are also welcome (contrast improvements, styling bugs, general frontend improvements). You can also go straight to [opening a PR](https://github.com/openapi-ts/openapi-typescript/pulls) for those.

## Additions & Larger edits

[Opening a new discussion](https://github.com/drwpow/openapi-typescript/discussions) would be appreciated for all of the following:
[Opening a new discussion](https://github.com/openapi-ts/openapi-typescript/discussions) would be appreciated for all of the following:

- Adding a new section or page
- Restructuring the docs
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hero:
link: /introduction
- theme: alt
text: View on GitHub
link: https://github.com/drwpow/openapi-typescript
link: https://github.com/openapi-ts/openapi-typescript

features:
- title: Blazing Fast
Expand Down
4 changes: 2 additions & 2 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The 7.x docs are for a beta release that’s not production-ready yet. See the [

openapi-typescript turns [OpenAPI 3.0 & 3.1](https://spec.openapis.org/oas/latest.html) schemas into TypeScript quickly using Node.js. No Java/node-gyp/running OpenAPI servers necessary.

The code is [MIT-licensed](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE") and free for use.
The code is [MIT-licensed](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE") and free for use.

::: tip

Expand All @@ -32,7 +32,7 @@ _Note: OpenAPI 2.x is supported with versions `5.x` and previous_

## Examples

👀 [See examples](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/examples/)
👀 [See examples](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/examples/)

## Setup

Expand Down
2 changes: 1 addition & 1 deletion docs/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ The biggest change is the handling of `string`s—in 6.x a string could refer to

---

[See the full CHANGELOG](https://github.com/drwpow/openapi-typescript/blob/6.x/packages/openapi-typescript/CHANGELOG.md)
[See the full CHANGELOG](https://github.com/openapi-ts/openapi-typescript/blob/6.x/packages/openapi-typescript/CHANGELOG.md)
10 changes: 5 additions & 5 deletions docs/openapi-fetch/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ Example code of using openapi-fetch with other frameworks and libraries.

[React Query](https://tanstack.com/query/latest) is a perfect wrapper for openapi-fetch in React. At only 13 kB, it provides clientside caching without too much client weight in return. And its stellar type inference preserves openapi-fetch types perfectly with minimal setup.

[View a code example in GitHub](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/react-query)
[View a code example in GitHub](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/react-query)

## Next.js

[Next.js](https://nextjs.org/) is the most popular SSR framework for React. While [React Query](#react--react-query) is recommended for all clientside fetching with openapi-fetch (not SWR), this example shows how to take advantage of Next.js’s [server-side fetching](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch) with built-in caching.

[View a code example in GitHub](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/nextjs)
[View a code example in GitHub](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/nextjs)

## Svelte / SvelteKit

[SvelteKit](https://kit.svelte.dev)’s automatic type inference can easily pick up openapi-fetch’s types in both clientside fetching and [Page Data](https://kit.svelte.dev/docs/load#page-data) fetching. And it doesn’t need any additional libraries to work. SvelteKit also advises to use their [custom fetch](https://kit.svelte.dev/docs/load#making-fetch-requests) in load functions. This can be achieved with [fetch options](/openapi-fetch/api#fetch-options).

_Note: if you’re using Svelte without SvelteKit, the root example in `src/routes/+page.svelte` doesn’t use any SvelteKit features and is generally-applicable to any setup._

[View a code example in GitHub](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/sveltekit)
[View a code example in GitHub](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/sveltekit)

## Vue 3

[Vue 3](https://vuejs.org/) is a popular framework with a large ecosystem. Vue 3’s Composition API is a perfect match for openapi-fetch, as it allows for easy separation of concerns and reactivity.

## [View a code example in GitHub](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/vue-3)
## [View a code example in GitHub](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/vue-3)

Additional examples are always welcome! Please [open a PR](https://github.com/drwpow/openapi-typescript/pulls) with your examples.
Additional examples are always welcome! Please [open a PR](https://github.com/openapi-ts/openapi-typescript/pulls) with your examples.
2 changes: 1 addition & 1 deletion docs/openapi-fetch/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ openapi-fetch is a type-safe fetch client that pulls in your OpenAPI schema. Wei
| superagent | `55 kB` | `50k` ops/s (6× slower) |
| openapi-typescript-codegen | `367 kB` | `100k` ops/s (3× slower) |

_\* [Benchmarks are approximate](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._
_\* [Benchmarks are approximate](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-fetch/test/index.bench.js) to just show rough baseline and will differ among machines and browsers. The relative performance between libraries is more reliable._

The syntax is inspired by popular libraries like react-query or Apollo client, but without all the bells and whistles and in a 5 kb package.

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hero:
link: /zh/introduction
- theme: alt
text: GitHub
link: https://github.com/drwpow/openapi-typescript
link: https://github.com/openapi-ts/openapi-typescript

features:
- title: 快速的
Expand Down
4 changes: 2 additions & 2 deletions docs/zh/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: Quickstart

openapi-typescript 使用 Node.js 快速将 [OpenAPI 3.0 & 3.1](https://spec.openapis.org/oas/latest.html) 模式转换为 TypeScript。无需 Java/node-gyp/运行 OpenAPI 服务器。

该代码受到 [MIT 许可](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE") 保护,可免费使用。
该代码受到 [MIT 许可](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/LICENSE") 保护,可免费使用。

## 特性

Expand All @@ -26,7 +26,7 @@ _注意:OpenAPI 2.x 在版本 `5.x` 及更早版本中受支持_

## 示例

👀 [查看示例](https://github.com/drwpow/openapi-typescript/blob/main/packages/openapi-typescript/examples/)
👀 [查看示例](https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/examples/)

## 安装

Expand Down
10 changes: 5 additions & 5 deletions docs/zh/openapi-fetch/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ title: openapi-fetch 示例

[React Query](https://tanstack.com/query/latest) 是在 React 中完美封装 openapi-fetch 的工具。仅有 13 kB 的大小,提供了客户端缓存而没有太多的客户端负担。其出色的类型推断通过最小的设置完美地保留了 openapi-fetch 的类型。

[在 GitHub 中查看代码示例](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/react-query)
[在 GitHub 中查看代码示例](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/react-query)

## Next.js

[Next.js](https://nextjs.org/) 是 React 的最流行的 SSR 框架。虽然对于所有客户端获取 openapi-fetch,推荐使用 [React Query](#react--react-query)(而不是 SWR),但该示例展示了如何利用 Next.js 的[服务器端获取](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch)并内建缓存。

[在 GitHub 中查看代码示例](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/nextjs)
[在 GitHub 中查看代码示例](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/nextjs)

## Svelte / SvelteKit

[SvelteKit](https://kit.svelte.dev) 的自动类型推断可以轻松地在客户端获取和 [Page Data](https://kit.svelte.dev/docs/load#page-data) 获取中捕获 openapi-fetch 的类型。而且它不需要任何额外的库。SvelteKit 还建议使用它们的[自定义 fetch](https://kit.svelte.dev/docs/load#making-fetch-requests)在 load 函数中工作。这可以通过 [fetch options](/openapi-fetch/api#fetch-options) 实现。

_注意:如果你在没有 SvelteKit 的情况下使用 Svelte,`src/routes/+page.svelte` 中的根示例不使用任何 SvelteKit 特性,通常适用于任何设置。_

[在 GitHub 中查看代码示例](https://github.com/drwpow/openapi-typescript/tree/main/packages/openapi-fetch/examples/sveltekit)
[在 GitHub 中查看代码示例](https://github.com/openapi-ts/openapi-typescript/tree/main/packages/openapi-fetch/examples/sveltekit)

## Vue

目前还没有 Vue 的示例应用。你在 Vue 中使用吗?请[提交 PR 添加!](https://github.com/drwpow/openapi-typescript/pulls)
目前还没有 Vue 的示例应用。你在 Vue 中使用吗?请[提交 PR 添加!](https://github.com/openapi-ts/openapi-typescript/pulls)

---

欢迎提供更多示例!请[提交 PR](https://github.com/drwpow/openapi-typescript/pulls)添加你的示例。
欢迎提供更多示例!请[提交 PR](https://github.com/openapi-ts/openapi-typescript/pulls)添加你的示例。
Loading

0 comments on commit 3845e55

Please sign in to comment.