Skip to content

feat: Add --verbose and --exclude-schema CLI flags - #152

Open
nikcio wants to merge 1 commit into
mainfrom
feature/verbose-diagnostics
Open

feat: Add --verbose and --exclude-schema CLI flags#152
nikcio wants to merge 1 commit into
mainfrom
feature/verbose-diagnostics

Conversation

@nikcio

@nikcio nikcio commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Changes

Add two CLI improvements:

--verbose

Print OpenAPI diagnostic warnings and errors to stderr during generation. Previously, HandleDiagnostics silently suppressed all errors when any schemas existed, hiding real spec problems.

--exclude-schema

Exclude the named schema from generation (repeatable). Inverse of --include-schema. Works alongside --include-schema (exclude is applied first, then include filters from the remaining set).

Implementation

  • Add GeneratorOptions.Verbose and GeneratorOptions.ExcludeSchemas
  • Update HandleDiagnostics to print diagnostics when verbose
  • Update SelectSchemas to apply ExcludeSchemas before IncludeSchemas
  • Add validation for blank entries in ExcludeSchemas
  • 5 new tests

Testing

All 276 tests pass (270 existing + 6 new).

Add two CLI improvements:

--verbose: Print OpenAPI diagnostic warnings and errors to stderr
during generation. Previously, HandleDiagnostics silently suppressed
all errors when any schemas existed, hiding real spec problems.

--exclude-schema <name>: Exclude the named schema from generation
(repeatable). Inverse of --include-schema. Works alongside
--include-schema (exclude is applied first, then include filters
from the remaining set).

- Add GeneratorOptions.Verbose and GeneratorOptions.ExcludeSchemas
- Update HandleDiagnostics to print diagnostics when verbose
- Update SelectSchemas to apply ExcludeSchemas before IncludeSchemas
- Add validation for blank entries in ExcludeSchemas
- Add tests for both features
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