-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Specification true up for temporary ratings
- Loading branch information
1 parent
a352ea6
commit 94d6ba2
Showing
18 changed files
with
442 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ type: array | |
minItems: 0 | ||
maxItems: 1000 | ||
items: | ||
$ref: ./temporary-rating.yaml | ||
$ref: ./seasonal-override.yaml |
24 changes: 14 additions & 10 deletions
24
.../components/schemas/temporary-rating.yaml → ...components/schemas/seasonal-override.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
type: object | ||
additionalProperties: false | ||
description: | | ||
Data structure for a temporary rating against a segment. | ||
Data structure for a seasonal override against a resource. | ||
Includes a unique ID, start and (optional) end time, and a reason. | ||
May include a set of values, which apply if this temporary rating | ||
is either an AAR Exception or temporary seasonal rating. | ||
Must also include a set of values. | ||
properties: | ||
provenance: | ||
$ref: ./data-provenance.yaml | ||
id: | ||
$ref: ./generic-identifier.yaml | ||
resource-id: | ||
$ref: ./resource-id.yaml | ||
$ref: ./server-generated-id.yaml | ||
resource: | ||
$ref: ./names.yaml | ||
start-time: | ||
$ref: ./period-start.yaml | ||
end-time: | ||
$ref: ./period-start.yaml | ||
updated-time: | ||
$ref: ./timestamp.yaml | ||
continuous-operating-limit: | ||
$ref: ./limit.yaml | ||
emergency-operating-limits: | ||
$ref: ./array-max-emergency-durations.yaml#/limit-value-set | ||
reason: | ||
description: | | ||
Free-form text indicating the reason for the temporary rating. | ||
Free-form text indicating the reason for the seasonal override. | ||
type: string | ||
format: free-form | ||
maxLength: 100 | ||
maxLength: 4000 | ||
required: | ||
- resource | ||
- start-time | ||
- continuous-operating-limit | ||
- emergency-operating-limits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: string | ||
description: | | ||
Unique identifier for the object, as generated by the TROLIE server, typically as a result of POST | ||
requests. For POST requests, this should not be provided, as it will be generated by the server and | ||
returned. | ||
maxLength: 250 | ||
pattern: ^(.){0,250}$ | ||
example: "//trolie.example.com/limits/forecast-snapshot/2025-07-05T01:00:00-0500" |
5 changes: 5 additions & 0 deletions
5
docs/_data/components/schemas/temporary-aar-exception-set.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: array | ||
minItems: 0 | ||
maxItems: 1000 | ||
items: | ||
$ref: ./temporary-aar-exception.yaml |
32 changes: 32 additions & 0 deletions
32
docs/_data/components/schemas/temporary-aar-exception.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
type: object | ||
additionalProperties: false | ||
description: | | ||
Data structure for a temporary AAR Exception against a resource. | ||
Includes a unique ID, start and (optional) end time, and a reason. | ||
May or may not include a set of values, depending on the business | ||
context in which the temporary AAR exception is used. | ||
properties: | ||
provenance: | ||
$ref: ./data-provenance.yaml | ||
id: | ||
$ref: ./server-generated-id.yaml | ||
resource: | ||
$ref: ./names.yaml | ||
start-time: | ||
$ref: ./period-start.yaml | ||
end-time: | ||
$ref: ./period-start.yaml | ||
continuous-operating-limit: | ||
$ref: ./limit.yaml | ||
emergency-operating-limits: | ||
$ref: ./array-max-emergency-durations.yaml#/limit-value-set | ||
reason: | ||
description: | | ||
Free-form text indicating the reason for the exception. | ||
type: string | ||
format: free-form | ||
maxLength: 4000 | ||
required: | ||
- resource | ||
- start-time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
get: | ||
operationId: getSeasonalOverrides | ||
description: | | ||
Search for Seasonal Overrides. Will return any Seasonal Overrides that overlap with the start/end period. | ||
Clients SHOULD perform Conditional `GET` using the `If-None-Match` header | ||
and the `ETag` of a previous `GET` response. | ||
summary: Get Seasonal Overrides | ||
tags: &tags | ||
- Seasonal Overrides | ||
parameters: | ||
- $ref: ../components/parameters/period-start-query.yaml | ||
- $ref: ../components/parameters/period-end.yaml | ||
- $ref: ../components/parameters/monitoring-set-filter.yaml | ||
- $ref: ../components/parameters/segment-filter.yaml | ||
responses: | ||
'200': | ||
description: The requested seasonal ratings are returned. | ||
content: | ||
application/vnd.trolie.seasonal-override-set.v1+json: | ||
schema: | ||
$ref: ../components/schemas/seasonal-override-set.yaml | ||
example: | ||
$ref: ../../example-narratives/examples/seasonal-override-list.json | ||
headers: | ||
$ref: '../openapi-split.yaml#/components/responses/204/headers' | ||
|
||
'304': | ||
$ref: '../openapi-split.yaml#/components/responses/304' | ||
'400': &malformed | ||
$ref: '../openapi-split.yaml#/components/responses/400-problem' | ||
'401': &unauthorized-empty | ||
$ref: '../openapi-split.yaml#/components/responses/401-empty' | ||
'403': &forbidden-empty | ||
$ref: '../openapi-split.yaml#/components/responses/403-empty' | ||
'404': ¬-found-empty | ||
$ref: '../openapi-split.yaml#/components/responses/404-empty' | ||
'406': ¬-acceptable-empty | ||
$ref: '../openapi-split.yaml#/components/responses/406-empty' | ||
'410': | ||
$ref: '../openapi-split.yaml#/components/responses/410-empty' | ||
'429': &rate-limit-hit | ||
$ref: '../openapi-split.yaml#/components/responses/429-empty' | ||
'500': &unexpected-error-empty | ||
$ref: '../openapi-split.yaml#/components/responses/500-empty' | ||
default: *unexpected-error-empty | ||
|
||
security: | ||
- oauth2-primary-flow: | ||
- read:seasonal-overrides | ||
|
||
post: | ||
operationId: createSeasonalOverride | ||
description: &post_desc | | ||
Create a new seasonal override | ||
summary: *post_desc | ||
tags: *tags | ||
requestBody: | ||
content: | ||
application/vnd.trolie.seasonal-override.v1+json: | ||
schema: | ||
$ref: ../components/schemas/seasonal-override.yaml | ||
example: | ||
$ref: ../../example-narratives/examples/seasonal-override-post.json | ||
responses: | ||
'201': | ||
description: The seasonal override was created | ||
content: | ||
application/vnd.trolie.seasonal-override.v1+json: | ||
schema: | ||
$ref: ../components/schemas/seasonal-override.yaml | ||
example: | ||
$ref: ../../example-narratives/examples/seasonal-override-get.json | ||
headers: | ||
$ref: '../openapi-split.yaml#/components/responses/204/headers' | ||
|
||
'400': *malformed | ||
'401': *unauthorized-empty | ||
'403': *forbidden-empty | ||
'404': *not-found-empty | ||
'406': *not-acceptable-empty | ||
'413': | ||
$ref: '../openapi-split.yaml#/components/responses/413-empty' | ||
'415': | ||
$ref: '../openapi-split.yaml#/components/responses/415-problem' | ||
'422': | ||
$ref: '../openapi-split.yaml#/components/responses/422-problem' | ||
'429': *rate-limit-hit | ||
'500': *unexpected-error-empty | ||
default: *unexpected-error-empty | ||
security: | ||
- oauth2-primary-flow: | ||
- write:seasonal-overrides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.