fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add community spotlight

Lubos 2bcf8bfd aa8c9550

+486 -201
+30
.github/workflows/contributors.yml
··· 1 + name: Update Contributors 2 + 3 + on: 4 + schedule: 5 + - cron: '0 0 * * *' # Every day at 00:00 UTC 6 + workflow_dispatch: 7 + 8 + jobs: 9 + update: 10 + runs-on: ubuntu-latest 11 + steps: 12 + - uses: actions/checkout@v4.2.2 13 + 14 + - name: Install dependencies 15 + run: sudo apt-get update && sudo apt-get install -y jq curl 16 + 17 + - name: Run update contributors script 18 + env: 19 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 + run: | 21 + chmod +x ./scripts/update-contributors.sh 22 + ./scripts/update-contributors.sh 23 + 24 + - name: Commit and push if updated 25 + run: | 26 + git config user.name "github-actions[bot]" 27 + git config user.email "github-actions[bot]@users.noreply.github.com" 28 + git add ./docs/partials/contributors-list.md 29 + git diff --cached --quiet || git commit -m "chore(docs): update contributors list" 30 + git push
+1
.gitignore
··· 1 1 .DS_Store 2 + .cache 2 3 .idea 3 4 .tmp 4 5 junit.xml
+3
docs/.contributorsignore
··· 1 + dependabot-preview[bot] 2 + dependabot[bot] 3 + github-actions[bot]
+1
docs/.contributorssince
··· 1 + 2025-04-20T08:08:34Z
+17 -12
docs/.vitepress/config/en.ts
··· 11 11 nav: [ 12 12 { 13 13 link: 'https://github.com/sponsors/hey-api', 14 - text: 'Sponsor Hey API 💰', 14 + text: 'Sponsor Hey API', 15 15 }, 16 16 ], 17 17 sidebar: [ ··· 41 41 text: 'Configuration', 42 42 }, 43 43 ], 44 - text: '@hey-api/openapi-ts', 44 + text: 'Introduction', 45 45 }, 46 46 { 47 47 items: [ ··· 232 232 { 233 233 items: [ 234 234 { 235 + link: '/openapi-ts/community/spotlight', 236 + text: 'Spotlight', 237 + }, 238 + { 239 + link: '/openapi-ts/community/contributing', 240 + text: 'Contributing', 241 + }, 242 + ], 243 + text: 'Community', 244 + }, 245 + { 246 + items: [ 247 + { 235 248 link: '/openapi-ts/integrations', 236 249 text: 'GitHub', 237 250 }, ··· 245 258 text: 'Migrating', 246 259 }, 247 260 { 248 - link: '/license', 261 + link: '/openapi-ts/license', 249 262 text: 'License', 250 263 }, 251 264 { 252 - link: '/about', 253 - text: 'Philosophy', 254 - }, 255 - { 256 - link: '/contributing', 257 - text: 'Contributing', 258 - }, 259 - { 260 265 link: 'https://github.com/orgs/hey-api/discussions/1495', 261 266 text: 'Roadmap', 262 267 }, 263 268 ], 264 - text: '@hey-api', 269 + text: '@hey-api/openapi-ts', 265 270 }, 266 271 ], 267 272 },
+2 -2
docs/.vitepress/theme/Layout.vue
··· 29 29 </a> 30 30 </div> --> 31 31 </template> 32 - <template #home-features-before> 32 + <!-- <template #home-features-before> 33 33 <a 34 34 aria-label="Send an email to Lubos" 35 35 class="migration" ··· 38 38 <p>Migrate your existing TypeScript SDKs</p> 39 39 <p>Contact us</p> 40 40 </a> 41 - </template> 41 + </template> --> 42 42 </Layout> 43 43 </template> 44 44
+13
docs/.vitepress/theme/custom.css
··· 277 277 padding: 0.2rem 0; 278 278 } 279 279 280 + .contributors-list ul { 281 + margin-bottom: 1.3rem; 282 + margin-top: 1.3rem; 283 + } 284 + 280 285 @media (min-width: 640px) { 281 286 .VPFeatures.VPHomeFeatures > .container > .items { 282 287 gap: 1rem; ··· 286 291 .home-list > ul, 287 292 .sponsors-list > ul { 288 293 flex-direction: row; 294 + } 295 + 296 + .contributors-list ul { 297 + columns: 2; 289 298 } 290 299 } 291 300 ··· 309 318 padding: 0; 310 319 width: 100%; 311 320 } 321 + 322 + .VPNavBar.has-sidebar > .wrapper > .container > .title { 323 + background-color: var(--vp-sidebar-bg-color); 324 + }
-51
docs/about.md
··· 1 - --- 2 - title: Philosophy 3 - description: Hello from Hey API. 4 - --- 5 - 6 - <script setup> 7 - import { VPTeamMembers } from 'vitepress/theme' 8 - 9 - const hallOfFame = [ 10 - { 11 - avatar: 'https://github.com/ferdikoomen.png', 12 - name: 'Ferdi Koomen', 13 - links: [ 14 - { icon: 'github', link: 'https://github.com/ferdikoomen' }, 15 - ], 16 - title: 'OpenAPI TypeScript Codegen', 17 - }, 18 - { 19 - avatar: 'https://github.com/nicolas-chaulet.png', 20 - name: 'Nicolas Chaulet', 21 - links: [ 22 - { icon: 'github', link: 'https://github.com/nicolas-chaulet' }, 23 - ], 24 - title: 'Made the Hey API fork', 25 - }, 26 - { 27 - avatar: 'https://github.com/jordanshatford.png', 28 - name: 'Jordan Shatford', 29 - links: [ 30 - { icon: 'github', link: 'https://github.com/jordanshatford' }, 31 - ], 32 - title: 'Maintainer and Contributor', 33 - }, 34 - ] 35 - </script> 36 - 37 - # About 38 - 39 - Hey API is building a suite of TypeScript tools to manage API interactions. Whether you're building a web app, mobile app, or API server, we want to be part of your stack. 40 - 41 - We aim to do this by offering quality code abstractions necessary to perform type-safe HTTP requests. Attempting to manage this manually quickly becomes a huge time sink as your project grows and APIs evolve. Ideally, you want to spend most time on your application. Hey API allows you to do just that. 42 - 43 - We're constantly learning about the ways in which you use our tools. If you have any feedback, please [email us](mailto:lubos@heyapi.dev), [open an issue](https://github.com/hey-api/openapi-ts/issues), or [join a discussion](https://github.com/orgs/hey-api/discussions). 44 - 45 - ## Hall of Fame 46 - 47 - These are the people with significant contributions to Hey API. A special thank you goes to [Ferdi Koomen](https://madebyferdi.com) for allowing us to use the original source code from OpenAPI TypeScript Codegen. None of this would've been possible without you! 48 - 49 - <VPTeamMembers size="small" :members="hallOfFame" /> 50 - 51 - <!--@include: ./sponsors.md-->
+2 -12
docs/contributing.md docs/openapi-ts/community/contributing.md
··· 1 1 --- 2 2 title: Contributing 3 - description: Learn how to contribute to Hey API. 3 + description: Learn how to contribute to @hey-api/openapi-ts. 4 4 --- 5 5 6 6 # Contributing 7 7 8 - Thank you for considering contributing to Hey API. In order to increase the likelihood of your changes being merged, first open an issue if one does not already exist. Once an issue exists, let us know you'd like to work on it. We will confirm whether we're looking to resolve the issue and provide you with guidance if required. This is to ensure our codebase remains in good state and all features contribute to Hey API's [objectives](/about). 8 + Thank you for considering contributing to Hey API. In order to increase the likelihood of your changes being merged, first open an issue if one does not already exist. Once an issue exists, let us know you'd like to work on it. We will confirm whether we're looking to resolve the issue and provide you with guidance if required. This is to ensure our codebase remains in good state and all features contribute to Hey API's objectives. 9 9 10 10 ## Prerequisites 11 11 ··· 19 19 - contain a clean history of small, incremental, logically separate commits, with no merge commits 20 20 - use clear commit messages 21 21 - be possible to merge automatically 22 - 23 - ## Sponsors 24 - 25 - You can also contribute by becoming our [sponsor](https://github.com/sponsors/hey-api). 26 - 27 - <div class="sponsors-list"> 28 - 29 - <!--@include: ./sponsors-list.md--> 30 - 31 - </div>
+8
docs/data/coreTeam.js
··· 1 + export const coreTeam = [ 2 + { 3 + avatar: 'https://github.com/mrlubos.png', 4 + links: [{ icon: 'github', link: 'https://github.com/mrlubos' }], 5 + name: 'Lubos', 6 + title: 'Hey API', 7 + }, 8 + ];
+20
docs/data/hallOfFame.js
··· 1 + export const hallOfFame = [ 2 + { 3 + avatar: 'https://github.com/ferdikoomen.png', 4 + links: [{ icon: 'github', link: 'https://github.com/ferdikoomen' }], 5 + name: 'Ferdi Koomen', 6 + title: 'OpenAPI TypeScript Codegen', 7 + }, 8 + { 9 + avatar: 'https://github.com/nicolas-chaulet.png', 10 + links: [{ icon: 'github', link: 'https://github.com/nicolas-chaulet' }], 11 + name: 'Nicolas Chaulet', 12 + title: 'Made the Hey API fork', 13 + }, 14 + { 15 + avatar: 'https://github.com/jordanshatford.png', 16 + links: [{ icon: 'github', link: 'https://github.com/jordanshatford' }], 17 + name: 'Jordan Shatford', 18 + title: 'Maintainer and Contributor', 19 + }, 20 + ];
docs/examples.md docs/partials/examples.md
+4 -4
docs/index.md
··· 2 2 layout: home 3 3 4 4 hero: 5 - name: High-quality tools for interacting with APIs 6 - tagline: Codegen for your TypeScript projects. Trusted over 2,000,000 times each month to generate reliable API clients and SDKs. 5 + name: One OpenAPI spec. Infinite outputs. 6 + tagline: Codegen for JavaScript/TypeScript projects. Trusted over 2,000,000 times each month to generate reliable API clients and SDKs. 7 7 actions: 8 8 - link: /openapi-ts/get-started 9 9 text: Get Started ··· 51 51 linkText: Learn about integrations 52 52 --- 53 53 54 - <br /> 54 + <br/> 55 55 56 56 <div class="home-list sponsors-list"> 57 57 ··· 59 59 60 60 <br/> 61 61 62 - <!--@include: ./sponsors-list.md--> 62 + <!--@include: ./partials/sponsors-list.md--> 63 63 64 64 </div> 65 65
docs/license.md docs/openapi-ts/license.md
+2 -2
docs/openapi-ts/clients.md
··· 33 33 34 34 Don't see your client? [Build your own](/openapi-ts/clients/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 35 35 36 - <!--@include: ../examples.md--> 37 - <!--@include: ../sponsors.md--> 36 + <!--@include: ../partials/examples.md--> 37 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/axios.md
··· 226 226 227 227 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-axios/types.d.ts) interface. 228 228 229 - <!--@include: ../../examples.md--> 230 - <!--@include: ../../sponsors.md--> 229 + <!--@include: ../../partials/examples.md--> 230 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/custom.md
··· 15 15 Custom clients documentation will be finalized after further testing. Simplified [instructions](https://github.com/hey-api/openapi-ts/issues/1213#issuecomment-2765206344) can be found in the GitHub thread. 16 16 ::: 17 17 18 - <!--@include: ../../examples.md--> 19 - <!--@include: ../../sponsors.md--> 18 + <!--@include: ../../partials/examples.md--> 19 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/fetch.md
··· 303 303 304 304 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-fetch/types.d.ts) interface. 305 305 306 - <!--@include: ../../examples.md--> 307 - <!--@include: ../../sponsors.md--> 306 + <!--@include: ../../partials/examples.md--> 307 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/legacy.md
··· 132 132 Angular client does not currently support request interceptors. 133 133 ::: 134 134 135 - <!--@include: ../../examples.md--> 136 - <!--@include: ../../sponsors.md--> 135 + <!--@include: ../../partials/examples.md--> 136 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/next-js.md
··· 290 290 291 291 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-next/types.d.ts) interface. 292 292 293 - <!--@include: ../../examples.md--> 294 - <!--@include: ../../sponsors.md--> 293 + <!--@include: ../../partials/examples.md--> 294 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/clients/nuxt.md
··· 252 252 253 253 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/client-nuxt/types.d.ts) interface. 254 254 255 - <!--@include: ../../examples.md--> 256 - <!--@include: ../../sponsors.md--> 255 + <!--@include: ../../partials/examples.md--> 256 + <!--@include: ../../partials/sponsors.md-->
+40
docs/openapi-ts/community/spotlight.md
··· 1 + --- 2 + title: Spotlight 3 + description: Meet the people behind @hey-api/openapi-ts. 4 + --- 5 + 6 + <script setup> 7 + import { VPTeamMembers } from 'vitepress/theme' 8 + import { coreTeam } from '../../data/coreTeam.js' 9 + import { hallOfFame } from '../../data/hallOfFame.js' 10 + </script> 11 + 12 + # Spotlight 13 + 14 + Meet the people behind `@hey-api/openapi-ts`. 15 + 16 + ## Core Team 17 + 18 + These people actively maintain this project. 19 + 20 + <VPTeamMembers size="small" :members="coreTeam" /> 21 + 22 + Do you want to join the core team? Send us a short [email](mailto:lubos@heyapi.dev?subject=Join%20Core%20Team) describing your interest in Hey API, any relevant experience, and what you're hoping to work on. 23 + 24 + ## Hall of Fame 25 + 26 + These are the people with significant contributions to Hey API. A special thank you goes to [Ferdi Koomen](https://madebyferdi.com) for allowing us to use the original source code from OpenAPI TypeScript Codegen. None of this would've been possible without you! 27 + 28 + <VPTeamMembers size="small" :members="hallOfFame" /> 29 + 30 + ## Contributors 31 + 32 + A complete list of contributors to `@hey-api/openapi-ts`. 33 + 34 + <div class="contributors-list"> 35 + 36 + <!--@include: ../../partials/contributors-list.md--> 37 + 38 + </div> 39 + 40 + Thank you for contributing to Hey API!
+2 -2
docs/openapi-ts/configuration.md
··· 159 159 160 160 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/types/config.d.ts) interface. 161 161 162 - <!--@include: ../examples.md--> 163 - <!--@include: ../sponsors.md--> 162 + <!--@include: ../partials/examples.md--> 163 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/configuration/input.md
··· 113 113 114 114 ::: 115 115 116 - <!--@include: ../../examples.md--> 117 - <!--@include: ../../sponsors.md--> 116 + <!--@include: ../../partials/examples.md--> 117 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/configuration/output.md
··· 170 170 Setting `output.clean` to `false` may result in broken output. Ensure you typecheck your code. 171 171 ::: 172 172 173 - <!--@include: ../../examples.md--> 174 - <!--@include: ../../sponsors.md--> 173 + <!--@include: ../../partials/examples.md--> 174 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/configuration/parser.md
··· 484 484 485 485 ::: 486 486 487 - <!--@include: ../../examples.md--> 488 - <!--@include: ../../sponsors.md--> 487 + <!--@include: ../../partials/examples.md--> 488 + <!--@include: ../../partials/sponsors.md-->
+23 -13
docs/openapi-ts/get-started.md
··· 9 9 10 10 # Get Started 11 11 12 - ::: warning 13 - This package is in initial development. The interface might change before it becomes stable. We encourage you to leave feedback on [GitHub](https://github.com/hey-api/openapi-ts/issues). 14 - ::: 15 - 16 - [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) is an OpenAPI to TypeScript codegen trusted over 2,000,000 times each month to generate reliable API clients and SDKs. The code is [MIT-licensed](/license) and free to use. Discover available features below or view our [roadmap](https://github.com/orgs/hey-api/discussions/1495) to learn what's coming next. 12 + [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) is an OpenAPI to TypeScript codegen trusted over 2,000,000 times each month to generate reliable API clients and SDKs. The code is [MIT-licensed](/openapi-ts/license) and free to use. Discover available features below or view our [roadmap](https://github.com/orgs/hey-api/discussions/1495) to learn what's coming next. 17 13 18 14 ### Demo 19 15 ··· 45 41 46 42 ## Installation 47 43 44 + You can download `@hey-api/openapi-ts` from npm using your favorite package manager. 45 + 48 46 ::: code-group 49 47 50 48 ```sh [npm] 51 - npm install @hey-api/openapi-ts -D 49 + npm install @hey-api/openapi-ts -D -E 52 50 ``` 53 51 54 52 ```sh [pnpm] 55 - pnpm add @hey-api/openapi-ts -D 53 + pnpm add @hey-api/openapi-ts -D -E 56 54 ``` 57 55 58 56 ```sh [yarn] 59 - yarn add @hey-api/openapi-ts -D 57 + yarn add @hey-api/openapi-ts -D -E 60 58 ``` 61 59 62 60 ```sh [bun] 63 - bun add @hey-api/openapi-ts -D 61 + bun add @hey-api/openapi-ts -D -E 64 62 ``` 65 63 66 64 ::: 67 65 68 - We recommend pinning an exact version so you can safely upgrade when you're ready. This package is in [initial development](https://semver.org/spec/v0.1.0.html#spec-item-5) and its API might change before v1. 66 + ### Versioning 67 + 68 + This package does NOT follow the [semantic versioning](https://semver.org/) strategy. Please pin an exact version so you can safely upgrade when you're ready. 69 + 70 + Due to the nature of the package, we use the following versioning strategy. 71 + 72 + - `1.x.x`: significant breaking changes, reserved for v1 release 73 + - `x.1.x`: breaking changes 74 + - `x.x.1`: new features, bug fixes, and non-breaking changes 75 + 76 + We publish [migration notes](/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking release if you don't use the affected plugin(s). 77 + 78 + ## Usage 69 79 70 80 ### CLI 71 81 ··· 81 91 82 92 ### Node.js 83 93 84 - You can also generate clients programmatically by importing `@hey-api/openapi-ts` in a TypeScript file. 94 + You can also generate output programmatically by importing `@hey-api/openapi-ts` in a JavaScript/TypeScript file. 85 95 86 96 ::: code-group 87 97 ··· 100 110 101 111 It's a good practice to extract your configuration into a separate file. Learn how to do that and discover available options on the [Configuration](/openapi-ts/configuration) page. 102 112 103 - <!--@include: ../examples.md--> 104 - <!--@include: ../sponsors.md--> 113 + <!--@include: ../partials/examples.md--> 114 + <!--@include: ../partials/sponsors.md-->
+1 -1
docs/openapi-ts/integrations.md
··· 193 193 194 194 The platform is currently in beta with our focus being on delivering a great experience. We plan to announce pricing once we have gathered enough data around usage patterns. However, we can guarantee there will always be a free plan available. Our mission to bring the finest tooling for working with APIs remains unchanged. 195 195 196 - <!--@include: ../sponsors.md--> 196 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/mocks.md
··· 18 18 19 19 Don't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 20 20 21 - <!--@include: ../examples.md--> 22 - <!--@include: ../sponsors.md--> 21 + <!--@include: ../partials/examples.md--> 22 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/output.md
··· 95 95 Re-exporting additional files from index file may result in broken output due to naming conflicts. 96 96 ::: 97 97 98 - <!--@include: ../examples.md--> 99 - <!--@include: ../sponsors.md--> 98 + <!--@include: ../partials/examples.md--> 99 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/output/client.md
··· 23 23 24 24 Client plugins provide their bundles inside `client` and `core` folders. The contents of these folders don't depend on the provided input. Everything inside these folders serves as a scaffolding so the generated code can make HTTP requests. 25 25 26 - <!--@include: ../../examples.md--> 27 - <!--@include: ../../sponsors.md--> 26 + <!--@include: ../../partials/examples.md--> 27 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/output/json-schema.md
··· 100 100 101 101 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/schemas/types.d.ts) interface. 102 102 103 - <!--@include: ../../examples.md--> 104 - <!--@include: ../../sponsors.md--> 103 + <!--@include: ../../partials/examples.md--> 104 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/output/sdk.md
··· 228 228 229 229 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/sdk/types.d.ts) interface. 230 230 231 - <!--@include: ../../examples.md--> 232 - <!--@include: ../../sponsors.md--> 231 + <!--@include: ../../partials/examples.md--> 232 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/output/typescript.md
··· 134 134 135 135 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/typescript/types.d.ts) interface. 136 136 137 - <!--@include: ../../examples.md--> 138 - <!--@include: ../../sponsors.md--> 137 + <!--@include: ../../partials/examples.md--> 138 + <!--@include: ../../partials/sponsors.md-->
+4 -10
docs/openapi-ts/plugins.md
··· 7 7 8 8 Every generated file in your output is created by a plugin. You already learned about the default plugins in [Output](/openapi-ts/output). However, you might be working with third-party packages and wishing to automate more of your boilerplate. This page lists all native and selected community plugins enabling you to do that. 9 9 10 - ## Hey API 10 + ## Core 11 11 12 - Apart from being responsible for the default output, Hey API plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from Hey API plugins. This results in a smaller output size and a better user experience. 12 + Apart from being responsible for the default output, core plugins are the foundation for other plugins. Instead of creating their own primitives, other plugins can reuse the artifacts from core plugins. This results in a smaller output size and a better user experience. 13 13 14 14 - [`@hey-api/schemas`](/openapi-ts/output/json-schema) - export OpenAPI definitions as JavaScript objects 15 15 - [`@hey-api/sdk`](/openapi-ts/output/sdk) - robust and polished SDKs ··· 53 53 54 54 Don't see your plugin? [Build your own](/openapi-ts/plugins/custom) or let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 55 55 56 - ## Community 57 - 58 - Featured community plugins. 59 - 60 - - [add plugin](https://github.com/hey-api/openapi-ts/pulls) 61 - 62 - <!--@include: ../examples.md--> 63 - <!--@include: ../sponsors.md--> 56 + <!--@include: ../partials/examples.md--> 57 + <!--@include: ../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/ajv.md
··· 13 13 14 14 [Ajv](https://ajv.js.org) is the fastest JSON validator for Node.js and browser. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/arktype.md
··· 13 13 14 14 [Arktype](https://arktype.io) is a TypeScript's 1:1 validator, optimized from editor to runtime. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/plugins/custom.md
··· 179 179 180 180 Congratulations! You've successfully created your own plugin! :tada: 181 181 182 - <!--@include: ../../examples.md--> 183 - <!--@include: ../../sponsors.md--> 182 + <!--@include: ../../partials/examples.md--> 183 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/express.md
··· 13 13 14 14 [Express](https://expressjs.com) is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/faker.md
··· 13 13 14 14 [Faker](https://fakerjs.dev) is a popular library that generates fake (but reasonable) data that can be used for things such as unit testing, performance testing, building demos, and working without a completed backend. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/plugins/fastify.md
··· 79 79 80 80 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/fastify/types.d.ts) interface. 81 81 82 - <!--@include: ../../examples.md--> 83 - <!--@include: ../../sponsors.md--> 82 + <!--@include: ../../partials/examples.md--> 83 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/hono.md
··· 13 13 14 14 [Hono](https://hono.dev) is a small, simple, and ultrafast web framework built on Web Standards. It works on any JavaScript runtime: Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, AWS Lambda, Lambda@Edge, and Node.js. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/joi.md
··· 13 13 14 14 [Joi](https://joi.dev) is the most powerful schema description language and data validator for JavaScript. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/koa.md
··· 13 13 14 14 [Koa](https://koajs.com) is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/msw.md
··· 13 13 14 14 [MSW](https://mswjs.io) is an API mocking library that allows you to write client-agnostic mocks and reuse them across any frameworks, tools, and environments. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/nest.md
··· 13 13 14 14 [Nest](https://nestjs.com) is a progressive Node.js framework for building efficient, reliable and scalable server-side applications. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/nock.md
··· 13 13 14 14 [Nock](https://github.com/nock/nock) is an HTTP server mocking and expectations library for Node.js. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/pinia-colada.md
··· 13 13 14 14 [Pinia Colada](https://pinia-colada.esm.dev) is the data fetching layer for Pinia. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/superstruct.md
··· 13 13 14 14 [Superstruct](https://docs.superstructjs.org) makes it easy to define interfaces and then validate JavaScript data against them. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/supertest.md
··· 13 13 14 14 [Supertest](https://github.com/ladjs/supertest) is a super-agent driven library for testing node.js HTTP servers using a fluent API. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/swr.md
··· 13 13 14 14 [SWR](https://swr.vercel.app) is a strategy to first return the data from cache (stale), then send the fetch request (revalidate), and finally come with the up-to-date data. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/plugins/tanstack-query.md
··· 204 204 205 205 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@tanstack/react-query/types.d.ts) interface. 206 206 207 - <!--@include: ../../examples.md--> 208 - <!--@include: ../../sponsors.md--> 207 + <!--@include: ../../partials/examples.md--> 208 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/typebox.md
··· 13 13 14 14 [TypeBox](https://github.com/sinclairzx81/typebox) is a JSON Schema type builder with static type resolution for TypeScript. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/plugins/valibot.md
··· 146 146 147 147 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/valibot/types.d.ts) interface. 148 148 149 - <!--@include: ../../examples.md--> 150 - <!--@include: ../../sponsors.md--> 149 + <!--@include: ../../partials/examples.md--> 150 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/yup.md
··· 13 13 14 14 [Yup](https://github.com/jquense/yup) is a schema builder for runtime value parsing and validation. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/plugins/zod.md
··· 243 243 244 244 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/zod/types.d.ts) interface. 245 245 246 - <!--@include: ../../examples.md--> 247 - <!--@include: ../../sponsors.md--> 246 + <!--@include: ../../partials/examples.md--> 247 + <!--@include: ../../partials/sponsors.md-->
+1 -1
docs/openapi-ts/plugins/zustand.md
··· 13 13 14 14 [Zustand](https://zustand-demo.pmnd.rs) is a small, fast, and scalable bearbones state management solution. 15 15 16 - <!--@include: ../../sponsors.md--> 16 + <!--@include: ../../partials/sponsors.md-->
+2 -2
docs/openapi-ts/state-management.md
··· 18 18 19 19 Don't see your state manager? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 20 20 21 - <!--@include: ../examples.md--> 22 - <!--@include: ../sponsors.md--> 21 + <!--@include: ../partials/examples.md--> 22 + <!--@include: ../partials/sponsors.md-->
+1 -1
docs/openapi-ts/transformers.md
··· 143 143 144 144 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/transformers/types.d.ts) interface. 145 145 146 - <!--@include: ../sponsors.md--> 146 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/validators.md
··· 28 28 29 29 Don't see your validator? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 30 30 31 - <!--@include: ../examples.md--> 32 - <!--@include: ../sponsors.md--> 31 + <!--@include: ../partials/examples.md--> 32 + <!--@include: ../partials/sponsors.md-->
+2 -2
docs/openapi-ts/web-frameworks.md
··· 19 19 20 20 Don't see your framework? Let us know your interest by [opening an issue](https://github.com/hey-api/openapi-ts/issues). 21 21 22 - <!--@include: ../examples.md--> 23 - <!--@include: ../sponsors.md--> 22 + <!--@include: ../partials/examples.md--> 23 + <!--@include: ../partials/sponsors.md-->
+64
docs/partials/contributors-list.md
··· 1 + - [a1mer](https://github.com/a1mersnow) 2 + - [Alessandro](https://github.com/ale18V) 3 + - [Alex Sarychev](https://github.com/Freddis) 4 + - [Alexander Horner](https://github.com/alexanderhorner) 5 + - [Alexander Skvortcov](https://github.com/askvortcov) 6 + - [Andrea](https://github.com/andreasciamanna) 7 + - [Ben Vincent](https://github.com/bvincent1) 8 + - [Bogdan ](https://github.com/BogdanMaier) 9 + - [Brian Tarricone](https://github.com/kelnos) 10 + - [Carl Kittelberger](https://github.com/icedream) 11 + - [Chris Wiggins](https://github.com/chriswiggins) 12 + - [Daniel Roe](https://github.com/danielroe) 13 + - [Daschi](https://github.com/Daschi1) 14 + - [David Bieregger](https://github.com/BierDav) 15 + - [Finn Poppinga](https://github.com/fpoppinga) 16 + - [Francisco García](https://github.com/goltra) 17 + - [George Smith](https://github.com/georgesmith46) 18 + - [Gergan Penkov](https://github.com/gergan) 19 + - [Hiram Chirino](https://github.com/chirino) 20 + - [Jacob Cohen](https://github.com/jacobinu) 21 + - [Jason Lee](https://github.com/LeeChSien) 22 + - [Jianqi Pan](https://github.com/Jannchie) 23 + - [johnny kim](https://github.com/johnny-mh) 24 + - [Jordan Shatford](https://github.com/jordanshatford) 25 + - [Joshua](https://github.com/Joshua-hypt) 26 + - [Jostein Stuhaug](https://github.com/josstn) 27 + - [Juan Ibarra](https://github.com/j-ibarra) 28 + - [Julian Klumpers](https://github.com/julianklumpers) 29 + - [Karl Stoney](https://github.com/Stono) 30 + - [Keigo Ando](https://github.com/anchan828) 31 + - [Kenneth Apeland](https://github.com/kennidenni) 32 + - [Landon Gavin](https://github.com/seriouslag) 33 + - [Laurin](https://github.com/lausek) 34 + - [Lee Lian Hoy](https://github.com/bakakaba) 35 + - [Leo Developer](https://github.com/Le0Developer) 36 + - [Louis Duchemin](https://github.com/lsdch) 37 + - [Lubos](https://github.com/mrlubos) 38 + - [Maarten Knijnenberg](https://github.com/mknijnenberg) 39 + - [Mads Hougesen](https://github.com/hougesen) 40 + - [Marek Lukáš](https://github.com/tajnymag) 41 + - [Matsu](https://github.com/Matsuuu) 42 + - [Max Scopp](https://github.com/max-scopp) 43 + - [Maximilian Dewald](https://github.com/maxdewald) 44 + - [Michiel Lankamp](https://github.com/mlankamp) 45 + - [Mika Vilpas](https://github.com/mikavilpas) 46 + - [Miklos](https://github.com/jumika) 47 + - [Nicolas Chaulet](https://github.com/nicolas-chaulet) 48 + - [Nimo Beeren](https://github.com/nimobeeren) 49 + - [Ondřej Maxa](https://github.com/maxa-ondrej) 50 + - [Pascal Ernst](https://github.com/LinuCC) 51 + - [Philipp Katz](https://github.com/qqilihq) 52 + - [Rico](https://github.com/btmnk) 53 + - [Ryo Yamada](https://github.com/Liooo) 54 + - [Simen Bekkhus](https://github.com/SimenB) 55 + - [Stian Jensen](https://github.com/stianjensen) 56 + - [Tran Phuc](https://github.com/Glup3) 57 + - [0xfurai](https://github.com/0xfurai) 58 + - [fml09](https://github.com/fml09) 59 + - [henry-encord](https://github.com/henry-encord) 60 + - [hunshcn](https://github.com/hunshcn) 61 + - [maxdew-envelio](https://github.com/maxdew-envelio) 62 + - [nnzhadow](https://github.com/nnzhadow) 63 + - [RndUsername](https://github.com/RndUsername) 64 + - [Schroedi](https://github.com/Schroedi)
+9
docs/partials/sponsors.md
··· 1 + ## Sponsors 2 + 3 + Help Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api). 4 + 5 + <div class="sponsors-list"> 6 + 7 + <!--@include: ./sponsors-list.md--> 8 + 9 + </div>
+1 -1
docs/sponsors-list.md docs/partials/sponsors-list.md
··· 11 11 </picture> 12 12 </a> 13 13 <p> 14 - Generate best-in-class SDKs. 14 + Best-in-class SDKs and MCP for your API. 15 15 </p> 16 16 <a href="https://kutt.it/pkEZyc" target="_blank"> 17 17 stainless.com
-9
docs/sponsors.md
··· 1 - ## Sponsors 2 - 3 - Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api). 4 - 5 - <div class="sponsors-list"> 6 - 7 - <!--@include: ./sponsors-list.md--> 8 - 9 - </div>
+8 -2
packages/nuxt/README.md
··· 24 24 25 25 [Sign In](https://app.heyapi.dev) to Hey API Platform. 26 26 27 + ## Contributing 28 + 29 + Want to see your code in products used by millions? 30 + 31 + Start with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature. 32 + 27 33 ## Documentation 28 34 29 35 Please visit our [website](https://heyapi.dev) for documentation, guides, migrating, and more. 30 36 31 37 ## Sponsors 32 38 33 - Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api). 39 + Help Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api). 34 40 35 41 <h3 align="center">Gold</h3> 36 42 ··· 47 53 </picture> 48 54 </a> 49 55 <br/> 50 - Generate best-in-class SDKs. 56 + Best-in-class SDKs and MCP for your API. 51 57 <br/> 52 58 <a href="https://kutt.it/pkEZyc" style="text-decoration:none;" target="_blank"> 53 59 stainless.com
+34 -13
packages/openapi-ts/README.md
··· 8 8 9 9 <p align="center"> 10 10 <a href="https://opensource.org/license/mit" rel="nofollow"><img src="https://img.shields.io/github/license/hey-api/openapi-ts" alt="MIT License"></a> 11 - <a href="https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain"><img src="https://img.shields.io/github/last-commit/hey-api/openapi-ts" alt="Last commit" /></a> 11 + <a href="https://npmjs.com/package/@hey-api/openapi-ts" rel="nofollow"><img src="https://img.shields.io/npm/dm/%40hey-api%2Fopenapi-ts?label=npm" alt="npm downloads"></a> 12 + <a href="https://github.com/hey-api/openapi-ts" rel="nofollow"><img src="https://img.shields.io/github/stars/hey-api/openapi-ts?style=flat&logo=github&label=GitHub&color=54C82D" alt="GitHub stars" /></a> 12 13 <a href="https://github.com/hey-api/openapi-ts/actions?query=branch%3Amain"><img src="https://github.com/hey-api/openapi-ts/actions/workflows/ci.yml/badge.svg?event=push&branch=main" alt="CI status" /></a> 13 - <a href="https://github.com/hey-api/openapi-ts/issues" rel="nofollow"><img src="https://img.shields.io/github/issues/hey-api/openapi-ts" alt="Number of open issues"></a> 14 - <a href="https://app.codecov.io/gh/hey-api/openapi-ts/tree/main"><img src="https://codecov.io/gh/hey-api/openapi-ts/branch/main/graph/badge.svg" alt="Test coverage" /></a> 15 14 </p> 16 15 17 16 <p align="center"> 18 17 <a href="https://stackblitz.com/edit/hey-api-example?file=openapi-ts.config.ts,src%2Fclient%2Fschemas.gen.ts,src%2Fclient%2Fsdk.gen.ts,src%2Fclient%2Ftypes.gen.ts">Demo</a> 19 18 <span>&nbsp;•&nbsp;</span> 20 - <a href="https://heyapi.dev">Documentation</a> 19 + <a href="https://heyapi.dev">Docs</a> 21 20 <span>&nbsp;•&nbsp;</span> 22 21 <a href="https://github.com/hey-api/openapi-ts/issues">Issues</a> 23 22 <span>&nbsp;•&nbsp;</span> 24 23 <a href="https://github.com/orgs/hey-api/discussions/1495">Roadmap</a> 25 24 <span>&nbsp;•&nbsp;</span> 26 - <a href="https://npmjs.com/package/@hey-api/openapi-ts">npm</a> 25 + <a href="https://heyapi.dev/openapi-ts/community/contributing">Contribute</a> 26 + <span>&nbsp;•&nbsp;</span> 27 + <a href="https://heyapi.dev/openapi-ts/community/spotlight#core-team">Join Core Team</a> 27 28 </p> 28 29 29 30 <br/> ··· 44 45 45 46 [Sign In](https://app.heyapi.dev) to Hey API Platform. 46 47 48 + ## Contributing 49 + 50 + Want to see your code in products used by millions? 51 + 52 + Start with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature. 53 + 47 54 ## Sponsors 48 55 49 - Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api). 56 + Help Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api). 50 57 51 58 <h3 align="center">Gold</h3> 52 59 ··· 63 70 </picture> 64 71 </a> 65 72 <br/> 66 - Generate best-in-class SDKs. 73 + Best-in-class SDKs and MCP for your API. 67 74 <br/> 68 75 <a href="https://kutt.it/pkEZyc" style="text-decoration:none;" target="_blank"> 69 76 stainless.com ··· 135 142 136 143 ## Installation 137 144 145 + You can download `@hey-api/openapi-ts` from npm using your favorite package manager. 146 + 138 147 #### npm 139 148 140 149 ```sh 141 - npm install @hey-api/openapi-ts -D 150 + npm install @hey-api/openapi-ts -D -E 142 151 ``` 143 152 144 153 #### pnpm 145 154 146 155 ```sh 147 - pnpm add @hey-api/openapi-ts -D 156 + pnpm add @hey-api/openapi-ts -D -E 148 157 ``` 149 158 150 159 #### yarn 151 160 152 161 ```sh 153 - yarn add @hey-api/openapi-ts -D 162 + yarn add @hey-api/openapi-ts -D -E 154 163 ``` 155 164 156 165 #### bun 157 166 158 167 ```sh 159 - bun add @hey-api/openapi-ts -D 168 + bun add @hey-api/openapi-ts -D -E 160 169 ``` 161 170 162 - We recommend pinning an exact version so you can safely upgrade when you're ready. This package is in [initial development](https://semver.org/spec/v0.1.0.html#spec-item-5) and its API might change before v1. 171 + ### Versioning 172 + 173 + This package does NOT follow the [semantic versioning](https://semver.org/) strategy. Please pin an exact version so you can safely upgrade when you're ready. 174 + 175 + Due to the nature of the package, we use the following versioning strategy. 176 + 177 + - `1.x.x`: significant breaking changes, reserved for v1 release 178 + - `x.1.x`: breaking changes 179 + - `x.x.1`: new features, bug fixes, and non-breaking changes 180 + 181 + We publish [migration notes](https://heyapi.dev/openapi-ts/migrating) for every breaking release. You might not be impacted by a breaking release if you don't use the affected plugin(s). 182 + 183 + ## Usage 163 184 164 185 ### CLI 165 186 ··· 175 196 176 197 ### Node.js 177 198 178 - You can also generate clients programmatically by importing `@hey-api/openapi-ts` in a TypeScript file. 199 + You can also generate output programmatically by importing `@hey-api/openapi-ts` in a TypeScript file. 179 200 180 201 ```ts 181 202 import { createClient } from '@hey-api/openapi-ts';
+9 -3
packages/vite-plugin/README.md
··· 1 1 <div align="center"> 2 2 <img alt="Hey API logo" height="150" src="https://heyapi.dev/images/logo-300w.png" width="150"> 3 3 <h1 align="center"><b>Vite Plugin</b></h1> 4 - <p align="center">🚀 Vite plugin for <code>@hey-api/openapi-ts<code> codegen.</p> 4 + <p align="center">🚀 Vite plugin for <code>@hey-api/openapi-ts</code> codegen.</p> 5 5 </div> 6 6 7 7 ## Dashboard ··· 10 10 11 11 [Sign In](https://app.heyapi.dev) to Hey API Platform. 12 12 13 + ## Contributing 14 + 15 + Want to see your code in products used by millions? 16 + 17 + Start with our [Contributing](https://heyapi.dev/openapi-ts/community/contributing) guide and release your first feature. 18 + 13 19 ## Documentation 14 20 15 21 Please visit our [website](https://heyapi.dev) for documentation, guides, migrating, and more. 16 22 17 23 ## Sponsors 18 24 19 - Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api). 25 + Help Hey API stay around for the long haul by becoming a [sponsor](https://github.com/sponsors/hey-api). 20 26 21 27 <h3 align="center">Gold</h3> 22 28 ··· 33 39 </picture> 34 40 </a> 35 41 <br/> 36 - Generate best-in-class SDKs. 42 + Best-in-class SDKs and MCP for your API. 37 43 <br/> 38 44 <a href="https://kutt.it/pkEZyc" style="text-decoration:none;" target="_blank"> 39 45 stainless.com
+124
scripts/update-contributors.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + REPO="hey-api/openapi-ts" 4 + PER_PAGE=100 5 + PAGE=1 6 + USERS=() 7 + 8 + TMP_LOGINS="tmp_logins.txt" 9 + TMP_USERS="tmp_users.txt" 10 + 11 + CACHE_DIR=".cache/github-users" 12 + mkdir -p "$CACHE_DIR" 13 + 14 + AUTH_HEADER=() 15 + if [[ -n "${GITHUB_TOKEN:-}" ]]; then 16 + AUTH_HEADER=(-H "Authorization: token $GITHUB_TOKEN") 17 + fi 18 + 19 + EXCLUDED_FILE="./docs/.contributorsignore" 20 + SINCE_FILE="./docs/.contributorssince" 21 + 22 + # disabled for now, we'd need to append to the list instead of write 23 + # if [[ -f "$SINCE_FILE" ]]; then 24 + # SINCE=$(cat "$SINCE_FILE") 25 + # else 26 + # SINCE="2024-01-27T00:00:00Z" 27 + # fi 28 + SINCE="2024-01-27T00:00:00Z" 29 + 30 + MAX_COMMIT_EPOCH=0 31 + 32 + > "$TMP_USERS" 33 + 34 + while :; do 35 + TMP_JSON=$(mktemp) 36 + HTTP_STATUS=$(curl -s -w "%{http_code}" -o "$TMP_JSON" \ 37 + "${AUTH_HEADER[@]}" \ 38 + "https://api.github.com/repos/$REPO/commits?sha=main&since=$SINCE&per_page=$PER_PAGE&page=$PAGE") 39 + 40 + if [ "$HTTP_STATUS" != "200" ]; then 41 + echo "GitHub API error: $HTTP_STATUS" 42 + cat "$TMP_JSON" 43 + rm "$TMP_JSON" 44 + break 45 + fi 46 + 47 + if ! jq empty "$TMP_JSON" >/dev/null 2>&1; then 48 + echo "Invalid JSON, stopping." 49 + cat "$TMP_JSON" > debug_response.json 50 + rm "$TMP_JSON" 51 + break 52 + fi 53 + 54 + COUNT=$(jq 'length' "$TMP_JSON") 55 + if [ "$COUNT" -eq 0 ]; then 56 + rm "$TMP_JSON" 57 + break 58 + fi 59 + 60 + # Track max commit date epoch for the whole run 61 + LATEST_COMMIT_DATE=$(jq -r '.[].commit.committer.date' "$TMP_JSON" | sort -r | head -n1) 62 + if [[ -n "$LATEST_COMMIT_DATE" ]]; then 63 + EPOCH=$(date -j -f "%Y-%m-%dT%H:%M:%SZ" "$LATEST_COMMIT_DATE" "+%s") 64 + if [ "$EPOCH" -gt "$MAX_COMMIT_EPOCH" ]; then 65 + MAX_COMMIT_EPOCH=$EPOCH 66 + fi 67 + fi 68 + 69 + jq -r '.[].author | select(.login != null) | .login' "$TMP_JSON" | sort -u > "$TMP_LOGINS" 70 + 71 + while read -r login; do 72 + if ! grep -Fxq "$login" "$EXCLUDED_FILE"; then 73 + if ! printf '%s\n' "${USERS[@]}" | grep -qx "$login"; then 74 + USERS+=("$login") 75 + 76 + CACHE_FILE="$CACHE_DIR/$login.json" 77 + if [ -f "$CACHE_FILE" ]; then 78 + USER_JSON=$(<"$CACHE_FILE") 79 + else 80 + echo "Fetching user $login" 81 + USER_JSON=$(curl -s "${AUTH_HEADER[@]}" "https://api.github.com/users/$login") 82 + echo "$USER_JSON" > "$CACHE_FILE" 83 + fi 84 + 85 + SANITIZED_JSON=$(echo "$USER_JSON" | tr -d '\000-\037') 86 + NAME=$(jq -r '.name // empty' <<< "$SANITIZED_JSON") 87 + echo "$login|$NAME" >> "$TMP_USERS" 88 + fi 89 + fi 90 + done < "$TMP_LOGINS" 91 + 92 + rm "$TMP_JSON" "$TMP_LOGINS" 93 + PAGE=$((PAGE + 1)) 94 + done 95 + 96 + # Update SINCE_FILE once after all pages 97 + if [ "$MAX_COMMIT_EPOCH" -gt 0 ]; then 98 + BUFFER_DAYS=90 99 + BUFFER_SECONDS=$((BUFFER_DAYS * 86400)) 100 + BUFFERED_EPOCH=$((MAX_COMMIT_EPOCH - BUFFER_SECONDS)) 101 + BUFFERED_DATE=$(date -u -r "$BUFFERED_EPOCH" "+%Y-%m-%dT%H:%M:%SZ") 102 + echo "$BUFFERED_DATE" > "$SINCE_FILE" 103 + echo "Updated SINCE to $BUFFERED_DATE" 104 + fi 105 + 106 + NAMES_SORTED=$(awk -F'|' '$2 != ""' "$TMP_USERS" | sort -t'|' -k2,2) 107 + NO_NAMES_SORTED=$(awk -F'|' '$2 == ""' "$TMP_USERS" | sort -t'|' -k1,1) 108 + 109 + { 110 + echo "$NAMES_SORTED" 111 + echo "$NO_NAMES_SORTED" 112 + } | while IFS='|' read -r login name; do 113 + if [ -n "$name" ]; then 114 + echo "- [$name](https://github.com/$login)" 115 + else 116 + echo "- [$login](https://github.com/$login)" 117 + fi 118 + done > ./docs/partials/contributors-list.md 119 + 120 + if [[ -f "$TMP_USERS" ]]; then 121 + rm "$TMP_USERS" 122 + fi 123 + 124 + echo "Done. Total contributors: ${#USERS[@]}"