https://github.com/hookdeck/hookdeck-api-schema
Hookdeck's API Definition, which is used to generate SDKs.
https://github.com/hookdeck/hookdeck-api-schema
Last synced: 3 months ago
JSON representation
Hookdeck's API Definition, which is used to generate SDKs.
- Host: GitHub
- URL: https://github.com/hookdeck/hookdeck-api-schema
- Owner: hookdeck
- Created: 2022-10-17T22:47:45.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T00:10:29.000Z (about 1 year ago)
- Last Synced: 2024-10-30T02:48:39.430Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 742 KB
- Stars: 3
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hookdeck OpenAPI Schema
In addition to the standard uses of OpenAPI schema, the Hookdeck OpenAPI schema is used to generate our SDKS using [Fern](https://www.buildwithfern.com/?ref=hookdeck):
- [Go SDK](https://github.com/hookdeck/hookdeck-go-sdk)
- [TypeScript SDK](https://github.com/hookdeck/hookdeck-typescript-sdk)
## What is in this repository?
This repository contains
- Hookdeck's API Definition which lives in the root directory and contains some Fern specific extensions
- Generators used to generate the SDK (see [generators.yml](./fern/generators.yml))
## About Fern
Fern is used to generate our SDKs from the OpenAPI specification.
In order to make sure that the definition is valid, you can use the Fern CLI.
```bash
npm install -g fern-api # Installs CLI
fern check # Checks if the definition is valid
```
### What are Generators?
Generators read in your API Definition and output files or code (i.e. the TypeScript SDK Generator) and are tracked in [generators.yml](./fern/generators.yml).
#### Local preview
You can preview the generated code in the `./local/go/generated/hookdeck-go-sdk` directory by running the following command:
```sh
fern generate --group local
```
### Validating your API Definition
To validate your API, run:
```sh
npm install -g fern-api # only required once
fern check
```
### Updating your SDKs
To update your SDKs, run `fern generate`.
```sh
npm install -g fern-api # only required once
fern generate --group node-sdk
```
This repository contains Github Actions that will trigger SDK generation. Check them out by navigating
to the `Actions` tab and clicking `Release TypeScript SDK`.