Skip to main content

OpenAPI Formats

CATS has custom generators for the most common OpenAPI formats like date-time, email, binary and extends it with a lot more others so that it can generate data as meaningful as possible. Below you can find the mapping between the values you can use in the format field and what CATS will generate. This will also be very helpful for the consumers of your API, not only for CATS. Additionally, CATS might infer the data format from the property name. This is explicitly mentioned in the mapping table.

OpenAPI formatProperty NameWhat CATS generates
bcp47N/Aen-US
byte or binaryN/Abase64 encoded string
cardNumberor name ends withcardNumber4111111111111111
iso3166alpha2N/AUS
iso3166alpha3N/AUSA
iso-3166 or countryCodeor name ends with countryCodeUSA
iso-4217 orcurrencyCodeor name ends with currencyCodeUSD
dateN/A2022-10-25
date-timeN/A2011-12-03T10:15:30Z
durationN/AP1DT30H4S
emailor name ends with emailor emailAddresscool@cats.io
ean8 or gtin8N/A40170725
gtin13 or ean13or europeanArticleNumber, globalTradeItemNumber or globalTradeNumber5710798389878
hostnameN/Awww.endava.com
idn-emailN/Acööl.cats@cats.io
idn-hostnameN/Awww.ëndava.com
ip or ipv4or name ends with ip or ipAddress10.10.10.20
ipv6 or name ends with ipv621DA:D3:0:2F3B:2AA:FF:FE28:9C5A
iriN/Ahttp://ëxample.com/cats
iri-referenceN/A/füzzing/
isbn or isbn10or name equals isbn or isbn100439023481
isbn13or name equals isbn139780439023481
json-pointerN/A/item/0/id
passwordN/AcatsISc00l?!useIt#
periodN/AP1DT30H4S
regexN/A[a-z0-9]+
relative-json-pointerN/A1/id
timeN/A10:15:30Z
uri or urlor name equals or ends with url or urihttp://example.com/cats
uri-referenceN/A/fuzzing/
uri-templateN/A/fuzzing/{path}
uuidN/Ac58919de-3210-4549-87fa-c196324d0594
info

Whenever you see a camelCase naming, CATS also checks for snake_case and kebab-case. For example, for countryCode CATS will also match properties ending in country-code and country_code.