Skip to content

Commit

Permalink
Consolidate About pages, update contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
drwpow committed Jan 25, 2025
1 parent 31bdbaf commit 9a7502f
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 467 deletions.
17 changes: 3 additions & 14 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default defineConfig({
{ text: "Testing", link: "/openapi-fetch/testing" },
{ text: "Examples", link: "/openapi-fetch/examples" },
{ text: "API", link: "/openapi-fetch/api" },
{ text: "About", link: "/openapi-fetch/about" },
],
},
],
Expand All @@ -52,7 +51,6 @@ export default defineConfig({
{ text: "Examples", link: "/examples" },
{ text: "Migrating from 6.x", link: "/migration-guide" },
{ text: "Advanced", link: "/advanced" },
{ text: "About", link: "/about" },
],
},
{
Expand All @@ -66,7 +64,6 @@ export default defineConfig({
{ text: "Testing", link: "/openapi-fetch/testing" },
{ text: "Examples", link: "/openapi-fetch/examples" },
{ text: "API", link: "/openapi-fetch/api" },
{ text: "About", link: "/openapi-fetch/about" },
],
},
{
Expand All @@ -76,15 +73,8 @@ export default defineConfig({
{ text: "Getting Started", link: "/" },
{ text: "useQuery", link: "/use-query" },
{ text: "useMutation", link: "/use-mutation" },
{
text: "useSuspenseQuery",
link: "/use-suspense-query",
},
{
text: "queryOptions",
link: "/query-options",
},
{ text: "About", link: "/about" },
{ text: "useSuspenseQuery", link: "/use-suspense-query" },
{ text: "queryOptions", link: "/query-options" },
],
},
{
Expand All @@ -97,7 +87,6 @@ export default defineConfig({
{ text: "useImmutable", link: "/use-immutable" },
{ text: "useInfinite", link: "/use-infinite" },
{ text: "useMutate", link: "/use-mutate" },
{ text: "About", link: "/about" },
],
},
{
Expand All @@ -118,9 +107,9 @@ export default defineConfig({
],
},
{ text: "Examples", link: "/openapi-metadata/examples" },
{ text: "About", link: "/openapi-metadata/about" },
],
},
{ text: "About", link: "/about" },
],
},
search: {
Expand Down
5 changes: 1 addition & 4 deletions docs/.vitepress/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default defineConfig({
{ text: "使用例", link: "/ja/examples" },
{ text: "6.xからのマイグレーション", link: "/ja/migration-guide" },
{ text: "高度な機能", link: "/ja/advanced" },
{ text: "概要", link: "/ja/about" },
],
},
{
Expand All @@ -38,7 +37,6 @@ export default defineConfig({
{ text: "テスト", link: "/ja/openapi-fetch/testing" },
{ text: "使用例", link: "/ja/openapi-fetch/examples" },
{ text: "API", link: "/ja/openapi-fetch/api" },
{ text: "概要", link: "/ja/openapi-fetch/about" },
],
},
{
Expand All @@ -48,7 +46,6 @@ export default defineConfig({
{ text: "useQuery", link: "/ja/openapi-react-query/use-query" },
{ text: "useMutation", link: "/ja/openapi-react-query/use-mutation" },
{ text: "useSuspenseQuery", link: "/ja/openapi-react-query/use-suspense-query" },
{ text: "概要", link: "/ja/openapi-react-query/about" },
],
},
],
Expand Down Expand Up @@ -111,4 +108,4 @@ export const jaSearch: DefaultTheme.AlgoliaSearchOptions["locales"] = {
},
},
},
};
};
44 changes: 44 additions & 0 deletions docs/.vitepress/theme/Contributors.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script setup lang="ts">
defineProps<{
contributors: {
username: string;
avatar: string;
links: { icon: string; link: string }[];
title?: string;
}[];
}>();
</script>

<style scoped>
.contributor-list {
gap: 0.75rem;
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
}
.contributor-list li {
border-radius: 50%;
margin: 0;
overflow: hidden;
padding: 0;
}
.contributor-avatar {
display: block;
height: 3rem;
width: 3rem;
}
</style>

<template>
<ul class="contributor-list">
<li v-for="contributor in contributors" :key="contributor.username">
<a :href="contributor.links[0].link" :title="contributor.name">
<img class="contributor-avatar" width="48" height="48" :src="contributor.avatar" :alt="contributor.name" />
</a>
</li>
</ul>
</template>
2 changes: 0 additions & 2 deletions docs/.vitepress/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default defineConfig({
{ text: "Node.js API", link: "/zh/node" },
{ text: "示例", link: "/zh/examples" },
{ text: "高级功能", link: "/zh/advanced" },
{ text: "关于", link: "/zh/about" },
],
},
{
Expand All @@ -37,7 +36,6 @@ export default defineConfig({
{ text: "测试", link: "/zh/openapi-fetch/testing" },
{ text: "示例", link: "/zh/openapi-fetch/examples" },
{ text: "API", link: "/zh/openapi-fetch/api" },
{ text: "关于", link: "/zh/openapi-fetch/about" },
],
},
],
Expand Down
13 changes: 10 additions & 3 deletions docs/6.x/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: Additional info about this project

<script setup>
import { VPTeamMembers } from 'vitepress/theme';
import contributors from '../data/contributors.json';
import Contributors from '../.vitepress/theme/Contributors.vue'
import data from '../data/contributors.json';
</script>

# About openapi-typescript
Expand Down Expand Up @@ -54,8 +55,14 @@ These 2 projects are unrelated. openapi-typescript-codegen is a Node.js alternat

If you fit into this usecase, it’s a great experience! But for everyone else, openapi-typescript (and openapi-fetch) is a more flexible, lower-level solution that can work for any technology choice (or even be incrementally-adopted without any cost).

## Maintainers

This library is currently maintained by these amazing individuals:

<VPTeamMembers size="small" :members="data.maintainers" />

## Contributors

This library wouldn’t be possible without all these amazing contributors:
And thanks to hundreds of amazing contributors, without whom these projects wouldn’t be possible:

<VPTeamMembers size="small" :members="contributors['openapi-typescript']" />
<Contributors :contributors="data.contributors" />
40 changes: 28 additions & 12 deletions docs/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: Additional info about this project

<script setup>
import { VPTeamMembers } from 'vitepress/theme';
import contributors from './data/contributors.json';
import Contributors from './.vitepress/theme/Contributors.vue'
import data from './data/contributors.json';
</script>

# About openapi-typescript
Expand All @@ -27,34 +28,49 @@ description: Additional info about this project
- [**Revolt**](https://github.com/revoltchat/api): open source user-first chat platform
- [**Spacebar**](https://github.com/spacebarchat): a free, open source, self-hostable Discord-compatible chat/voice/video platform
- [**Supabase**](https://github.com/supabase/supabase): The open source Firebase alternative.
- [**Twitter API**](https://github.com/twitterdev/twitter-api-typescript-sdk): Official SDK for the Twitter API

## Project goals

### openapi-typescript

1. Support converting any valid OpenAPI schema to TypeScript types, no matter how complicated.
1. Generated types should be statically-analyzable and runtime-free (with minor exceptions like [enums](https://www.typescriptlang.org/docs/handbook/enums.html).
1. Generated types should match your original schema as closely as possible, preserving original capitalization, etc.
1. Typegen only needs Node.js to run (no Java, Python, etc.) and works in any environment.
1. Support fetching OpenAPI schemas from files as well as local and remote servers.

## Differences
### openapi-fetch

1. Types should be strict and inferred automatically from OpenAPI schemas with the absolute minimum number of generics needed.
2. Respect the native Fetch API while reducing boilerplate (such as `await res.json()`).
3. Be as light and performant as possible.

### openapi-react-query

1. Types should be strict and inferred automatically from OpenAPI schemas with the absolute minimum number of generics needed.
2. Respect the original `@tanstack/react-query` APIs while reducing boilerplate.
3. Be as light and performant as possible.

### vs. swagger-codegen
### swr-openapi

openapi-typescript was created specifically to be a lighter-weight, easier-to-use alternative to swagger-codegen that doesn’t require the Java runtime or running an OpenAPI server. Nor does it generate heavyweight client-side code. In fact, all the code openapi-typescript generates is **runtime free static types** for maximum performance and minimum client weight.
1. Types should be strict and inferred automatically from OpenAPI schemas with the absolute minimum number of generics needed.
2. Respect the original `swr` APIs while reducing boilerplate.
3. Be as light and performant as possible.

### vs. openapi-typescript-codegen
### openapi-metadata

These 2 projects are unrelated. openapi-typescript-codegen is a Node.js alternative to the original swagger-codegen, but ends up being the same in practice. openapi-typescript has the same advantage of being **runtime free** whereas openapi-typescript-codegen can generate some pretty heavy bundles, up to `250 kB` or more depending on the schema complexity.
1. Must respect the OpenAPI V3 specification
2. Be extensible and easily integrated inside backend frameworks
3. Be focused around developer experience

### vs. tRPC
## Maintainers

[tRPC](https://trpc.io/) is an opinionated type-safe framework for both server and client. It demands both your server and client be written in tRPC (which means Node.js for the backend).
This library is currently maintained by these amazing individuals:

If you fit into this use case, it’s a great experience! But for everyone else, openapi-typescript (and openapi-fetch) is a more flexible, lower-level solution that can work for any technology choice (or even be incrementally-adopted without any cost).
<VPTeamMembers size="small" :members="data.maintainers" />

## Contributors

This library wouldn’t be possible without all these amazing contributors:
And thanks to hundreds of amazing contributors, without whom these projects wouldn’t be possible:

<VPTeamMembers size="small" :members="contributors['openapi-typescript']" />
<Contributors :contributors="data.contributors" />
2 changes: 1 addition & 1 deletion docs/data/contributors.json

Large diffs are not rendered by default.

29 changes: 17 additions & 12 deletions docs/ja/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: このプロジェクトに関する追加情報

<script setup>
import { VPTeamMembers } from 'vitepress/theme';
import contributors from '../data/contributors.json';
import Contributors from '../.vitepress/theme/Contributors.vue'
import data from '../data/contributors.json';
</script>

# openapi-typescriptについて
Expand All @@ -31,30 +32,34 @@ description: このプロジェクトに関する追加情報

## プロジェクトの目標

### openapi-typescript

1. 任意の有効な OpenAPI スキーマを TypeScript 型に変換できるようにすること。どんなに複雑なスキーマでも対応可能です。
2. 生成される型は静的に解析可能で、実行時の依存関係がない(ただし、[enums](https://www.typescriptlang.org/docs/handbook/enums.html) のような例外はあります)。
3. 生成された型は、元のスキーマにできるだけ一致し、元の大文字形式などを保持します。
4. 型の生成 は Node.js だけで実行可能であり、(Java、Python などは不要)どんな環境でも実行できます。
5. ファイルからの OpenAPI スキーマのフェッチや、ローカルおよびリモートサーバーからのフェッチをサポートします。

## 比較

### vs. swagger-codegen
### openapi-fetch

openapi-typescript は、swagger-codegen の軽量で使いやすい代替手段として作成されており、Java ランタイムや OpenAPI サーバーを実行する必要はありません。また、大規模なクライアントサイドコードも生成しません。実際、openapi-typescript が生成するすべてのコードは、**実行時の依存関係がない静的型** であり、最大のパフォーマンスと最小のクライアント負荷を実現します。
1. 型は厳密で、最小限のジェネリクスで OpenAPI スキーマから自動的に推論されるべきです。
2. ネイティブの Fetch API を尊重しつつ、(`await res.json()` などの)ボイラープレートを削減すること。
3. 可能な限り軽量で高性能であること。

### vs. openapi-typescript-codegen
### openapi-react-query

openapi-typescript-codegen は、元の swagger-codegen の Node.js 代替手段ですが、実際には同じものです。openapi-typescript は、openapi-typescript-codegen と同様に、**実行時の依存関係がない** という利点を持っていますが、openapi-typescript-codegen は、スキーマの複雑さに応じて `250 kB` 以上になるかなり大きなバンドルを生成する可能性があります。
1. 型は厳格であり、必要最小限のジェネリクスでOpenAPIスキーマから自動的に推論されるべきです。
2. 元の `@tanstack/react-query` API を尊重しつつ、ボイラープレートを減らします。
3. できるだけ軽量でパフォーマンスが高くなるようにします。

### vs. tRPC
## メインテナー

[tRPC](https://trpc.io/) は、強い設計方針を持ったサーバーとクライアントの両方で型の安全性を提供するフレームワークです。これは、サーバーとクライアントの両方が tRPC で記述されていることを要求します(つまり、バックエンドが Node.js を使用しています)。
This library is currently maintained by these amazing individuals:

このユースケースに合っているならば、素晴らしい体験ができるでしょう!しかし、他のすべての場合において、openapi-typescript(および openapi-fetch)は、あらゆる技術選択に適応できる、より柔軟で低レベルなソリューションです(コストなしで段階的に導入することさえできます)。
<VPTeamMembers size="small" :members="data.maintainers" />

## 貢献者

これらの素晴らしい貢献者がいなければ、このライブラリは存在しなかったでしょう:
And thanks to hundreds of amazing contributors, without whom these projects wouldn’t be possible:

<VPTeamMembers size="small" :members="contributors['openapi-typescript']" />
<Contributors :contributors="data.contributors" />
48 changes: 0 additions & 48 deletions docs/ja/openapi-fetch/about.md

This file was deleted.

23 changes: 0 additions & 23 deletions docs/ja/openapi-react-query/about.md

This file was deleted.

Loading

0 comments on commit 9a7502f

Please sign in to comment.