Skip to content

Fix schema filtering for parameter references - #470

Merged
Carapacik merged 1 commit into
Carapacik:mainfrom
ShulertInc:main
Aug 25, 2026
Merged

Fix schema filtering for parameter references#470
Carapacik merged 1 commit into
Carapacik:mainfrom
ShulertInc:main

Conversation

@ZevyaDev

@ZevyaDev ZevyaDev commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

When include_tags or exclude_tags is configured, schemas referenced only by query, path, or header parameters are incorrectly treated as unused and omitted from generated output.

This causes generated clients to reference missing model files, for example:

Target of URI doesn't exist: '../models/unit.dart'
Undefined class 'Unit'

Changes:

  • Track $ref schemas used by OpenAPI 3 parameters before type generation.
  • Track $ref schemas used by OpenAPI 2 parameters as well.
  • Preserve parameter-referenced enums and models during tag-based schema filtering.
  • Add a regression test covering an enum referenced only by a filtered endpoint’s query parameter.

Copilot AI lite review requested due to automatic review settings August 9, 2026 03:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ZevyaDev

ZevyaDev commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Uh, I didn't ask you to review, stupid bot.

@Carapacik
Carapacik self-requested a review August 17, 2026 12:26
@Carapacik
Carapacik merged commit 76b1ad1 into Carapacik:main Aug 25, 2026
1 check passed
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.

3 participants