Preprocesses our OpenAPI specs to prepare them for geneation via Speakeasy (our API client library generator).
The GitHub Action that transforms OpenAPI YAML specification files by:
- Downloading files from specified URLs
- Moving the server URL subpath to each individual API path
- Writing the transformed files to the
generated_specs/
directory
This action performs the following transformations:
- Before:
servers.url = "https://{domain}-be.glean.com/rest/api/v1"
,path = "/activity"
- After:
servers.url = "https://{domain}-be.glean.com/"
,path = "/rest/api/v1/activity"
Transformed files are saved to the generated_specs/
directory:
generated_specs/client_rest.yaml
generated_specs/indexing.yaml
See usage in the ./github/workflows/transform.yml
workflow.
To set up the development environment:
-
Clone the repository
-
Install dependencies:
npm install
-
Run tests:
npm test
-
Build the action:
npm run build