Skip to content

Sync app_type response enum with AppTypeEnum and make it open - #202

Draft
claude[bot] wants to merge 2 commits into
mainfrom
claude/fix-opal-apps-app-type-decode
Draft

Sync app_type response enum with AppTypeEnum and make it open#202
claude[bot] wants to merge 2 commits into
mainfrom
claude/fix-opal-apps-app-type-decode

Conversation

@claude

@claude claude Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Requested via Slack thread

Description of the change

Before: Any org with an app whose type is missing from the provider's hand-frozen 33-value response enum in terraform_overlay.yaml (e.g. CUSTOM_CONNECTOR, SLACK, JIRA, DATADOG, and 16 more) gets Error: failure to invoke API — invalid value for AppType: X on every opal_apps read — the whole GET /apps response fails to decode, so it's all-or-nothing and filtering doesn't help — and on opal_app for those apps. Broken since v3.4.0, where #175 froze the inline list. Customer report: upgrading 3.3.3 → 3.6.0 (Pylon #377).

After: The app_type response enum carries all 53 current app types, and x-speakeasy-unknown-values: allow makes it an open enum — so app types added to the API later decode as raw strings instead of failing the read. opal_apps/opal_app work regardless of which app types exist in the org, while the field keeps typed enum documentation.

How: The overlay's inline enum: on App.app_type is synced to the authoritative components.schemas.AppTypeEnum list in openapi.yaml (53 values, same order), and a second overlay action sets x-speakeasy-unknown-values: allow on the property so Speakeasy generates an open enum. The other app_type actions (x-speakeasy-name-override: type, description, example, type: string, $ref removal) and the filter-side AppTypeEnum query parameter are untouched.

Notes:

  • internal/sdk is generated — a maintainer needs to kick off the Speakeasy regeneration workflow (sdk_generation.yaml, requires the repo's Speakeasy key) on this branch to regenerate the SDK before merge. No generated files are hand-edited here.
  • Validation: terraform_overlay.yaml parses cleanly (yaml.safe_load); the overlay enum was verified to match components.schemas.AppTypeEnum in openapi.yaml exactly (53 values, same order, CUSTOM_CONNECTOR included). The Speakeasy CLI was not available in this environment for overlay validate.

Checklist

  • I performed a self-review of my code
  • I manually tested my code change (please list details in description)
  • I added unit tests
  • I updated the changelog
  • I updated the public facing docs

Generated by Claude Code

…s plain strings

The overlay replaced upstream App.app_type's $ref to the 53-value
AppTypeEnum with a hand-frozen 33-value inline enum. The generated
SDK's strict enum unmarshalling then failed on any org containing an
app type outside that list (e.g. CUSTOM_CONNECTOR, SLACK, JIRA),
breaking every opal_apps read and opal_app lookups for those apps
since v3.4.0.

Dropping the inline enum leaves the field as type: string with its
description and example, restoring the pre-v3.4.0 plain-string decode
behavior. The filter-side AppTypeEnum parameter is untouched.

internal/sdk must be regenerated via the sdk_generation workflow on
this branch before merge.
…unknown-values

The App schema's overlay previously replaced the upstream 53-value
AppTypeEnum $ref with a hand-frozen 33-value inline enum, so any org
with an app type outside that list (e.g. CUSTOM_CONNECTOR, SLACK,
JIRA, DATADOG) failed every opal_apps read with 'invalid value for
AppType' since v3.4.0.

Re-add the inline enum with the full 53-value list from
components.schemas.AppTypeEnum in openapi.yaml, and set
x-speakeasy-unknown-values: allow on the property so the generated
enum is open: app types added to the API later decode as raw strings
instead of failing the read.

The filter-side AppTypeEnum parameter is untouched. internal/sdk must
be regenerated via the sdk_generation workflow on this branch before
merge.
@claude claude Bot changed the title Fix opal_apps/opal_app decode failure on app types missing from overlay enum Sync app_type response enum with AppTypeEnum and make it open Aug 17, 2026
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