Skip to content

Feat/vwjt code router july 2025#597

Merged
VISHWAJ33T merged 8 commits intomainfrom
feat/vwjt_code_router_july_2025
Jul 10, 2025
Merged

Feat/vwjt code router july 2025#597
VISHWAJ33T merged 8 commits intomainfrom
feat/vwjt_code_router_july_2025

Conversation

@VISHWAJ33T
Copy link
Copy Markdown
Collaborator

No description provided.

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: API Docs Endpoint Fails Due to Missing JSON File

The handler attempts to serve the API documentation at the /docs.json endpoint by reading openapi.json from path.resolve(__dirname, 'openapi.json'). However, __dirname points to the compiled dist directory, and the openapi.json file is not present there. The provided diff also indicates that OpenAPI specifications are structured as individual files in an openapi/ subdirectory, suggesting openapi.json may not exist as a single file or requires a build step to be generated. This leads to a runtime "file not found" error.

packages/slack/sls/src/index.ts#L21-L24

try {
const openapiPath = path.resolve(__dirname, 'openapi.json');
const openapiSpec = fs.readFileSync(openapiPath, 'utf-8');
return createApiResponse(200, JSON.parse(openapiSpec));

Fix in CursorFix in Web


Bug: SDKConfig Missing Required Property

The SDKConfig interface no longer explicitly declares SLACK_BOT_TOKEN as a required property, despite the sdkInit function still expecting it and throwing an error if missing. This creates a type safety issue where TypeScript won't enforce its presence, leading to potential runtime failures.

packages/slack/sls/src/sdkInit.ts#L2-L12

interface SDKConfig {
constructorName: string;
[key: string]: any;
}
export const sdkInit = (config: SDKConfig): Record<string, Function> => {
const { constructorName, SLACK_BOT_TOKEN, ...options } = config;
if (!SLACK_BOT_TOKEN) {
throw new Error('SLACK_BOT_TOKEN is required');

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

@VISHWAJ33T VISHWAJ33T merged commit b18d237 into main Jul 10, 2025
5 checks passed
@github-actions github-actions bot mentioned this pull request Jul 10, 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