From f02b73f39bdfecee8a1ff1f29b4a59b3b7dbf6cd Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Wed, 5 Jun 2024 15:16:55 -0400 Subject: [PATCH 1/2] CASMCMS-9022: Fix incorrect uses of format keyword in API spec --- CHANGELOG.md | 3 +++ api/openapi.yaml.in | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f11a7f94..9ab137f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Some schemas in the API used the `format` keyword to mean `pattern`, and thus the patterns they specified were not being + interpreted or enforced. This fixes that. ## [2.19.0] - 2024-06-05 ### Dependencies diff --git a/api/openapi.yaml.in b/api/openapi.yaml.in index c913df56..8072cc77 100644 --- a/api/openapi.yaml.in +++ b/api/openapi.yaml.in @@ -108,7 +108,7 @@ components: type: string description: Age in minutes (e.g. "3m"), hours (e.g. "5h"), days (e.g. "10d"), or weeks (e.g. "2w"). example: 3d - format: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' minLength: 1 # This allows for over 10 years using the smallest units (minutes) maxLength: 8 @@ -986,7 +986,7 @@ components: Delete complete Sessions that are older than cleanup_completed_session_ttl (in minutes, hours, days, or weeks). 0 disables cleanup behavior. example: 3d - format: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' minLength: 1 # This allows for over 10 years using the smallest units (minutes) maxLength: 8 @@ -999,7 +999,7 @@ components: The maximum amount of time a Component's actual state is considered valid (in minutes, hours, days, or weeks). 0 disables cleanup behavior for newly booted nodes and instructs bos-state-reporter to report once instead of periodically. example: 6h - format: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' + pattern: '^(0|0[mMhHdDwW]|[1-9][0-9]*[mMhHdDwW])$' minLength: 1 # This allows for over 10 years using the smallest units (minutes) maxLength: 8 From dbcc9b196b5cfab8ef7617991769ae364efc11da Mon Sep 17 00:00:00 2001 From: "Mitch Harding (the weird one)" Date: Wed, 5 Jun 2024 15:21:52 -0400 Subject: [PATCH 2/2] Release 2.20.0 for CSM 1.6 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ab137f0..48b816b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [2.20.0] - 2024-06-05 ### Fixed - Some schemas in the API used the `format` keyword to mean `pattern`, and thus the patterns they specified were not being interpreted or enforced. This fixes that.