Skip to content

[gha] ensure bundled openapi.yaml is in sync#243

Merged
shreyav merged 1 commit intomainfrom
03-03-_gha_ensure_bundled_openapi.yaml_is_in_sync
Mar 3, 2026
Merged

[gha] ensure bundled openapi.yaml is in sync#243
shreyav merged 1 commit intomainfrom
03-03-_gha_ensure_bundled_openapi.yaml_is_in_sync

Conversation

@shreyav
Copy link
Contributor

@shreyav shreyav commented Mar 3, 2026

No description provided.

Copy link
Contributor Author

shreyav commented Mar 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@shreyav shreyav force-pushed the 03-03-_gha_ensure_bundled_openapi.yaml_is_in_sync branch 2 times, most recently from 62da724 to 7f85025 Compare March 3, 2026 19:03
@shreyav shreyav marked this pull request as ready for review March 3, 2026 19:05
@shreyav shreyav force-pushed the 03-03-_gha_ensure_bundled_openapi.yaml_is_in_sync branch from 7f85025 to db19163 Compare March 3, 2026 19:08
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 3, 2026

Greptile Summary

This PR adds a GitHub Actions workflow step to enforce that the bundled openapi.yaml and mintlify/openapi.yaml are always kept in sync with the source files under openapi/. It also updates all three workflows (lint.yml, openapi-build.yml, dummy.yml) to trigger (or skip) on changes to openapi/** in addition to the already-tracked openapi.yaml, and includes a minor wording improvement to the PurposeOfPayment description.

Key changes:

  • openapi-build.yml: Adds a post-build git diff --exit-code openapi.yaml mintlify/openapi.yaml check. After a clean checkout, make build regenerates the compiled files; if either differs from the committed version the step fails with an actionable error message.
  • dummy.yml / lint.yml: Add openapi/** to their respective paths-ignore / paths filters so the correct workflow runs (or is skipped) whenever source schema files change.
  • openapi/components/schemas/quotes/PurposeOfPayment.yaml + compiled outputs: Rewording "such as India" → "(e.g. India)" — both compiled artifacts (openapi.yaml, mintlify/openapi.yaml) are updated in lockstep, demonstrating the new sync check is already being exercised.

Confidence Score: 4/5

  • This PR is safe to merge. It adds CI enforcement for an existing manual convention with no runtime risk.
  • All changes are limited to GitHub Actions workflow configuration and a trivial wording fix in schema source and compiled outputs. The sync-check logic is correct: git diff --exit-code on tracked files after a fresh checkout will reliably detect stale compiled artifacts. One minor improvement identified in error message clarity, but this does not affect the safety of the merge.
  • .github/workflows/openapi-build.yml — error message should mention both files covered by the sync check.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR / Push to main\nchanges openapi/**] --> B[openapi-build.yml triggers]
    A2[PR / Push to main\nno openapi/** changes] --> B2[dummy.yml fires\nskip jobs]
    B --> C[actions/checkout - clean worktree]
    C --> D[npm ci]
    D --> E[make build\nregenerates openapi.yaml\nand mintlify/openapi.yaml]
    E --> F{git diff --exit-code\nopenapi.yaml\nmintlify/openapi.yaml}
    F -->|No diff - files already up to date| G[✅ Pass]
    F -->|Diff detected - stale compiled output| H[❌ Fail\nPrint error + exit 1]
Loading

Last reviewed commit: db19163

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

- name: Check compiled OpenAPI is up to date
run: |
if ! git diff --exit-code openapi.yaml mintlify/openapi.yaml; then
echo "ERROR: Compiled openapi.yaml is out of sync with source files in openapi/."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message only mentions openapi.yaml, but the git diff check on line 44 validates both openapi.yaml and mintlify/openapi.yaml. If only mintlify/openapi.yaml is out of sync, this message will be misleading.

Suggested change
echo "ERROR: Compiled openapi.yaml is out of sync with source files in openapi/."
echo "ERROR: Compiled openapi.yaml or mintlify/openapi.yaml is out of sync with source files in openapi/."
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/openapi-build.yml
Line: 45

Comment:
The error message only mentions `openapi.yaml`, but the `git diff` check on line 44 validates both `openapi.yaml` and `mintlify/openapi.yaml`. If only `mintlify/openapi.yaml` is out of sync, this message will be misleading.

```suggestion
            echo "ERROR: Compiled openapi.yaml or mintlify/openapi.yaml is out of sync with source files in openapi/."
```

How can I resolve this? If you propose a fix, please make it concise.

@shreyav shreyav merged commit f4d545d into main Mar 3, 2026
8 of 9 checks passed
@shreyav shreyav deleted the 03-03-_gha_ensure_bundled_openapi.yaml_is_in_sync branch March 3, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants