-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format 'ipv4' is more restrictive than the pattern in Data Type 'Ipv4Address' #146
Comments
@eric-murray @akoshunyadi @jlurien @patrice-conil any opinions on the proposed solution (expected behavior)? |
From OAS v3.0.3: Primitives have an optional modifier property: format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, the format property is an open string-valued property, and can have any value. Formats such as "email", "uuid", and so on, MAY be used even though undefined by this specification.
OAS v3.1.0 does link |
two questions: |
Done by #153 |
Problem description
The Data Type 'Ipv4Address' is defined as
The format 'ipv4' is defined by the OpenAPI specification as "An IPv4 address according to the "dotted-quad" ABNF syntax as
defined in RFC 2673, section 3.2 [RFC2673].". The "dotted-quad" does not allow the addition of a netmask, e.g. "/24"
The regular expression of the pattern allows also the addition of a netmask. The provided example "192.168.0.1/24" is not comply with the format 'ipv4'
A similar issue exist for data type Ipv6Address.
Expected behavior
The suggested correction is to replace 'ipv4' with 'string' and rely on the regular expression in pattern.
The text was updated successfully, but these errors were encountered: