Data Formats

When generating API models, the Akita Agent will identify common data formats, like dates, times, and URLs. When Akita learns that a parameter's value matches a known data format, it adds an x-akita-format annotation to the parameter.

The x-akita-format annotation has two parts, the kind of data format (like datetime) as well as any specific formats (such as the RFC3339 format for dates and times, or the Unix timestamp format of seconds after the epoch). The kinds and formats that SuperLearn supports are listed below.

Please let us know if there are additional data formats you would like to see. We have also gotten requests for introducing custom data formats. They are on our roadmap! (But please still let us know if you are interested.)

Kinds

Kind Description
countryCountries of the world, including native and English spellings and country codes.
currency_nameNames of currencies, including native and English spellings and abbreviations.
datetimeDates, times, and timestamps.
emailEmail addresses.
languageWritten and spoken languages, including native and English spellings.
phone_numberTelephone numbers.
uriURLs and other uniform resource identifiers.

country

FormatDescriptionExamples
country_code_2ISO 3166 Alpha-2 two-letter country code.- "AD" (Andorra)
- "US" (United States of America)
country_code_3ISO 3166 Alpha-3 three-letter country code.- "AND" (Andorra)
- "USA" (United States of America)
country_nameCountry name as expressed in that country.- "افغانستان" (Afghanistan)
- "España" (Spain)
- "United States of America"
country_name_englishCountry name in English."Spain"
top_level_domainTop level domain name.- ".ad" (Andorra)
- ".us" (United States of America)

currency_name

FormatDescriptionExamples
currency_name_englishCurrency name in English.- "Euro"
- "United States dollar"
currency_abbreviationCurrency name, abbreviated.- "EUR" (Euro)
- "USD" (United States dollar)

datetime

FormatDescriptionExamples
ansi_c_datetimeDate and time as returned by ANSI C date and time functions, like ctime."Mon Jan _2 15:04:05 2006"
go_timestampThe Go language's handy time stamp."Jan 2 15:04:05"
go_timestamp_microThe Go language's handy time stamp, with microsecond precision."Jan 2 15:04:05.000000"
go_timestamp_milliThe Go language's handy time stamp, with millisecond precision."Jan 2 15:04:05.000"
iso_8601_year_monthYYYY-MM date, as described by the ISO 8601 standard."2006-01"
iso_8601_year_month_dayYYYY-MM-DD date, as described by the ISO 8601 standard."2006-01-02"
kitchen_clockTime as commonly seen on a stove or microwave."3:04PM"
rfc_2822Date and time as specified by RFC 2822.- "02 Jan 2006 15:04 MST"
- "Mon, 02 Jan 2006 15:04:05 MST"
rfc_2822zDate and time as specified by RFC 2822, with numeric timezone.- "02 Jan 2006 15:04 -0700"
- "Mon, 02 Jan 2006 15:04:05 -0700"
rfc_822Date and time as specified by RFC 822. This is a subset of the date/time formats accepted by RFC 2822."02 Jan 06 15:04 MST"
rfc_822zDate and time as specified by RFC 822, with numeric timezone. This is a subset of the date/time formats accepted by RFC 2822."02 Jan 06 15:04 -0700"
rfc_850Date and time as specified by RFC 850."Monday, 02-Jan-06 15:04:05 MST"
rfc_3339Date and time as specified by RFC 3339."2006-01-02T15:04:05Z07:00"
ruby_datetimeDate and time as rendered by Ruby's DateTime library."Mon Jan 02 15:04:05 -0700 2006"
timestamp_milliseconds_since_epochTimestamp represented as milliseconds since the Unix Epoch (00:00:00 UTC on 1 January 1970)."1596597629980"
timestamp_nanoseconds_since_epochTimestamp represented as nanoseconds since the Unix Epoch (00:00:00 UTC on 1 January 1970)."1596597839946364285"
timestamp_seconds_since_epochTimestamp represented as seconds since the Unix Epoch (00:00:00 UTC on 1 January 1970)."1596597629"
timezone_utc_offsetTimezone represented as offset from UTC."UTC-07:00"

email

FormatDescriptionExamples
rfc_5322_emailAn email address, as defined by RFC 5322.- [email protected]
- [email protected]
- [email protected]
rfc_5322_name_emailAn email address accompanied by a name, as defined by RFC 5322.- Example Name <[email protected]>
- "Example S. Name <[email protected]>

language

FormatDescriptionExamples
iso_693_1Two-letter abbreviation of language name, as specified by ISO 693-1.- "ab" (Abkhazian)
- "en" (English)
iso_693_2Three-letter abbreviation of language name, as specified by ISO 693-2.- "abk" (Abkhazian)
- "eng" (English)
language_nameLanguage name, as expressed natively.- "پښتو" (Pashto)
- "Español" (Spanish)
- 'Oʻzbek" (Uzbek)
- "English" (English)
language_name_englishLanguage name in English."Spanish"

phone_number

FormatDescriptionExamples
phone_number_internationalInternational telephone number, including the international calling code. Supports ' ', '-', '.' as separators.- +1 684-633-5115 (American Samoa)
- +49 30 83050 (German)
- +355 4 224 7285 (Albania)
- +1 323-867-5309 (United States)
phone_number_usUnited States phone number, including area code but excluding international calling code. Supports a variety of separators, see examples.- 323-867-5309
- 323 867 5309
- 323.867.5309
- (323) 867-5309
- (323) 867 5309
- 3238675309

uri

FormatDescriptionExamples
urlAbsolute URL, including HTTP or HTTPS protocol, trailing paths, and/or anchors.- https://www.example.com
- https://www.example.com/foo
- https://www.example.com/foo#bar

What’s Next