Skip to content

Commit 24c9b27

Browse files
committed
Improve/fix oas example
1 parent 160a552 commit 24c9b27

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

aip/general/0214/expiry.oas.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,32 @@ openapi: 3.0.3
33
info:
44
title: Library
55
version: 1.0.0
6+
paths: {}
67
components:
7-
schema:
8+
schemas:
89
Book:
910
description: This book will self-destruct.
11+
type: object
1012
properties:
1113
name:
1214
type: string
1315
description: |
1416
The name of the book.
1517
Format: publishers/{publisher}/books/{book}
16-
expire_time:
17-
type: string
18-
format: date-time
19-
description: |
20-
Timestamp in UTC of when this resource is considered expired.
21-
This is *always* provided on output, regardless of what was sent
22-
on input.
23-
ttl_seconds:
24-
type: integer
25-
description: The TTL for this resource.
26-
writeOnly: true
18+
oneOf:
19+
- type: object
20+
properties:
21+
expireTime:
22+
type: string
23+
format: date-time
24+
description: |
25+
Timestamp in UTC of when this resource is considered expired.
26+
- type: object
27+
properties:
28+
ttlSeconds:
29+
type: integer
30+
description: |
31+
The TTL for this resource in seconds.
32+
When this value is passed as input it is returned as the equivalent
33+
expireTime on output.
34+
writeOnly: true

0 commit comments

Comments
 (0)