Skip to content

Commit

Permalink
Fix: durations are not always integers. (#479)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Aug 8, 2024
1 parent b50eb79 commit 6cdd8b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `/_mapping` with `index` in query ([#385](https://github.com/opensearch-project/opensearch-api-specification/pull/385))
- Fixed duplicate `/_nodes/{node_id}` path ([#416](https://github.com/opensearch-project/opensearch-api-specification/pull/416))
- Fixed `_source` accepting an array of fields in `/_search` ([#430](https://github.com/opensearch-project/opensearch-api-specification/pull/430))
- Fixed `_update_by_query` with a simple term ([451](https://github.com/opensearch-project/opensearch-api-specification/pull/451))
- Fixed `_update_by_query` with a simple term ([#451](https://github.com/opensearch-project/opensearch-api-specification/pull/451))
- Fixed `Duration` to allow for non-integers ([#479](https://github.com/opensearch-project/opensearch-api-specification/pull/479))

### Security

Expand Down
2 changes: 1 addition & 1 deletion spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ components:
description: |-
A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
`d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
pattern: ^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$
pattern: ^([0-9\.]+)(?:d|h|m|s|ms|micros|nanos)$
type: string
Metadata:
type: object
Expand Down
2 changes: 1 addition & 1 deletion tools/tests/tester/fixtures/specs/excerpt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,5 +286,5 @@ components:
description: |-
A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
`d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
pattern: ^([0-9]+)(?:d|h|m|s|ms|micros|nanos)$
pattern: ^([0-9\.]+)(?:d|h|m|s|ms|micros|nanos)$
type: string

0 comments on commit 6cdd8b7

Please sign in to comment.