These models are used to communicate between MAPI and the native apps. This repository defines the Swift models for "blueprint" collections, generated from the protobuf schema with the help of SwiftBuffet.
A GitHub Action, Sync blueprint.proto, runs on a daily schedule (and can also be triggered manually via workflow_dispatch). It checks whether proto/blueprint.proto has changed on the main branch of mobile-apps-api-models.
If a change is detected, the workflow will:
- Copy the updated
blueprint.protointo this repo and remove the stale generated files. - Regenerate the Swift models by running
Scripts/update-blueprint-models.sh. - Open a pull request (branch
automated/update-blueprint-proto) containing the updated proto file and regenerated models for review.
No PR is opened if the upstream file hasn't changed. Any resulting PR should still be reviewed manually before merging, in case the generated diff needs attention.
If you need to update the models without waiting for the scheduled sync — for example, to work with proto file changes that are not currently live, such as those on a branch for a future release in the Code environment — you can run the update-blueprint-models.sh script yourself.
The mobile-apps-api-models repo contains the blueprint.proto file. Copy a version of this file and replace ./BlueprintModels/Sources/BlueprintModels/Proto/blueprint.proto within this repo. Also, delete the generated swift files.
Run the update-blueprint-models.sh script from the ./Scripts/ folder. The script knows the location of the blueprint.proto file and will update the swift-protobuf and Swift Buffet files to reflect any local changes to the blueprint.proto file.