Skip to content

fix(transform schema): support enums#1275

Merged
RobertCraigie merged 1 commit intonextfrom
robert/fix-transform-schema-enums
Mar 20, 2026
Merged

fix(transform schema): support enums#1275
RobertCraigie merged 1 commit intonextfrom
robert/fix-transform-schema-enums

Conversation

@RobertCraigie
Copy link
Copy Markdown
Collaborator

@RobertCraigie RobertCraigie commented Mar 20, 2026

closes #1208

@RobertCraigie RobertCraigie requested a review from a team as a code owner March 20, 2026 12:40

enum = json_schema.pop("enum", None)
if is_list(enum):
strict_schema['enum'] = enum
Copy link
Copy Markdown
Collaborator

@karpetrosyan karpetrosyan Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Can there be enum values that require transformation, or are they always just primitive values?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think enums can only contain literals in JSONSchema so no further translation necessary. The server actually doesn't support enum compilation beyond regular types (numbers, strings, books) so object literals will still fail but there's no way to transform that anyways.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah in our codegen we only support primitive enums as well

@RobertCraigie RobertCraigie merged commit 8289533 into next Mar 20, 2026
14 checks passed
@stainless-app stainless-app Bot mentioned this pull request Mar 20, 2026
stainless-app Bot pushed a commit that referenced this pull request Mar 26, 2026
alexlitinsky pushed a commit to alexlitinsky/claude-builders-bounty that referenced this pull request Mar 28, 2026
…on (closes claude-builders-bounty#4)

- agents/pr-reviewer/claude_review.py: CLI tool (--pr URL, --post-comment, --dry-run)
- Uses Anthropic SDK (ANTHROPIC_API_KEY) or falls back to claude CLI subprocess
- Fetches diff + metadata via gh CLI; skips generated/binary files; truncates large diffs
- Structured Markdown output: Summary / Risks / Suggestions / Verdict sections
- Confidence scoring (High/Medium/Low) based on diff size, test coverage, security files
- Exit codes 0/1/2 for LOW/MEDIUM/HIGH risk — usable as CI gates
- Per-repo config via .claude-review.yml
- .github/workflows/pr-review.yml: GitHub Action that triggers on PR open/sync
- examples/: actual outputs from cli/cli#100 and anthropics/anthropic-sdk-python#1275

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
stainless-app Bot pushed a commit that referenced this pull request Mar 31, 2026
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.

3 participants