Add comprehensive tests for includeModels and excludeModels configuration options #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
includeModelsandexcludeModelsconfiguration options were already implemented in the codebase but lacked comprehensive test coverage to verify their functionality. This PR adds a complete test suite to ensure these model filtering features work correctly.What was added
Comprehensive Test Suite (
tests/model-filtering.test.ts)includeModelsConfiguration Tests:includeModels: "User,Post")includeModels: "User")includeModels: " User , Post ")excludeModelsConfiguration Tests:excludeModels: "Profile")excludeModels: "Profile,Post")Combined Configuration Tests:
includeModelsfirst, thenexcludeModelsExample Usage
The
includeModelsoption can be used inschema.prismato generate OpenAPI specs for only specific models:Test Results
All 27 tests pass (14 existing + 13 new model filtering tests), confirming that:
includeModelsandexcludeModelswork as expectedFixes #24.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
binaries.prisma.shnode /home/REDACTED/work/prisma-openapi/prisma-openapi/node_modules/.bin/../prisma/build/index.js generate(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.