Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inngest/event-schemas
Event Schema definitions for common events on the Inngest platform
https://github.com/inngest/event-schemas
cue cuelang events json-schema typescript
Last synced: about 2 months ago
JSON representation
Event Schema definitions for common events on the Inngest platform
- Host: GitHub
- URL: https://github.com/inngest/event-schemas
- Owner: inngest
- License: gpl-3.0
- Created: 2022-01-17T14:54:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-19T12:40:31.000Z (8 months ago)
- Last Synced: 2024-06-19T05:59:52.760Z (6 months ago)
- Topics: cue, cuelang, events, json-schema, typescript
- Language: Go
- Homepage: https://www.inngest.com
- Size: 3.61 MB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Event schemas
This repository contains event schema definitions for common events ingested within
[Inngest](https://www.inngest.com). This allows you to get full type information for common events,
and allows you to generate schemas in multiple languages for each event.Events are defined using [cue](https://cuelang.org), a novel declarative data language. It's
concise, strongly typed, allows constraining values, defaults, and annotations for extra data.## Converting JSON Schema & OpenAPI definitions to Cue
We use [cue](https://cuelang.org) as our canonical representation of event types. You can generate
a Cue type definition from an existing JSON schema or API schema:```
cue import jsonschema ./path/to/schema.json -o -
```This will print the cue type definitions to stdout. You can then take these definitions and add
them to ./defs/${service.cue} to document events.## Go package
The event types are importable using the following package:
```
go get github.com/inngest/event-schemas/events
```You can reference all supported events via `events.Events`.