{"section":"data-types","title":"Data Types Rules","description":"Rules for data type formats and standards","totalRules":6,"spectralRules":[{"name":"datetime-format","severity":"warn","message":"Date-time fields should use ISO 8601 format with format: date-time","given":"$.components.schemas[*].properties[?(@ && @.type=='string' && (@.description && /date|time|timestamp|created|updated|modified/i.test(@.description)))]","then":{"field":"format","function":"enumeration","functionOptions":{"values":["date-time","date","time"]}}},{"name":"integer-format-specified","severity":"info","message":"Integer types should specify format (int32 or int64)","given":"$.components.schemas[*].properties[?(@.type=='integer')]","then":{"field":"format","function":"truthy"}},{"name":"number-format-specified","severity":"info","message":"Number types should specify format (float or double)","given":"$.components.schemas[*].properties[?(@.type=='number')]","then":{"field":"format","function":"truthy"}},{"name":"string-email-format","severity":"warn","message":"Email fields should use format: email","given":"$.components.schemas[*].properties[?(@ && @.type=='string' && /email/i.test(@property))]","then":{"field":"format","function":"enumeration","functionOptions":{"values":["email"]}}},{"name":"string-uri-format","severity":"warn","message":"URI fields should use format: uri","given":"$.components.schemas[*].properties[?(@ && @.type=='string' && /url|uri|href|link/i.test(@property))]","then":{"field":"format","function":"enumeration","functionOptions":{"values":["uri","uri-reference"]}}},{"name":"string-uuid-format","severity":"info","message":"UUID fields should use format: uuid","given":"$.components.schemas[*].properties[?(@ && @.type=='string' && /uuid|guid/i.test(@property))]","then":{"field":"format","function":"enumeration","functionOptions":{"values":["uuid"]}}}],"rules":[{"id":"datetime-iso8601","requirement":"MUST","rule":"Use ISO 8601 format for all date and time values","severity":"warn","spectralRule":"datetime-format","examples":{"notRecommended":["01/15/2024","1705315800"],"recommended":["2024-01-15T10:30:00Z"]}},{"id":"integer-format","requirement":"SHOULD","rule":"Specify int32 or int64 format for integer types","severity":"info","spectralRule":"integer-format-specified"},{"id":"number-format","requirement":"SHOULD","rule":"Specify float or double format for number types","severity":"info","spectralRule":"number-format-specified"},{"id":"email-format","requirement":"SHOULD","rule":"Use format: email for email fields","severity":"warn","spectralRule":"string-email-format"},{"id":"uri-format","requirement":"SHOULD","rule":"Use format: uri for URL/URI fields","severity":"warn","spectralRule":"string-uri-format"},{"id":"uuid-format","requirement":"SHOULD","rule":"Use format: uuid for UUID/GUID fields","severity":"info","spectralRule":"string-uuid-format"}]}