Because Zuplo is OpenAPI native, you can automate the process of udating your
Zuplo API when a downstream OpenAPI file changes. For example, if you have an
API built in Go that uses Huma you can
easily generate an OpenAPI file for your API. Then using that generated OpenAPI
file, you can write a script that updates your Zuplo API based on changes in
your generated file.
This example shows a GitHub Action that updates a Zuplo API from an OpenAPI file
that is generated in your API.
You would run this Github Action in the repository that contains your downstream
API. When you push changes to your API, the action will run, generate the
OpenAPI file. Then it will clone the Zuplo API repository, update the Zuplo
OpenAPI file, commit and push the changes to a new branch, and open a pull
request. It will also generate an
Action Summary
that links to the Pull Request.
This script is a starting point. You will need to modify it to fit your needs.
You might want to add more checks, tests, or other steps to ensure the update is
correct. You can also add more information to the pull request body to help your
team understand the changes.