You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,11 @@
36
36
- generates TypeScript interfaces and SDKs
37
37
- Fetch API, Axios, Nuxt, Angular, Node.js, and XHR clients available
38
38
- plugin ecosystem to reduce third-party boilerplate
39
+
-[platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
40
+
41
+
## Platform
42
+
43
+
Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
39
44
40
45
## Sponsors
41
46
@@ -47,10 +52,6 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
47
52
</a>
48
53
</p>
49
54
50
-
## GitHub Integration (coming 2025)
51
-
52
-
Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
53
-
54
55
## Quick Start
55
56
56
57
The fastest way to use `@hey-api/openapi-ts` is via npx
description: Automate your client generation with our OpenAPI specifications storage.
4
4
---
5
5
6
-
# Integrations <spandata-soon>Soon</span>
6
+
# Hey API Platform
7
7
8
8
::: warning
9
-
GitHub integration is not publicly available yet. We are gathering feedback from beta testers to ensure the final product meets our quality standards. To express your interest in joining the beta test, please open an issue on [GitHub](https://github.com/hey-api/upload-openapi-spec/issues).
9
+
This feature is in development! :tada: Try it out and provide feedback on [GitHub](https://github.com/orgs/hey-api/discussions/1773).
10
10
:::
11
11
12
-
Integrations allow you to automate your client generation workflow. Create dependency links between your clients and APIs, and watch the magic unfold. While we prefer to use `@hey-api/openapi-ts` for generating clients, you can use any codegen.
12
+
You can automate your client generation with our platform thanks to reproducible builds. Create dependency links between your clients and APIs, and watch the magic unfold. It's completely language and codegen agnostic.
13
13
14
-
## Upload OpenAPI Spec
14
+
## Features
15
15
16
-
First, you need to configure your API build workflow to send us OpenAPI specifications. This can be done by adding our [hey-api/upload-openapi-spec](https://github.com/marketplace/actions/upload-openapi-spec-by-hey-api) GitHub Action into your CI workflow.
16
+
- API version history
17
+
- real-time updates
18
+
- reproducible builds
19
+
- language and codegen agnostic (TypeScript/Python/Go/Java/etc codegens are welcome)
20
+
21
+
## Upload Specifications
22
+
23
+
Before you can generate clients, you must publish your OpenAPI specifications to Hey API.
24
+
25
+
### Prerequisites
26
+
27
+
1. Create a **free account** with [Hey API](https://app.heyapi.dev/).
28
+
1. Create a new **organization** and **project** for your API provider. We recommend your naming matches your GitHub structure as it will be referenced by API clients. For example, we are using **hey-api/backend** for the platform.
29
+
1. Inside your project, go to _Integrations_ > _APIs_ and generate an **API key**. Keep this value secret, it will be used to upload files.
30
+
31
+
### Add GitHub CI workflow
32
+
33
+
Once you have your API key, you can start uploading OpenAPI specifications on every API build. We'll use our [GitHub Action](https://github.com/marketplace/actions/upload-openapi-spec-by-hey-api), but you can also make the API call manually if you're not using GitHub.
34
+
35
+
Create a new GitHub workflow or add an upload step to an existing workflow inside your API codebase. The example below will upload your OpenAPI specification to Hey API on every pull request and push to the `main` branch.
17
36
18
37
```yaml
19
38
name: Upload OpenAPI Specification
@@ -22,6 +41,7 @@ on:
22
41
push:
23
42
branches:
24
43
- main
44
+
pull_request:
25
45
26
46
jobs:
27
47
upload-openapi-spec:
@@ -31,14 +51,147 @@ jobs:
31
51
uses: actions/checkout@v4
32
52
33
53
- name: Upload OpenAPI spec
34
-
uses: hey-api/upload-openapi-spec@v1
54
+
uses: hey-api/upload-openapi-spec@v1.3.0
35
55
with:
36
-
hey-api-token: ${{ secrets.HEY_API_TOKEN }}
37
-
path-to-openapi: path/to/openapi.json
56
+
path-to-file: path/to/openapi.json
57
+
tags: optional,custom,tags
58
+
env:
59
+
API_KEY: ${{ secrets.HEY_API_TOKEN }}
60
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61
+
```
62
+
63
+
### Inputs
64
+
65
+
To successfully upload an OpenAPI specification, you need to provide the following inputs (see `with` in the example above)
66
+
67
+
#### `path-to-file`
68
+
69
+
A relative path to your OpenAPI file within the repository. Note that you might need an additional step in your GitHub workflow to generate this file (see [FastAPI example](https://fastapi.tiangolo.com/how-to/extending-openapi/#generate-the-openapi-schema)).
70
+
71
+
#### `tags` (optional)
72
+
73
+
A comma-separated string value representing any custom tags you wish to add to your OpenAPI specification.
74
+
75
+
### Environment Variables
76
+
77
+
In addition to the required `path-to-file` input, you must provide the following environment variables.
78
+
79
+
#### `API_KEY`
80
+
81
+
This is the project API key you obtained from [Hey API](https://app.heyapi.dev/).
82
+
83
+
::: warning
84
+
Personal API keys can't be used to upload specifications.
85
+
:::
86
+
87
+
#### `GITHUB_TOKEN`
88
+
89
+
This variable will be available inside your workflow by default. It's used to
90
+
fetch information about your repository, i.e. default branch.
91
+
92
+
## Generate Clients
93
+
94
+
You can generate clients from public projects or any private projects you can access. The setup is largely the same, you want to configure the input path used by your codegen.
By default, we preserve the current behavior and return the latest specification. Let's have a closer look at the input path and change that.
126
+
127
+
## Get API
128
+
129
+
As you can deduce from the examples above, the default command for fetching OpenAPI specifications looks like this.
130
+
131
+
```
132
+
https://get.heyapi.dev/<organization>/<project>
133
+
```
134
+
135
+
If you created an organization `foo` with project `bar` earlier, your URL would look like this.
136
+
137
+
```
138
+
https://get.heyapi.dev/foo/bar
139
+
```
140
+
141
+
### Auth
142
+
143
+
Projects are private by default, you will need to be authenticated to download OpenAPI specifications. We recommend using [project API keys](#prerequisites) in CI workflows and [personal API keys](https://app.heyapi.dev/settings/user/apis) for local development.
144
+
145
+
Once you have your API key, you can authenticate the request using the `Authorization` header or `api_key` query parameter.
Congratulations on fetching your first OpenAPI specification! 🎉
152
+
153
+
### Filters
154
+
155
+
The default behavior returns the last uploaded specification. This might not be what you want. You can use a range of filters to narrow down the possible specifications, or pin your builds to an exact version.
156
+
157
+
#### `branch`
158
+
159
+
You can fetch the last build from branch by providing the `branch` query parameter.
160
+
161
+
```
162
+
https://get.heyapi.dev/foo/bar?branch=production
163
+
```
164
+
165
+
#### `commit_sha`
166
+
167
+
You can fetch an exact specification by providing the `commit_sha` query parameter. This will always return the same file.
This step requires you to register with us in order to obtain a Hey API token. Please follow the instructions in our [GitHub Action](https://github.com/marketplace/actions/upload-openapi-spec-by-hey-api) to complete the setup. Once you have your APIs configured, you're ready to connect your clients.
173
+
#### `tags`
174
+
175
+
If you're tagging your specifications with [custom tags](#tags-optional), you can use them to filter the results. When you provide multiple tags, only the first match will be returned.
Every OpenAPI document contains a required version field. You can use this value to fetch the last uploaded specification matching the value.
184
+
185
+
```
186
+
https://get.heyapi.dev/foo/bar?version=1.0.0
187
+
```
188
+
189
+
## Feedback
190
+
191
+
We'd love your feedback! You can contact us on social media (search Hey API), [email](mailto:[email protected]), or [GitHub](https://github.com/orgs/hey-api/discussions/1773).
192
+
193
+
## Pricing
41
194
42
-
## Configure Clients
195
+
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.
43
196
44
-
More information will be provided as we finalize the tooling.
Copy file name to clipboardExpand all lines: packages/client-axios/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,11 @@
15
15
- granular request and response customization options
16
16
- minimal learning curve thanks to extending the underlying technology
17
17
- support bundling inside the generated output
18
+
-[platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
19
+
20
+
## Platform
21
+
22
+
Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
18
23
19
24
## Documentation
20
25
@@ -30,10 +35,6 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
30
35
</a>
31
36
</p>
32
37
33
-
## GitHub Integration (coming soon)
34
-
35
-
Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
Copy file name to clipboardExpand all lines: packages/client-fetch/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,11 @@
15
15
- granular request and response customization options
16
16
- minimal learning curve thanks to extending the underlying technology
17
17
- support bundling inside the generated output
18
+
-[platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
19
+
20
+
## Platform
21
+
22
+
Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
18
23
19
24
## Documentation
20
25
@@ -30,10 +35,6 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
30
35
</a>
31
36
</p>
32
37
33
-
## GitHub Integration (coming soon)
34
-
35
-
Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
Copy file name to clipboardExpand all lines: packages/client-next/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,11 @@
16
16
- granular request and response customization options
17
17
- minimal learning curve thanks to extending the underlying technology
18
18
- support bundling inside the generated output
19
+
-[platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
20
+
21
+
## Platform
22
+
23
+
Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
19
24
20
25
## Documentation
21
26
@@ -31,10 +36,6 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
31
36
</a>
32
37
</p>
33
38
34
-
## GitHub Integration (coming soon)
35
-
36
-
Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
Copy file name to clipboardExpand all lines: packages/client-nuxt/README.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,11 @@
16
16
- granular request and response customization options
17
17
- minimal learning curve thanks to extending the underlying technology
18
18
- support bundling inside the generated output
19
+
-[platform](https://heyapi.dev/openapi-ts/integrations) for automating codegen builds
20
+
21
+
## Platform
22
+
23
+
Our platform for OpenAPI specifications is now available. Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations).
19
24
20
25
## Documentation
21
26
@@ -31,10 +36,6 @@ Love Hey API? Become our [sponsor](https://github.com/sponsors/hey-api).
31
36
</a>
32
37
</p>
33
38
34
-
## GitHub Integration (coming soon)
35
-
36
-
Automatically update your code when the APIs it depends on change. [Find out more](https://heyapi.dev/openapi-ts/integrations.html).
0 commit comments