Skip to content

feat(api): add xendit openapi-based operation aliases#88

Merged
wauputr4 merged 11 commits into
mainfrom
codex/xendit-api-openapi
Jun 11, 2026
Merged

feat(api): add xendit openapi-based operation aliases#88
wauputr4 merged 11 commits into
mainfrom
codex/xendit-api-openapi

Conversation

@wauputr4

@wauputr4 wauputr4 commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Add script-based conversion from Xendit Postman collections to OpenAPI JSON.
  • Add generator to produce xendit API operation aliases from OpenAPI.
  • Wire Xendit API mode to use generated aliases with fallback mappings.
  • Add CLI test coverage for generated and manual Xendit operation resolution.
  • Update README and CLI onboarding docs with xendit API alias generation commands and mapping examples.

Files changed

  • scripts/convert-xendit-postman-to-openapi.sh
  • scripts/generate-xendit-openapi-aliases.sh
  • docs/apis/xendit-openapi-from-postman.json
  • internal/cli/xendit_openapi_aliases_generated.go
  • internal/cli/api.go
  • internal/cli/cli_test.go
  • README.md
  • docs/cli-onboarding.md

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces automation scripts to convert Xendit Postman collections into an OpenAPI specification and generate corresponding Go API operation aliases, along with updating documentation, release rules, and tests. Feedback on the conversion and generation scripts suggests improving the identification of ID segments (such as prefixed UUIDs and custom reference patterns) and decimal version segments (like v1.0) to prevent hardcoded paths and verbose version strings from leaking into the generated OpenAPI spec and Go aliases.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread scripts/convert-xendit-postman-to-openapi.sh
Comment thread scripts/generate-xendit-openapi-aliases.sh

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff14d3b061

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/generate-xendit-openapi-aliases.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca3c529714

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cli/xendit_openapi_aliases_generated.go Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d94980671f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cli/xendit_openapi_aliases_generated.go Outdated
@wauputr4

Copy link
Copy Markdown
Member Author

Updated branch with commit 8428641: xendit OpenAPI alias generator now skips paths starting with /snap and regenerated xendit_openapi_aliases_generated.go so SNAP aliases are no longer exposed. This addresses remaining unresolved SNAP review item in PR #88.

@wauputr4 wauputr4 force-pushed the codex/xendit-api-openapi branch from 8428641 to b9d9177 Compare June 11, 2026 20:24

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9d9177c08

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/cli/xendit_openapi_aliases_generated.go Outdated
@wauputr4

Copy link
Copy Markdown
Member Author

Selesai: saya perbaiki generator agar skip sample path dan re-generate aliases. Commit baru: . Harap cek kembali review comment ; seharusnya sudah hilang dari generated map.

@wauputr4

Copy link
Copy Markdown
Member Author

Selesai: saya perbaiki generator agar skip sample path dan re-generate aliases. Commit terbaru: b65b715. Harap cek kembali review comment discussion_r3398956619; entri sample webhook sudah dihapus dari map.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2132d17e49

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/generate-xendit-openapi-aliases.sh
@wauputr4

Copy link
Copy Markdown
Member Author

Akhirnya: commit sudah fix dua poin yang masih ada di review lama yang actionable sekarang: (1) jadi handle prefixed UUID () + ; (2) wrote /Users/wauputra/Documents/02_Bisnis_Pekerjaan/07_Dev/rute-bayar/internal/cli/xendit_openapi_aliases_generated.go dikembalikan executable mode 100755.

Status latest checks: CI + E2E Sandbox + E2E Smoke semua pass di commit ini (). Sisanya di review thread tampak historis (path unresolved) tapi sudah otomatis terpenuhi di current patch. Bisa lanjut merge/release kalau approval sudah ada.

@wauputr4

Copy link
Copy Markdown
Member Author

Akhirnya: commit a452977 fix dua poin actionable dari review: isLikelyIdSegment handle prefixed UUID dan order-id-*, plus scripts/generate-xendit-openapi-aliases.sh mode executable 100755. Status latest checks: CI + E2E Sandbox + E2E Smoke all pass untuk commit a452977. Sisanya di review thread tampak historis (status isResolved=false dari review sebelumnya) tapi alurnya sudah dipenuhi oleh patch ini; lanjut merge/release jika approval sudah cukup.

@wauputr4 wauputr4 merged commit 68e22ba into main Jun 11, 2026
7 checks passed
@wauputr4 wauputr4 deleted the codex/xendit-api-openapi branch June 11, 2026 21:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a452977a53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +163 to +164
if (!alias || generated.has(alias)) {
continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid binding ambiguous aliases to the first operation

The generator emits bare aliases as well as method-prefixed aliases, but this collision check silently keeps whichever operation is encountered first. In the checked-in Xendit spec, that makes aliases like ewallets-charges-void and void resolve to GET /ewallets/charges/{id}/void even though the same path also has a POST void operation, so rutebayar api xendit --operation void checks void status instead of voiding the charge. Please detect these collisions and skip or disambiguate the bare alias rather than preserving the first match.

Useful? React with 👍 / 👎.

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.

1 participant