Skip to content

OpenAPI codegen support#102

Merged
ejfine merged 13 commits intomainfrom
happydom2
Oct 16, 2025
Merged

OpenAPI codegen support#102
ejfine merged 13 commits intomainfrom
happydom2

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented Oct 16, 2025

Link to Issue or Message thread

#101

Why is this change necessary?

Better support OpenAPI codegen for typescript

How does this change address the issue?

Adds some ignores to pre-commit config. Adds some versions to context for use in downstream repos

What side effects does this change have?

None

How is this change tested?

Downstream repos

Other

Bumped some other context and pre-commit hooks

Summary by CodeRabbit

  • New Features

    • Conditional Claude Code extension support in dev environments
    • GitHub Copilot setting adjusted to reduce whitespace-only suggestion changes
  • Chores

    • Bumped various toolchain and test dependency versions
    • Expanded pre-commit exclusion patterns to skip generated/template outputs
    • Added new testing and bundling version entries for build/runtime tooling

@ejfine ejfine self-assigned this Oct 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

Updated development and CI configuration: added a VS Code Copilot setting, made the Claude Code extension conditional in templates, widened pre-commit exclusions to skip generated OpenAPI code, and bumped/added several dependency version pins used by template context.

Changes

Cohort / File(s) Summary
Devcontainer files
/.devcontainer/devcontainer.json, template/.devcontainer/devcontainer.json.jinja-base
Added VS Code setting "github.copilot.nextEditSuggestions.allowWhitespaceOnlyChanges": false; made anthropic.claude-code@2.0.10 a conditional extension controlled by install_claude_cli; updated devcontainer context hash comment.
Pre-commit configuration
/.pre-commit-config.yaml
Bumped several hook revisions (typos, check-jsonschema, ruff, pylint); added .*/openapi_codegen/.* and template/ paths to multiple exclude blocks so generated OpenAPI code is skipped by various hooks/formatters.
Context dependency pins
extensions/context.py
Bumped version pins: pulumi 3.202.0→3.203.0, pulumi_aws_native 1.36.0→1.37.0, pydantic 2.12.0→2.12.2, pytest_mock 3.15.0→3.15.1, happy_dom 20.0.0→20.0.2, vue_router ^4.5.1→^4.6.0, faker ^10.0.0→^10.1.0; added syrupy_version (5.0.0) and node_kiota_bundle_version (1.0.0-preview.99).
Template context keys
template/extensions/context.py.jinja-base
Inserted syrupy_version and node_kiota_bundle_version into the ContextUpdater hook for template rendering (no control-flow or API changes).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Template as Template Renderer
  participant Context as Context Values
  participant Devcontainer as devcontainer.json

  Note over Template,Context: Render devcontainer extensions list
  Template->>Context: read `install_claude_cli` flag
  alt install_claude_cli == true
    Template->>Devcontainer: include "anthropic.claude-code@2.0.10"
  else install_claude_cli == false
    Template->>Devcontainer: omit Claude Code extension
  end
  Template->>Devcontainer: always include `"github.copilot.nextEditSuggestions.allowWhitespaceOnlyChanges": false` in settings
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Bump Fast API and Uvicorn #96 — touches extensions/context.py and updates devcontainer context/hash; strongly related to devcontainer/context changes.
  • Claude code feature #99 — modifies devcontainer templates to add conditional Claude/claude-code extension entries; closely related to template changes here.
  • GraphQL Codegen for Python clients #89 — expands pre-commit exclusions for generated code and updates context version keys; related to the pre-commit and context edits.

Poem

🐰 I hopped through templates, tidy and spry,
Copilot hushes its whitespace shy.
Claude waits politely, included by choice,
Pre-commit skips generated coder's voice.
New pins snug in the context—a quiet rejoice. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “OpenAPI codegen support” succinctly captures the primary purpose of the changeset, which focuses on enhancing support for OpenAPI code generation by updating pre-commit ignores and template context versions. It is clear, specific, and concise, enabling a teammate to quickly understand the core intent without extraneous detail. The phrasing directly aligns with the main objectives outlined in the PR description and summary.
Description Check ✅ Passed The description adheres to the repository’s template by including all required sections—link to the issue, rationale, implementation details, side effects, testing approach, and other notes—and each section is populated with relevant information. The author clearly states why the change is necessary, how it addresses the issue, and confirms there are no side effects, while also noting testing in downstream repositories. This structured and complete format meets the repository’s documentation standards.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch happydom2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8331d1b and d1e2dcf.

📒 Files selected for processing (2)
  • .devcontainer/devcontainer.json (2 hunks)
  • .pre-commit-config.yaml (11 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: lint-matrix (ubuntu-24.04, 3.13.1, --data-file tests/copier_data/data2.yaml)

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dcda5a7 and 8331d1b.

📒 Files selected for processing (5)
  • .devcontainer/devcontainer.json (2 hunks)
  • .pre-commit-config.yaml (9 hunks)
  • extensions/context.py (4 hunks)
  • template/.devcontainer/devcontainer.json.jinja-base (2 hunks)
  • template/extensions/context.py.jinja-base (2 hunks)
🔇 Additional comments (7)
template/extensions/context.py.jinja-base (1)

42-42: LGTM! Context keys added for new dependencies.

The new context keys syrupy_version and node_kiota_bundle_version are correctly positioned and follow the existing pattern for version management in downstream templates.

Also applies to: 75-75

.pre-commit-config.yaml (1)

62-62: LGTM! Comprehensive exclusions for OpenAPI codegen.

The systematic addition of .*/openapi_codegen/.* exclusions across formatting, linting, and type-checking hooks ensures that generated OpenAPI code is appropriately excluded from pre-commit checks. This aligns well with the PR's objective to improve OpenAPI codegen support.

Also applies to: 74-74, 91-91, 105-105, 132-132, 254-256, 263-265, 267-271, 281-283, 295-299

template/.devcontainer/devcontainer.json.jinja-base (2)

34-35: LGTM! Conditional Claude Code extension support.

The conditional inclusion of the Claude Code extension based on install_claude_cli is properly implemented with Jinja2 templating. This allows downstream repositories to optionally include the extension.


62-62: LGTM! Improved Copilot UX setting.

The new setting "github.copilot.nextEditSuggestions.allowWhitespaceOnlyChanges": false prevents Copilot from suggesting whitespace-only changes, which improves the editing experience by reducing noise in edit suggestions.

.devcontainer/devcontainer.json (1)

46-46: LGTM! Configuration aligned with template.

The addition of the Copilot setting and the updated devcontainer context hash are consistent with the corresponding template changes.

Also applies to: 64-64

extensions/context.py (2)

28-28: LGTM! Dependency version updates.

The version bumps for Pulumi, Pydantic, pytest-mock, Vue Router, Faker, and HappyDOM are minor/patch updates that appear to be routine maintenance. These updates align with the PR's objective to bump context values.

Also applies to: 30-30, 36-36, 45-45, 58-58, 60-60, 79-79


47-47: Ensure template consumption of new version contexts
No occurrences of {{ syrupy_version }} or {{ node_kiota_bundle_version }} were found beyond their assignments in template/extensions/context.py.jinja-base. Update downstream templates to actual-pin these versions (e.g., in requirements.txt or package.json) or remove unused contexts. Confirm the preview release for node_kiota_bundle_version is intentional.

# Reformatting (should generally come before any file format or other checks, because reformatting can change things)
- repo: https://github.com/crate-ci/typos
rev: edb4e206047e89b93ebe08f1a2ccc3d581a70cc7 # frozen: v1
rev: 6573587991823ef75e4d6ca97fe895f45e9f14e4 # frozen: v1
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify updated pre-commit hook versions.

Several pre-commit hook revisions have been updated. Please verify that these rev hashes correspond to valid and stable versions of the respective tools.

Run the following script to verify the hook versions:

Also applies to: 192-192, 246-246, 274-274


🏁 Script executed:

#!/bin/bash
# Description: Verify the rev hashes correspond to valid tags/releases

# Check typos
echo "=== Checking typos ==="
gh api repos/crate-ci/typos/commits/6573587991823ef75e4d6ca97fe895f45e9f14e4 --jq '.sha,.commit.message' || echo "Failed to verify typos rev"

# Check check-jsonschema
echo "=== Checking check-jsonschema ==="
gh api repos/python-jsonschema/check-jsonschema/commits/83b816d020105076daac266dbf6bfed199a2da93 --jq '.sha,.commit.message' || echo "Failed to verify check-jsonschema rev"

# Check ruff-pre-commit
echo "=== Checking ruff-pre-commit ==="
gh api repos/astral-sh/ruff-pre-commit/commits/f9351c924055bf6c7b4a4670237d3ce141e9f57c --jq '.sha,.commit.message' || echo "Failed to verify ruff rev"

# Check pylint
echo "=== Checking pylint ==="
gh api repos/pylint-dev/pylint/commits/9a3035053154ba0c3ca3b300d6bc9fa72b95d552 --jq '.sha,.commit.message' || echo "Failed to verify pylint rev"

Length of output: 833


Fix invalid pre-commit hook revisions

  • Lines 45, 192, 246, 274: the rev hashes for crate-ci/typos@6573587991823ef… and python-jsonschema/check-jsonschema@83b816d0… do not exist—please update them to valid commit SHAs or release tags.
  • The revisions for astral-sh/ruff-pre-commit@f9351c9… (v0.14.0) and pylint-dev/pylint@9a30350… (4.0.1) are confirmed valid.

@ejfine ejfine merged commit 84815c3 into main Oct 16, 2025
7 checks passed
@ejfine ejfine deleted the happydom2 branch October 16, 2025 19:08
@coderabbitai coderabbitai bot mentioned this pull request Oct 30, 2025
This was referenced Nov 9, 2025
@coderabbitai coderabbitai bot mentioned this pull request Nov 24, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 17, 2025
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