Skip to content

Commit

Permalink
clean up seasonal snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
caindy committed Feb 4, 2024
1 parent 8f379de commit 943bb5a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ realtime-ratings-proposals:
$ref: 'array-max-forecast-periods.yaml#/realtime-rating-proposal'

seasonal-rating-proposal:
description: Seasonal rating proposal
allOf:
- $ref: ./mutable-rating-proposal.yaml
- type: object
Expand All @@ -59,3 +60,8 @@ seasonal-rating-proposal:
<<: *max
items:
$ref: 'array-max-seasons.yaml#/seasonal-proposals'
seasonal-rating-snapshot:
<<: *max
description: Seasonal rating snapshot
items:
$ref: ./array-max-seasons.yaml#/seasonal-rating-snapshot-item
15 changes: 13 additions & 2 deletions docs/_data/components/schemas/array-max-seasons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ seasonal-proposals:
properties:
segment-id:
$ref: ./generic-identifier.yaml
seasons:
seasons: &max
type: array
maxItems: 20 # max seasons
maxItems: 20
minItems: 0
items:
$ref: ./seasonal-proposal-season.yaml
seasonal-rating-snapshot-item:
type: object
additionalProperties: false
properties:
transmission-facility-id:
$ref: ./generic-identifier.yaml
seasons:
<<: *max
items:
$ref: ./seasonal-rating-snapshot-value.yaml
11 changes: 0 additions & 11 deletions docs/_data/components/schemas/seasonal-rating-snapshot-item.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_data/components/schemas/seasonal-rating-snapshot.yaml

This file was deleted.

13 changes: 5 additions & 8 deletions docs/_data/paths/seasonal-ratings_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ head: &head
description: >
Use to obtain the headers that would be returned for
`getSeasonalRatingsSnapshot`. Useful for cache invalidation.
summary: Get header for Seasonal Ratings
summary: Get headers for Seasonal Ratings
tags:
- Seasonal Rating Snapshots
parameters:
Expand All @@ -19,17 +19,15 @@ head: &head
get:
<<: *head
operationId: getSeasonalRatingsSnapshot
description: >-
Retrieve the nominal and seasonal ratings for all facilities in the
`monitoring-set`.
description: Retrieve the nominal and seasonal ratings.
summary: Get Seasonal Ratings
responses:
'200':
description: OK
content:
application/vnd.trolie.seasonal-rating-snapshot.v1+json:
schema:
$ref: ../components/schemas/seasonal-rating-snapshot.yaml
schema: &seasonal-rating-snapshot
$ref: ../components/schemas/array-max-monitored-elements.yaml#/seasonal-rating-snapshot
example:
- transmission-facility-id: line2
seasons:
Expand All @@ -45,8 +43,7 @@ get:
limit:
mva: 170
application/json:
schema:
$ref: ../components/schemas/seasonal-rating-snapshot.yaml
schema: *seasonal-rating-snapshot
headers:
$ref: '../openapi-split.yaml#/components/responses/200/headers'

Expand Down

0 comments on commit 943bb5a

Please sign in to comment.