Talk in English - UK at Dutch PHP Conference 2022 - Online Edition
View Slides: https://github.com/dannyverp/presentations/raw/master/src/quality/api-contract.pdf
Short URL: https://joind.in/talk/c6f0d (QR-Code (opens in new window))
A lot of us have been there before: we don't really like the URI we picked for a certain endpoint and would like to change it. There's a mobile app and a web app which depend on our API though so it would mean a large code change over 3 projects. What if we had generated client packages from our API though? It would allow automatic testing of our contract changes in the downstream application and mean only a package version bump to implement the new URI.
This talk covers how we can leverage GitLab's downstream pipelines to generate packages from an OpenApi spec and test other downstream projects with it.
What you'll learn from this talk:
- Create a composer package from an OpenApi Spec.
- Leverage GitLab CI downstream pipelines to publish the package to the GitLab Registry.
- Test the downstream frontends with the updated package.