A schema diff in review is a breaking change made visible

Generating the document is only half of it: committing the generated file is what turns an API change into something a reviewer can see.

- name: Check the API document is current
  run: |
    vendor/bin/openapi app -o /tmp/openapi.json
    diff <(jq -S . public/openapi.json) <(jq -S . /tmp/openapi.json)

# and the stronger version, once a tool exists for it:
#   fail when the diff is BREAKING rather than when it changes

Sorting with jq -S before diffing removes key-order noise, without which the check fails on every run for no reason. A generated file in the repository is duplication and is worth it here: the pull request that removes a field now shows the removal in a document rather than only in a controller. Breaking-change detection is the next step and the tooling for it is immature in 2020, so a human reading the diff is the mechanism.