diff --git a/versions/3.0.md b/versions/3.0.md index 2e5bd3fda6..9e4e003944 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -95,23 +95,33 @@ An additional primitive data type `"file"` is used by the [Parameter Object](#pa Primitives have an optional modifier property `format`. OAS uses several known formats to more finely define the data type being used. However, the `format` property is an open `string`-valued property, and can have any value to support documentation needs. -Formats such as `"email"`, `"uuid"`, etc., can be used even though they are not defined by this specification. +Formats such as `"email"`, `"T-shirt size"`, etc., can be used even though they are not defined by this specification. Types that are not accompanied by a `format` property follow their definition from the JSON Schema (except for `file` type which is defined above). The formats defined by the OAS are: Common Name | [`type`](#dataTypeType) | [`format`](#dataTypeFormat) | Comments ----------- | ------ | -------- | -------- +octet | `integer` | `uint8` | unsigned 8 bits +signed byte| `integer` | `int8` | signed 8 bits +short| `integer` | `int16` | signed 16 bits integer | `integer` | `int32` | signed 32 bits long | `integer` | `int64` | signed 64 bits +big integer | `integer` | | | float | `number` | `float` | | double | `number` | `double` | | +decimal | `number` | `decimal` | decimal floating-point number, recipient-side internal representation as a binary floating-point number may lead to rounding errors +big decimal | `number` | | | string | `string` | | | -byte | `string` | `byte` | base64 encoded characters +encoded binary | `string` | `byte` | base64 encoded characters - [RFC4648](https://tools.ietf.org/html/rfc4648#section-4) +url-safe encoded binary | `string` | `base64url` | base64url encoded characters - [RFC4648](https://tools.ietf.org/html/rfc4648#section-5) binary | `string` | `binary` | any sequence of octets boolean | `boolean` | | | date | `string` | `date` | As defined by `full-date` - [RFC3339](http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +time (of day) | `string` | `time` | As defined by `partial-time` - [RFC3339](http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +duration| `string` | `duration` | As defined by `xs:dayTimeDuration` - [XML Schema 1.1](http://www.w3.org/TR/xmlschema11-2/#dayTimeDuration) +uuid| `string` | `uuid` | Universally Unique Identifier (UUID) - [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) password | `string` | `password` | Used to hint UIs the input needs to be obscured. ### Schema