Skip to content

[NI][SDK] Generate Platform SDK names from source metadata#104

Merged
chris-freeman-glean merged 8 commits into
mainfrom
cfreeman/open-api-platform-sdk-metadata-standalone
May 12, 2026
Merged

[NI][SDK] Generate Platform SDK names from source metadata#104
chris-freeman-glean merged 8 commits into
mainfrom
cfreeman/open-api-platform-sdk-metadata-standalone

Conversation

@chris-freeman-glean
Copy link
Copy Markdown
Contributor

@chris-freeman-glean chris-freeman-glean commented May 12, 2026

Internal Description for reviewers:
Platform SDK generation currently depends on open-api-owned endpoint mapping when the intended contract is owned by scio's Platform source specs. This PR prepares open-api to consume scio-owned x-glean-sdk metadata generically in the source-spec transform, but intentionally does not add Platform to the published glean-api-specs merge input yet. That lets us land the transform plumbing and validation path without exposing experimental, feature-gated Platform methods in the public Python, TypeScript, Go, and Java SDKs.

The Platform source spec, generated specs, merged Speakeasy output, and lockfile are intentionally left to the existing scio → redocly → open-api and transform workflows. A TODO remains in .speakeasy/workflow.yaml marking the exact generated_specs/platform.yaml input to add once Platform endpoints are ready to appear in generated clients.

Companion scio PR: https://github.com/askscio/scio/pull/238861
Supersedes stacked draft PR: #103
Supersedes manual-mapping PR: #102

Context/Jira (Mandatory if external):
N/A

Test plan:

  • npm test
  • Local generated-flow rehearsal: temporarily copied the bundled Platform spec produced from askscio/scio#238861 into source_specs/platform.yaml, ran OPEN_API_COMMIT_SHA=$(git rev-parse HEAD) pnpm run transform:source_specs, then speakeasy run -s glean-api-specs --skip-upload-spec; workflow-owned inputs/outputs were removed/restored afterward so generated files stay out of this PR.
  • Synthetic proof on standalone branch: adding a new operation with unique x-glean-sdk metadata mapped to the expected Speakeasy SDK method without code changes; removing that metadata failed the transform with an actionable error.
  • Local all-client rehearsal: temporarily pointed Python, TypeScript, Go, and Java SDK generation at a locally merged Platform-inclusive spec to verify the transform can generate all four language surfaces once publishing is enabled. The workflow now intentionally leaves Platform out of the published merged spec until the endpoints are ready for SDK exposure.
  • pnpm exec vitest run tests/source-spec-transformer.test.js
  • Need review from all reviewers (default: 1)

Release Notes (go/relnotesfaq)

Change Categories (mandatory - check all that apply)

  • Internal (This PR will not be included in the external release notes)
    • Flag-gated development/Internal fix
  • External (Choose one if applicable. A detailed external description is mandatory)
    • Bug Fixes/Enhancements
    • Security or Permissions related change
    • Feature launch
    • UI change
    • 3rd party LLM integration change
    • External API breaking change
    • Scrubbed logs change
  • Platform (Choose one if applicable. Choose at least one other category from Internal or External)
    • AWS only change
    • Azure only change
    • GCP only change
  • Document Updates Needed

(DO NOT include confidential details. Should be at least 40 characters long.)
External description for customers:
No customer-visible behavior change; this lands internal Platform SDK transform plumbing without publishing the unreleased Platform API methods into generated clients.

Add the Platform source spec and derive Speakeasy SDK naming from scio-owned x-glean-sdk metadata so the new SDK surface does not depend on a manual open-api operation map.
Keep existing generated commit metadata out of the Platform SDK metadata change so workflow-owned SHA fields remain workflow-owned.
Keep the Platform SDK metadata PR focused on source inputs and transform logic while allowing the normal transform workflow to regenerate derived specs and Speakeasy lock data.
Accept generated Platform API paths in post-transform smoke checks without committing the generated Platform artifacts in this PR.
Remove the locally bundled Platform source spec so the PR only prepares open-api to consume the normal redocly-published input.
Add targeted comments around Platform-specific merge and SDK naming behavior so future changes preserve the source-owned SDK contract.
@chris-freeman-glean chris-freeman-glean marked this pull request as ready for review May 12, 2026 16:05
@chris-freeman-glean chris-freeman-glean requested a review from a team as a code owner May 12, 2026 16:05
Keep Platform transform support in place while leaving Platform out of the published merged SDK input until those endpoints are ready for client exposure.
@chris-freeman-glean chris-freeman-glean merged commit 0e8569a into main May 12, 2026
3 checks passed
@chris-freeman-glean chris-freeman-glean deleted the cfreeman/open-api-platform-sdk-metadata-standalone branch May 12, 2026 22:22
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