json-schema-spec icon indicating copy to clipboard operation
json-schema-spec copied to clipboard

Add Defined Format: MAC Address

Open JLLeitschuh opened this issue 7 years ago • 13 comments

Proposal: Add a defined format for Mac Address. The schema already has support for IPv4 and IPv6 data types. It would be useful to have support for the colon delimited MAC address format in the base schema.

Something similar to the following:

"mac_address": {
  "type": "string",
  "description": "Represents a MAC Address in the standard colon delimited format. Eg. `01:23:45:67:89:0A`",
  "pattern": "^([A-F0-9]{2}:){5}[A-F0-9]{2}$"
}

JLLeitschuh avatar Jan 24 '18 16:01 JLLeitschuh