Sync app_type response enum with AppTypeEnum and make it open - #202
Draft
claude[bot] wants to merge 2 commits into
Draft
Sync app_type response enum with AppTypeEnum and make it open#202claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) getsError: failure to invoke API — invalid value for AppType: Xon everyopal_appsread — the wholeGET /appsresponse fails to decode, so it's all-or-nothing and filtering doesn't help — and onopal_appfor 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_typeresponse enum carries all 53 current app types, andx-speakeasy-unknown-values: allowmakes it an open enum — so app types added to the API later decode as raw strings instead of failing the read.opal_apps/opal_appwork regardless of which app types exist in the org, while the field keeps typed enum documentation.How: The overlay's inline
enum:onApp.app_typeis synced to the authoritativecomponents.schemas.AppTypeEnumlist inopenapi.yaml(53 values, same order), and a second overlay action setsx-speakeasy-unknown-values: allowon the property so Speakeasy generates an open enum. The otherapp_typeactions (x-speakeasy-name-override: type, description, example,type: string,$refremoval) and the filter-sideAppTypeEnumquery parameter are untouched.Notes:
internal/sdkis 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.terraform_overlay.yamlparses cleanly (yaml.safe_load); the overlay enum was verified to matchcomponents.schemas.AppTypeEnuminopenapi.yamlexactly (53 values, same order,CUSTOM_CONNECTORincluded). The Speakeasy CLI was not available in this environment foroverlay validate.Checklist
Generated by Claude Code