Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.89 KB

schema-type-and-format.md

File metadata and controls

75 lines (52 loc) · 2.89 KB

SchemaTypeAndFormat

Category

Data Plane Warning

Applies to

Data Plane OpenAPI specs

Output Message

Schema with type: {{type}} has unrecognized format: {{format}}

Description

Every schema should specify a well-defined combination of type and format.

format is required for type integer and number, optional for type string, and not allowed for any other types.

The well-defined type/format combinations are:

type: integer

format description comments
int32 signed 32 bits from oas2
int64 signed 64 bits from oas2
unixtime Unix time stamp from AutoRest

type: number

format description comments
float 32 bit floating point from oas2
int64 64 bit floating point from oas2
decimal 128 bit floating point from AutoRest

type: string

format description comments
byte base64 encoded characters from oas2
binary any sequence of octets from oas2
date RFC3339 full-date from oas2
date-time RFC3339 date-time from oas2
password sensitive value from oas2
char from AutoRest
time from AutoRest
date-time-rfc1123 from AutoRest
date-time-rfc7231 from AutoRest
duration from AutoRest
uuid from AutoRest
base64url from AutoRest
url from AutoRest
uri from AutoRest
odata-query from AutoRest
certificate from AutoRest

CreatedAt

July 21, 2022

LastModifiedAt

July 21, 2022

How to fix the violation

Change the schema to use a well-defined type and format.