Skip to content

Add default validation for unique server names#487

Merged
mattpolzin merged 5 commits intomattpolzin:mainfrom
ayushshrivastv:ValidationBuiltins.swift
Mar 26, 2026
Merged

Add default validation for unique server names#487
mattpolzin merged 5 commits intomattpolzin:mainfrom
ayushshrivastv:ValidationBuiltins.swift

Conversation

@ayushshrivastv
Copy link
Contributor

Fixes #467

Summary

  • add a default-on builtin validation that OAS 3.2 server names are unique across the document
  • include root, path item, operation, and webhook server scopes in the uniqueness check
  • update builtin validator tests for the default validation list and duplicate/unique server name cases

Testing

  • git diff --check
  • attempted swift test --filter BuiltinValidationTests, but SwiftPM dependency fetches timed out in this environment

Copy link
Owner

@mattpolzin mattpolzin left a comment

Choose a reason for hiding this comment

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

The validation and tests look good, but we can introduce less new code by using an existing helper on the Document value.

@ayushshrivastv ayushshrivastv force-pushed the ValidationBuiltins.swift branch from 75c91a8 to 5f3df17 Compare March 24, 2026 12:48
Copy link
Owner

@mattpolzin mattpolzin left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks!

@mattpolzin mattpolzin merged commit ae9f70b into mattpolzin:main Mar 26, 2026
36 of 42 checks 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.

Add builtin validation that OAS 3.2.0 Server Object name field is unique across document

2 participants