Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jun 6, 2025

This PR implements the functionality to output the generated OpenAPI schema to dist/schema.json and commit it to git.

Changes Made

  • Modified src/main.ts: Added file system operations to write the generated schema to dist/schema.json instead of just logging to console
  • Updated .gitignore: Changed from ignoring entire dist/ directory to dist/* with exception !dist/schema.json to allow the schema file to be tracked by git
  • Added test coverage: Created src/__tests__/main.test.ts to verify the file writing functionality

Behavior

When running npm run generate, the tool now:

  1. Generates the OpenAPI schema as before
  2. Creates the dist/ directory if it doesn't exist
  3. Writes the schema to dist/schema.json (7825 lines, ~237KB)
  4. Confirms the file was written with a console message

The generated schema.json file is now tracked by git and will be committed with future schema updates.

Fixes #24.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Write schema to file Write schema to file Jun 6, 2025
Copilot AI requested a review from abraham June 6, 2025 23:40
@abraham
Copy link
Owner

abraham commented Jun 6, 2025

Run prettier format

Copy link
Contributor Author

Copilot AI commented Jun 6, 2025

Run prettier format

Fixed in commit 5d34f9b. Ran prettier format to resolve code style issues in the modified files.

@abraham abraham marked this pull request as ready for review June 6, 2025 23:45
@abraham abraham enabled auto-merge June 6, 2025 23:45
@abraham abraham merged commit 64d9629 into main Jun 6, 2025
1 check passed
@abraham abraham deleted the copilot/fix-24 branch June 6, 2025 23:46
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.

Write schema to file

2 participants