Skip to content

Commit e29a6c0

Browse files
authored
Merge pull request #124 from tomcdonnell/hotfix-master/SA-15353
Update docs to match actual response [SA-15353] master
2 parents efd0b55 + ea273aa commit e29a6c0

File tree

7 files changed

+78
-38
lines changed

7 files changed

+78
-38
lines changed

openapi/components/schemas/dateTime.yaml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,5 @@ description: |
55
* a RFC3339 string
66
* an object, which contains a datetime in several formats
77
oneOf:
8-
- type: string
9-
format: date-time
10-
- type: object
11-
readOnly: true
12-
deprecated: true
13-
description: |
14-
This read-only object representation is deprecated and will be
15-
removed eventually: it exists only for compatibility with existing
16-
API endpoints.
17-
18-
If using this object representation, please use the "json" property
19-
and perform localization using client-side libraries.
20-
required:
21-
- json
22-
properties:
23-
database:
24-
type: string
25-
description: |
26-
A database representation of the date.
27-
unixTimestamp:
28-
type: integer
29-
format: int64
30-
description: |
31-
The date as a Unix timestamp.
32-
local:
33-
type: string
34-
description: |
35-
A string representation of the date, localized to the Schoolbox
36-
instance's settings.
37-
json:
38-
type: string
39-
format: date-time
40-
description: |
41-
The date as a RFC3339 string.
8+
- $ref: dateTimeString.yaml
9+
- $ref: dateTimeObject.yaml
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
title: Datetime Object
2+
type: object
3+
readOnly: true
4+
#
5+
# This has been commented out so that the description from the parent will be displayed in the generated docs.
6+
# The description in the parent should describe the purpose of the particular date field, whereas this description
7+
# describes the particulars of this representation.
8+
#
9+
#description: |
10+
# A JSON representation of a datetime.
11+
# * an object, which contains a datetime in several formats
12+
#
13+
# This read-only object representation is deprecated and will be
14+
# removed eventually: it exists only for compatibility with existing
15+
# API endpoints.
16+
#
17+
# If using this object representation, please use the "json" property
18+
# and perform localization using client-side libraries.
19+
required:
20+
- json
21+
properties:
22+
database:
23+
type: string
24+
description: |
25+
A database representation of the date. Eg. "2018-01-28 00:00:00"
26+
example: "2018-01-28 00:00:00"
27+
unixTimestamp:
28+
type: integer
29+
format: int64
30+
description: |
31+
The date as a Unix timestamp. Eg. 1517058000
32+
example: 1517058000
33+
local:
34+
type: string
35+
description: |
36+
A string representation of the date, localized to the Schoolbox
37+
instance's settings. Eg. "28/01/2018 12:00am".
38+
example: "28/01/2018 12:00am"
39+
json:
40+
type: string
41+
format: date-time
42+
description: |
43+
The date as a RFC3339 string. Eg. "2018-01-28T00:00:00+11:00".
44+
example: "2018-01-28T00:00:00+11:00"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
title: Datetime
2+
type: string
3+
description: The date as a RFC3339 string. eg. "2018-01-28T00:00:00+11:00".
4+
format: date-time
5+
example: "2018-01-28T00:00:00+11:00"

openapi/components/schemas/news/author.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ properties:
2323
description: |
2424
The author's full name: usually, this is the title, first name and last
2525
name joined together.
26+
preferredName:
27+
type: string
28+
nullable: true
29+
givenName:
30+
type: string

openapi/components/schemas/news/commonFields.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,25 @@ properties:
4646
allOf:
4747
- description: |
4848
When was the article published?
49-
- $ref: ../dateTime.yaml
49+
50+
This read-only object representation is deprecated. It will be
51+
replaced in 23.1 with an RFC3339 string eg. "2018-01-28T00:00:00+11:00".
52+
- $ref: ../dateTimeObject.yaml
5053
topics:
5154
type: array
5255
description: |
5356
A list of topics which are applicable to the article.
5457
items:
55-
$ref: ../news/topic.yaml
58+
type: object
59+
properties:
60+
name:
61+
type: string
62+
description: |
63+
A human-readable name for the topic.
64+
slug:
65+
type: string
66+
description: |
67+
A machine-readable name for the topic.
68+
69+
70+

openapi/components/schemas/news/statusDate.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ allOf:
22
- description: |
33
When did the article's status change to its current
44
value?
5-
- $ref: ../dateTime.yaml
5+
6+
This read-only object representation is deprecated. It will be
7+
replaced in 23.1 with an RFC3339 string eg. "2018-01-28T00:00:00+11:00".
8+
- $ref: ../dateTimeObject.yaml

openapi/components/schemas/news/topic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ properties:
1515
sequence:
1616
type: integer
1717
description: |
18-
The order in which this topic will display in a topic list.
18+
The order in which this topic will display in a topic list.

0 commit comments

Comments
 (0)