OpenAPI Version Date Format (Edit)

API versions using date-based format should follow the YYYY-MM-DD pattern, optionally followed by a -preview suffix for pre-release versions.

OpenAPIInfoVersionDate

Rule Definition

openapi-version-date-format-info.yaml
{"openapi-version-date-format-info":{"description":"API versions using date-based format should follow the YYYY-MM-DD pattern, optionally followed by a -preview suffix for pre-release versions.","message":"API version SHOULD follow YYYY-MM-DD format.","given":"$.info.version","severity":"info","then":{"function":"pattern","functionOptions":{"match":"^\\d{4}-\\d{2}-\\d{2}(-preview)?$"}}}}

Back to All of the Rules