Skip to content

[OpenAPI] Add Platform API to SDK spec generation#112

Merged
chris-freeman-glean merged 7 commits into
mainfrom
cfreeman/restore-platform-api-sdk-generation-open-api-main
Jun 17, 2026
Merged

[OpenAPI] Add Platform API to SDK spec generation#112
chris-freeman-glean merged 7 commits into
mainfrom
cfreeman/restore-platform-api-sdk-generation-open-api-main

Conversation

@chris-freeman-glean

@chris-freeman-glean chris-freeman-glean commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Prepare open-api to transform the Platform API once it is published by openapi-redocly automation from the clean shared-schema Platform bundle.

This PR:

  • Adds generic Platform transform handling for path prefixing, schema/response prefixing, auth normalization, Platform tag-group stripping, and x-glean-sdk to Speakeasy metadata conversion.
  • Removes the temporary Redocly collision-suffix workaround. The source contract now relies on scio/openapi/shared/platform_entities.yaml producing canonical names such as PersonReference, Person, and DocumentSpec.
  • Adds transform unit coverage for Platform SDK metadata conversion, schema/response prefixing, clean shared schema names, auth normalization, and text/event-stream preservation.

Generated spec artifacts are intentionally excluded from this manual PR. This PR also intentionally does not add generated_specs/platform.yaml to .speakeasy/workflow.yaml; that activation belongs in a follow-up PR after automation has created the generated Platform spec.

Context

Old Platform SDK generation PRs are stale/closed: askscio/scio#237884, askscio/openapi-redocly#15, and gleanwork/open-api#102.

The active metadata-driven path comes from askscio/scio#238861 and gleanwork/open-api#104: Platform SDK names live in scio as x-glean-sdk and open-api derives Speakeasy metadata from that source contract.

The shared Platform entity schema work in scio is the prerequisite that avoids downstream Redocly suffix interpretation. open-api should transform the clean published component names, not maintain endpoint-specific mappings for names like Person-2 or DocumentSpec-2.

Expected Order

  1. Land this transformer support PR.
  2. Land https://github.com/askscio/openapi-redocly/pull/17.
  3. Let openapi-redocly publish source_specs/platform.yaml into this repo.
  4. Let .github/workflows/transform.yml generate and commit generated_specs/platform.yaml from the published source spec.
  5. Open a follow-up activation PR that adds generated_specs/platform.yaml to .speakeasy/workflow.yaml and adds Platform merged-spec smoke coverage.
  6. Let transform automation update .speakeasy/workflow.lock and overlayed_specs/glean-merged-spec.yaml; proceed to SDK generation only after the Platform-inclusive glean-api-specs source is available.

Validation

  • Ran pnpm exec vitest run tests/source-spec-transformer.test.js tests/post_transform_smoke.test.js: 2 files, 50 tests passed.
  • Ran OPEN_API_COMMIT_SHA=$(git rev-parse HEAD) pnpm run transform:source_specs with the current non-Platform source specs.
  • Ran speakeasy run -s glean-api-specs --skip-upload-spec; merge and validation completed with warnings only.
  • Verified the final PR diff is source/test-only: src/source-spec-transformer.js and tests/source-spec-transformer.test.js.

Out of Scope

  • No generated SDK repo changes in this pass.
  • No developer-site API docs changes in this pass.
  • No manually committed generated OpenAPI artifacts in this PR.
  • No Speakeasy activation of Platform in this PR; that happens after generated_specs/platform.yaml exists on main.

Include Platform in the merged Speakeasy source and preserve stable SDK metadata, traceability, and streaming coverage before downstream SDK generation.
Keep the Platform SDK restore PR focused on source configuration and tests while leaving generated spec artifacts to the transform automation.
@chris-freeman-glean chris-freeman-glean marked this pull request as ready for review June 17, 2026 22:46
@chris-freeman-glean chris-freeman-glean requested a review from a team as a code owner June 17, 2026 22:46
@chris-freeman-glean chris-freeman-glean merged commit 763069b into main Jun 17, 2026
3 checks passed
@chris-freeman-glean chris-freeman-glean deleted the cfreeman/restore-platform-api-sdk-generation-open-api-main branch June 17, 2026 23:11
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.

2 participants