Skip to content

Commit

Permalink
Merge pull request #9 from hey-api/chore/action-yml
Browse files Browse the repository at this point in the history
chore: try with action.yml
  • Loading branch information
mrlubos authored Apr 20, 2024
2 parents 11218c2 + a707525 commit 4ee1b93
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
<p align="center">A GitHub Action that uploads your OpenAPI specifications to Hey API 🚀</p>
</div>

To use this action, you have to be registered with [Hey API](https://heyapi.vercel.app/). If you don't have an account, please [email us](mailto:[email protected]) or [open an issue](https://github.com/hey-api/upload-openapi-spec/issues) and we will set you up.
To use this action, you have to be registered with
[Hey API](https://heyapi.vercel.app/). If you don't have an account, please
[email us](mailto:[email protected]) or
[open an issue](https://github.com/hey-api/upload-openapi-spec/issues) and we
will set you up.

## Usage

Create a new GitHub workflow or add an upload step to your existing workflow inside your API codebase.
Create a new GitHub workflow or add an upload step to your existing workflow
inside your API codebase.

```yaml
name: Upload OpenAPI Specification
Expand All @@ -32,20 +37,26 @@ jobs:
path-to-openapi: path/to/openapi.json
```
The example above will send your OpenAPI spec to Hey API on every push to `main` branch.
The example above will send your OpenAPI spec to Hey API on every push to `main`
branch.

## Inputs

To successfully upload an OpenAPI specification, you need to provide the following inputs (see `with` in the example above)
To successfully upload an OpenAPI specification, you need to provide the
following inputs (see `with` in the example above)

### `hey-api-token`

This is the authorization token you obtained from us.

### `path-to-openapi`

A relative path to your OpenAPI spec 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)).
A relative path to your OpenAPI spec 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)).

## Next Steps

Please follow the [integrations guide](https://heyapi.vercel.app/openapi-ts/integrations.html) on our website for the next steps.
Please follow the
[integrations guide](https://heyapi.vercel.app/openapi-ts/integrations.html) on
our website for the next steps.
File renamed without changes.

0 comments on commit 4ee1b93

Please sign in to comment.