zalando/restful-api-guidelines

Standardize formats

Closed this issue · 2 comments

We are using several standard formats but also custom ones.

For standard formats see:

I believe it's beneficial to have a complete list of all formats that we support, their semantic and relation to standards, e.g. (not complete!):

type: string

  • bcp47 language tag (custom)
  • byte
  • date
  • date-time
  • email
  • gtin-13 article number (custom)
  • hostname
  • ipv4
  • ipv6
  • iso-3166-1-alpha-2 country code (custom)
  • iso-4217 currency code (custom)
  • iso-639 language code (custom)
  • json-pointer
  • password
  • regex
  • time
  • uri
  • uri-template (RFC6570)
  • urn (custom)
  • uuid

type: integer

  • int32
  • int64
  • bigint (custom)

type: number

  • float
  • double
  • decimal (custom)

urn is actually only used once to define the x-api-id property and I believe it's incorrect since it doesn't have a urn: namespace.

https://tools.ietf.org/html/rfc8141

@tkrop Do you remember why we used urn?