Skip to content

feat(validation): add option to allow unused tags - #124

Merged
SVilgelm merged 1 commit into
mainfrom
feat/allow-unused-tags-validation
Sep 6, 2025
Merged

SVilgelm merged 1 commit into
mainfrom
feat/allow-unused-tags-validation

Conversation

@SVilgelm

@SVilgelm SVilgelm commented Sep 6, 2025

Copy link
Copy Markdown
Member

Introduce allowTags to validation options and wire it into
OpenAPI validation to suppress errors for declared but unused tags.
Fix a small typo in the NewValidator doc comment ("compiler").
This enables callers to opt out of unused-tag checks while keeping
existing unused-components behavior unchanged.

Copilot AI review requested due to automatic review settings September 6, 2025 04:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new validation option allowUnusedTags to provide control over unused tag validation, similar to the existing allowUnusedComponents option. The change also fixes a typo in a documentation comment.

  • Add allowUnusedTags field to validation options struct
  • Implement AllowUnusedTags() validation option function
  • Wire the option into OpenAPI validation to conditionally skip unused tag checks

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
validation_options.go Adds allowUnusedTags field and AllowUnusedTags() option function
validation.go Fixes typo in NewValidator documentation comment
openapi.go Conditionally wraps unused tag validation with allowUnusedTags check

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread validation.go Resolved
Introduce allowTags to validation options and wire it into
OpenAPI validation to suppress errors for declared but unused tags.
Fix a small typo in the NewValidator doc comment ("compiler").
This enables callers to opt out of unused-tag checks while keeping
existing unused-components behavior unchanged.
@SVilgelm
SVilgelm force-pushed the feat/allow-unused-tags-validation branch from 975838f to 635aba2 Compare September 6, 2025 04:49
@SVilgelm
SVilgelm merged commit 036eab2 into main Sep 6, 2025
@SVilgelm
SVilgelm deleted the feat/allow-unused-tags-validation branch September 6, 2025 04:50
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.

2 participants

⌂ 换网址