(port: Optional[int], field_name: str = 'port')
| 179 | |
| 180 | |
| 181 | def validate_port(port: Optional[int], field_name: str = 'port') -> None: |
| 182 | if port is not None and not (1 <= port <= 65535): |
| 183 | raise SpecValidationError( |
| 184 | f'Invalid {field_name}: {port}. Must be between 1 and 65535.' |
| 185 | ) |
| 186 | |
| 187 | |
| 188 | def validate_unique_ports(ports: List[int]) -> None: |
no test coverage detected