11<div align =" center " >
22 <img alt =" Hey API logo " height =" 150 " src =" https://heyapi.dev/images/logo-300w.png " width =" 150 " >
33 <h1 align =" center " ><b >Upload OpenAPI Specification</b ></h1 >
4- <p align =" center " >🚀 A GitHub Action that uploads your OpenAPI specifications to Hey API</p >
4+ <p align =" center " >🚀 A GitHub Action for uploading specifications to Hey API</p >
55</div >
66
7- To use this action, you have to be registered with
8- [ Hey API] ( https://heyapi.dev/ ) . If you don't have an account, please
9- [ email us] ( mailto:lubos@heyapi.dev ) or
10- [ open an issue] ( https://github.com/hey-api/upload-openapi-spec/issues ) and we
11- will set you up.
7+ > Before using this GitHub Action, you must create a free account with
8+ > [ Hey API] ( https://app.heyapi.dev/ ) and generate a project API key.
129
1310## Usage
1411
15- Create a new GitHub workflow or add an upload step to your existing workflow
12+ Create a new GitHub workflow or add an upload step to an existing workflow
1613inside your API codebase.
1714
1815``` yaml
2219 push :
2320 branches :
2421 - main
22+ pull_request :
2523
2624jobs :
2725 upload-openapi-spec :
@@ -31,32 +29,41 @@ jobs:
3129 uses : actions/checkout@v4
3230
3331 - name : Upload OpenAPI spec
34- uses : hey-api/upload-openapi-spec@v1
32+ uses : hey-api/upload-openapi-spec@v1.2.0
3533 with :
36- hey-api-token : ${{ secrets.HEY_API_TOKEN }}
37- path-to-openapi : path/to/openapi.json
34+ api-key : ${{ secrets.HEY_API_TOKEN }}
35+ path-to-file : path/to/openapi.json
36+ tags : optional,custom,tags
3837` ` `
3938
40- The example above will send your OpenAPI spec to Hey API on every push to ` main`
41- branch.
39+ The example above will upload your OpenAPI specification to Hey API on every
40+ pull request and push to the ` main` branch.
4241
4342# # Inputs
4443
4544To successfully upload an OpenAPI specification, you need to provide the
4645following inputs (see `with` in the example above)
4746
48- # ## `hey- api-token `
47+ # ## `api-key `
4948
50- This is the authorization token you obtained from us.
49+ This is the project API key you obtained from
50+ [Hey API](https://app.heyapi.dev/).
5151
52- # ## `path-to-openapi`
52+ > Note: Personal API keys can't be used to upload specifications.
5353
54- A relative path to your OpenAPI spec file within the repository. Note that you
55- might need an additional step in your GitHub workflow to generate this file (see
54+ # ## `path-to-file`
55+
56+ A relative path to your OpenAPI file within the repository. Note that you might
57+ need an additional step in your GitHub workflow to generate this file (see
5658[FastAPI example](https://fastapi.tiangolo.com/how-to/extending-openapi/#generate-the-openapi-schema)).
5759
60+ # ## `tags` (optional)
61+
62+ A comma-separated string value representing any custom tags you wish to add to
63+ your OpenAPI specification.
64+
5865# # Next Steps
5966
6067Please follow the
61- [integrations guide](https://heyapi.vercel.app /openapi-ts/integrations.html ) on
62- our website for the next steps.
68+ [integrations guide](https://heyapi.dev /openapi-ts/integrations) on our website
69+ for the next steps.
0 commit comments