-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Description
Symfony version(s) affected
7.3.1
Description
I understand that it is a weird format, Chrome is able to open the following format:
https://example.com:/something/here
However, the validator throws an error saying that it is not valid.
Is it possible to change this behavior? I don't mind contributing with a PR if you think this change makes sense
How to reproduce
<?php
declare(strict_types=1);
use OpenApi\Attributes as OpenApi;
use Symfony\Component\Validator\Constraints as Assert;
#[OpenApi\Schema]
readonly class Dto
{
public function __construct(
#[Assert\Url]
public ?string $url,
) {
}
}
Possible Solution
Make the port part optional? Maybe switch from (:[0-9]+)?
to (:[0-9]*)?
?
Additional Context
No response