You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given this schema definition snippet for validating a string to be either a correct IPv4 or IPv6 textual representation:
IPvX-Address:
description: |- Represents either an IPv4 or IPv6 address (without prefix or any associated lifetimes, et cetera)type: stringoneOf:
- type: stringformat: ipv4
- type: stringformat: ipv6
and using github.com/getkin/kin-openapi v0.76.0 I end up with for a value, such as Value: <string>"127.0.1.1" with this validation errorr: input matches more than one oneOf schemas.
Am I defining IPvX-Address wrong or is this an issue with kin-openapi v0.76.0?
The text was updated successfully, but these errors were encountered:
fenollp
added a commit
to fenollp/kin-openapi
that referenced
this issue
Oct 2, 2021
ipv4/ipv6 formats are not defined by openapiv3 thus the validity of values associated to them is not enforced by default, however you can use this to fix your issue:
Given this schema definition snippet for validating a string to be either a correct IPv4 or IPv6 textual representation:
and using github.com/getkin/kin-openapi v0.76.0 I end up with for a value, such as
Value: <string>"127.0.1.1"
with this validation errorr:input matches more than one oneOf schemas
.Am I defining IPvX-Address wrong or is this an issue with kin-openapi v0.76.0?
The text was updated successfully, but these errors were encountered: