Skip to content

refactor(api): generate public contracts from official OpenAPI - #490

Merged
SaladDay merged 5 commits into
mainfrom
codex/official-api-schema
Oct 7, 2026
Merged

SaladDay merged 5 commits into
mainfrom
codex/official-api-schema

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Public types and OpenAPI were maintained from handwritten Go DTOs, allowing them to drift from the pinned OpenAI Agents API. Generate the standard fields and public OpenAPI 3.1 contract from the official source; keep Core's independently authored x_agents_core extensions. Internal API documents continue to come from route annotations.

  • Pin openai/openai-openapi at 046a2a0f325bf11f97966f2729219f27281ba71e, published immediately before the existing Python SDK 3.13.0 baseline (d7c41ef). Vendor the unchanged source, checksum and license. The selected API surface retains the same 58 operations.
  • Generate Go projections, route inventory and public schemas through one reproducible entry point. Remove replaced standard DTO declarations, public handler annotations, the old SDK-field extractor and its duplicated fixture. Preserve stored representations, explicit unsupported-feature rejection and existing extensions.
  • Generate web-search union serialization from the upstream discriminator and per-variant required fields, including required null values. Move official-client response validation to OpenAPI 3.1, with the existing authentication and Files nullability differences explicitly recorded in the coverage ledger. Update English and Chinese guidance.

Validation: generator freshness and 9 regression tests; 5 response-schema tests, including compiled Go union output checked against the untouched official schema; Core API, public contract and item-projection Go tests; storage rejection tests against a dedicated PostgreSQL instance; documentation and translation checks; fresh independent review. The Linux official-client workflow passed for both the standalone service and Core image at 9098e14. The final stored-search encoding correction passed focused regression tests, Core API tests and a new independent review at fdeaa01; the refreshed CI run is still running. Claude execution is left to GitHub CI because it is unavailable on the development machine.

@blacksmith-sh

This comment has been minimized.

@SaladDay
SaladDay marked this pull request as ready for review October 7, 2026 13:50
@SaladDay
SaladDay merged commit 1fcc066 into main Oct 7, 2026
24 checks passed
@SaladDay
SaladDay deleted the codex/official-api-schema branch October 7, 2026 13:50
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