Skip to content

Commit 25a6ffe

Browse files
authored
Merge pull request #317 from signalwire/Devon/swml-messaging
SWML messaging — integration
2 parents f8c144b + b577d0e commit 25a6ffe

206 files changed

Lines changed: 38244 additions & 21577 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,30 @@ Whether you're fixing a typo, reporting missing information, or submitting new c
109109
3. Make your changes and [submit a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
110110

111111
> [!IMPORTANT]
112-
> Contributions to the API docs require additional workflows.
113-
> TypeSpec source files live in `specs/` and compile to OpenAPI specs in `fern/apis/`.
112+
> Contributions to the API reference or SWML schema require additional workflows.
113+
> Spec source lives in `specs/` as [TypeSpec](https://typespec.io/docs) (`.tsp`) and compiles to OpenAPI / JSON Schema in `fern/apis/` and `specs/swml/**/tsp-output/`.
114114
> See the [TypeSpec documentation](https://typespec.io/docs) for guidance on editing spec files.
115115
116-
### REST API documentation
116+
### API specifications
117117

118-
API reference pages are generated from [TypeSpec](https://typespec.io/docs) definitions in [`specs/`](specs/), which compile into [OpenAPI](https://swagger.io/specification/) spec files consumed by Fern.
118+
The [`specs/`](specs/) workspace holds three sibling TypeSpec projects. Each one declares its own `tspconfig.yaml` and emits a different downstream artifact:
119+
120+
| Project | Source | Emits | Powers |
121+
|---|---|---|---|
122+
| **SignalWire REST API** | [`specs/signalwire-rest/`](specs/signalwire-rest/) | `fern/apis/signalwire-rest/openapi.yaml` (OpenAPI 3.1) | The [`/docs/apis`](https://signalwire.com/docs/apis) reference |
123+
| **Compatibility API** | [`specs/compatibility-api/`](specs/compatibility-api/) | `fern/apis/compatibility/openapi.yaml` (OpenAPI 3.1) | The [`/docs/compatibility-api`](https://signalwire.com/docs/compatibility-api) reference |
124+
| **SWML** | [`specs/swml/`](specs/swml/) | `specs/swml/**/tsp-output/.../SWMLObject.json` (JSON Schema) | SWML editor + runtime validator tooling |
125+
126+
Shared building blocks live in [`specs/_shared/`](specs/_shared/): repo-wide scalars (`uuid`, `jwt`), status-code aliases, and a custom `@webhook(...)` decorator that emits OpenAPI 3.1 `webhooks:` entries for outbound payloads SignalWire sends to your servers.
119127

120128
```bash
121-
yarn build:specs # Compile TypeSpec → OpenAPI
122-
yarn format:specs # Format spec files
129+
yarn build:specs # Compile every TypeSpec project → OpenAPI + JSON Schema
130+
yarn format:specs # tsp format every .tsp file in the workspace
123131
```
124132

133+
> [!NOTE]
134+
> Generated files (`fern/apis/*/openapi.yaml` and `specs/swml/**/tsp-output/`) are committed but **not** hand-edited. Always change the TypeSpec source, then rebuild — Fern and the SWML tooling read the generated artifacts directly.
135+
125136
---
126137

127138
## Usage

0 commit comments

Comments
 (0)