Skip to content

fix(sdk): include display_name field in Project type generation#1508

Closed
jsell-rh wants to merge 2 commits intomainfrom
jsell/fix/sdk-display-name
Closed

fix(sdk): include display_name field in Project type generation#1508
jsell-rh wants to merge 2 commits intomainfrom
jsell/fix/sdk-display-name

Conversation

@jsell-rh
Copy link
Copy Markdown
Contributor

@jsell-rh jsell-rh commented May 5, 2026

Summary

  • Regenerated TypeScript and Python SDK Project type files to include the display_name field that was defined in the OpenAPI spec but missing from generated output
  • The Go SDK already had display_name from a prior regeneration; its file is updated with the current spec hash/timestamp only
  • No parser changes needed -- the extractFields() function in generator/parser.go correctly handles allOf composition; the TS/Python outputs were simply stale

Root Cause

The TS and Python SDK outputs were last generated on 2026-03-21 (spec SHA 9a8e623...), while the Go SDK was regenerated on 2026-04-18 (spec SHA 97773951...). The display_name field has been in openapi.projects.yaml since its initial commit, but the TS/Python type files were never regenerated to pick it up.

Changes

File Change
ts-sdk/src/project.ts Added display_name to Project, ProjectCreateRequest, ProjectPatchRequest, ProjectBuilder, ProjectPatchBuilder
python-sdk/ambient_platform/project.py Added display_name to Project dataclass, from_dict(), ProjectBuilder, ProjectPatch
go-sdk/types/project.go Header-only update (timestamp + spec hash)

Test plan

  • Go SDK types compile (go build ./types/...)
  • Python SDK imports correctly (from ambient_platform.project import Project)
  • Python Project.from_dict({'display_name': 'test'}) returns correct value
  • gofmt passes on modified Go files
  • Verified display_name appears in all three SDK Project type files

🤖 Generated with Claude Code

The TypeScript and Python SDK Project types were stale and missing the
display_name field that was already defined in the OpenAPI spec. Regenerated
the Project type files for all three SDKs (Go already had the field from a
prior regeneration).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for cheerful-kitten-f556a0 canceled.

Name Link
🔨 Latest commit 3c3b0f3
🔍 Latest deploy log https://app.netlify.com/projects/cheerful-kitten-f556a0/deploys/69fa0e9d165acb0008d54ff4

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4f270293-da10-48a5-b301-78cdd3f8195b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jsell/fix/sdk-display-name
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch jsell/fix/sdk-display-name

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jsell-rh jsell-rh requested a review from markturansky May 5, 2026 15:36
@jsell-rh
Copy link
Copy Markdown
Contributor Author

jsell-rh commented May 5, 2026

Superseded by #1513 (consolidated SDK PR with full regeneration)

@jsell-rh jsell-rh closed this May 5, 2026
markturansky pushed a commit that referenced this pull request May 7, 2026
…fields (#1513)

## Summary
Consolidates #1508 and #1509 into a single PR with full SDK
regeneration.

- **TS SDK templates**: Make `token` and `project` optional in
`AmbientClientConfig` (browser support)
- **TS SDK templates**: Accept relative `baseUrl` (e.g. `/api/proxy`),
reject protocol-relative URLs (`//`)
- **TS SDK templates**: Sub-resource APIs throw clear error when
`project` is needed but absent
- **Go SDK**: Alphabetize `ScheduledSessionPatch` fields, add `AgentID`
validation in builder
- **All SDKs**: Full regeneration needed to pick up `display_name` on
Project and latest spec changes

Supersedes #1508 and #1509.


## Test plan
- [x] TS SDK tests updated (browser mode, relative URL,
protocol-relative rejection)
- [ ] `make build-generator && make generate-sdk` completes
- [ ] `make verify-sdk` passes (no drift)
- [ ] Go SDK compiles with CLI
- [ ] TS SDK tests pass (45 tests)

## Post-merge
After regeneration, watch for Go extension file conflicts
(`agent_extensions.go`, `session_messages.go`) that depend on client
methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: jsell-rh <bot@ambient-code.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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