Skip to content

Conversation

@spietras
Copy link
Member

No description provided.

@spietras spietras requested a review from Copilot November 23, 2025 16:57
@spietras spietras self-assigned this Nov 23, 2025
@spietras spietras added the feature New feature or request label Nov 23, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds code generation for APIs using @hey-api/openapi-ts, specifically integrating the icanhazdadjoke API to demonstrate the new capability.

Key Changes:

  • Adds @hey-api/openapi-ts for automatic client code generation from OpenAPI specifications
  • Integrates icanhazdadjoke API with full type-safe client, schemas, and SDK
  • Updates state management to include API clients alongside configuration
  • Refactors es-toolkit imports to use specific subpath exports for better tree-shaking

Reviewed changes

Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/openapi-ts.config.mts Configuration for @hey-api/openapi-ts code generator with custom naming and plugin settings
src/openapi/icanhazdadjoke.yaml OpenAPI specification for the icanhazdadjoke API
src/src/common/apis/icanhazdadjoke/* Generated API client code including types, schemas, SDK class, and fetch client
src/src/instrumentation.ts Initializes API clients and adds them to global state
src/src/server/state/types.ts Extends state type to include APIs alongside config
src/src/server/state/vars/state/utils.ts Simplifies state initialization by passing entire state object
src/src/server/config/schemas.ts.jinja Adds API configuration schema with host, path, port, and scheme settings
src/src/server/config/lib/load-config/main.ts Transforms empty string environment variables to null
src/src/server/orpc/vars/procedures/vars/test/vars/validate/main.ts Demonstrates API usage by fetching dad jokes
src/src/common/orpc/vars/procedures/vars/test/vars/validate/schemas.ts Updates validation schema to include joke message field
src/src/client/test/components/test/test-widget/main.tsx Updates UI to display fetched joke message
src/package.json.jinja Adds @hey-api/openapi-ts dev dependency
src/Taskfile.dist.yaml.jinja Adds apis task for code generation
src/eslint.config.mjs Adds generated API code to ignored paths
src/docker-compose.yaml.jinja Adds environment variables for API configuration
src/.dockerignore.jinja Excludes OpenAPI specs and config from Docker builds
Various files Updates es-toolkit imports to use specific subpath exports

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@spietras spietras merged commit b5d4467 into main Nov 23, 2025
8 checks passed
@spietras spietras deleted the apis branch November 23, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants