Using a Custom OpenAPI Spec
Note
This procedure should only be used during development. The OpenAPI spec in the StyraInc/enterprise-opa repository is the point of truth for how the SDKs should be generated. You should never merge code into main
which was not generated using the upstream one. Any permenant changes to the OpenAPI spec must go through a PR on the upstream.
During development, you may wish to customize the OpenAPI spec used to generate the SDK. Here is how you can do so:
- Download the existing spec to a local file, noting the path you saved it at.
- Make any needed modifications to the OpenAPI spec.
- Modify
.speakeasy/workflow.yaml
to changesources.openapi.inputs[0].location
to point to your local file. It is not necessary to provide a URI scheme for local files. - Follow the steps described in Regenerate Speakeasy-Managed Code to regenerate the SDK.