diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 3f4ebb5..566cbcc 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -248,7 +248,7 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.3.7) + rexml (3.3.8) rouge (3.30.0) rubyzip (2.3.2) safe_yaml (1.0.5) diff --git a/docs/_data/components/schemas/array-max-emergency-ratings.yaml b/docs/_data/components/schemas/array-max-emergency-ratings.yaml new file mode 100644 index 0000000..72f983e --- /dev/null +++ b/docs/_data/components/schemas/array-max-emergency-ratings.yaml @@ -0,0 +1,7 @@ +slim: + type: array + title: Slim Period + minItems: 1 + maxItems: 11 # 1 continuous + 10 max emergency durations + items: + type: number diff --git a/docs/_data/components/schemas/array-max-forecast-periods.yaml b/docs/_data/components/schemas/array-max-forecast-periods.yaml index fad7d76..37af395 100644 --- a/docs/_data/components/schemas/array-max-forecast-periods.yaml +++ b/docs/_data/components/schemas/array-max-forecast-periods.yaml @@ -8,7 +8,7 @@ forecast-limit-item: &limit type: array maxItems: 300 items: - $ref: 'forecast-limit-period.yaml#/snapshot-slim' + $ref: 'forecast-limit-period.yaml#/snapshot' required: - resource-id - periods @@ -34,12 +34,7 @@ resource-forecast-proposal: resource-forecast-proposal-slim: <<: *periods items: - type: array - title: Forecasted Period - minItems: 1 - maxItems: 11 # 1 continuous + 10 max emergency durations - items: - type: number + $ref: 'array-max-emergency-ratings.yaml#/slim' missing-forecast: <<: *limit diff --git a/docs/_data/components/schemas/array-max-monitored-elements.yaml b/docs/_data/components/schemas/array-max-monitored-elements.yaml index ed69e65..0cca4f7 100644 --- a/docs/_data/components/schemas/array-max-monitored-elements.yaml +++ b/docs/_data/components/schemas/array-max-monitored-elements.yaml @@ -91,8 +91,8 @@ common-proposal-status: size of `incomplete-facilities`, since the latter has a pre-defined upper bound for performance and application security reasons. - ⚠️ **The Ratings Provider should check that this value is zero when they - believe they have completed their submission process.️** ⚠️ + The Ratings Provider should check that this value is zero when they + believe they have completed their submission process. type: integer format: uint16 @@ -222,6 +222,18 @@ realtime-limits-detailed-snapshot: items: $ref: ./realtime-limit-item-detailed.yaml +realtime-limits-snapshot-slim: + type: object + description: A snapshot of the realtime limits for a monitoring set. + properties: + snapshot-header: + $ref: ./headers.yaml#/real-time-snapshot-header + limits: + <<: *max + description: Real-time limits + items: + $ref: 'array-max-emergency-ratings.yaml#/slim' + realtime-proposal: type: object properties: @@ -231,24 +243,27 @@ realtime-proposal: <<: *max description: Real-Time Ratings Proposals items: - type: object - description: > - Real-time ratings data for a segment. - allOf: - - type: object - properties: - resource-id: - $ref: ./resource-id.yaml - - $ref: ./limit-proposal.yaml - required: - - resource-id - - continuous-operating-limit - - emergency-operating-limits + $ref: 'realtime-limit-period.yaml#/proposal' required: - proposal-header - ratings +realtime-proposal-slim: + type: object + description: Used to propose real-time ratings for a set of resources. + properties: + proposal-header: + $ref: ./headers.yaml#/real-time-proposal-header + ratings: + <<: *max + description: Real-Time Ratings Proposals + items: + $ref: "array-max-emergency-ratings.yaml#/slim" + required: + - proposal-header + - ratings + seasonal-ratings-proposal: type: object properties: diff --git a/docs/_data/components/schemas/forecast-limit-period.yaml b/docs/_data/components/schemas/forecast-limit-period.yaml index 168e319..113cf33 100644 --- a/docs/_data/components/schemas/forecast-limit-period.yaml +++ b/docs/_data/components/schemas/forecast-limit-period.yaml @@ -51,7 +51,7 @@ proposal-considered: - source - proposal-disposition -snapshot-slim: +snapshot: allOf: - $ref: '#/period' - $ref: ./limit-data.yaml @@ -60,5 +60,5 @@ snapshot-detailed: type: object description: Period detailed limits including provenance allOf: - - $ref: '#/snapshot-slim' + - $ref: '#/snapshot' - $ref: ./limit-provenance.yaml diff --git a/docs/_data/components/schemas/realtime-limit-period.yaml b/docs/_data/components/schemas/realtime-limit-period.yaml new file mode 100644 index 0000000..070b17c --- /dev/null +++ b/docs/_data/components/schemas/realtime-limit-period.yaml @@ -0,0 +1,14 @@ +proposal: + type: object + description: > + Real-time ratings data for a segment. + allOf: + - type: object + properties: + resource-id: + $ref: ./resource-id.yaml + - $ref: ./limit-proposal.yaml + required: + - resource-id + - continuous-operating-limit + - emergency-operating-limits diff --git a/docs/_data/components/schemas/seasonal-rating-period.yaml b/docs/_data/components/schemas/seasonal-rating-period.yaml index 5ac9d2b..95f5855 100644 --- a/docs/_data/components/schemas/seasonal-rating-period.yaml +++ b/docs/_data/components/schemas/seasonal-rating-period.yaml @@ -53,7 +53,7 @@ snapshot: description: Proposes the continuous and emergency ratings for the specified Season. title: Seasonal Rating Proposal allOf: - - $ref: 'forecast-limit-period.yaml#/snapshot-slim' + - $ref: 'forecast-limit-period.yaml#/snapshot' - type: object properties: season-name: diff --git a/docs/_data/paths/limits_realtime-snapshot.yaml b/docs/_data/paths/limits_realtime-snapshot.yaml index c93e79a..0b3bada 100644 --- a/docs/_data/paths/limits_realtime-snapshot.yaml +++ b/docs/_data/paths/limits_realtime-snapshot.yaml @@ -29,6 +29,11 @@ get: $ref: "../components/schemas/array-max-monitored-elements.yaml#/realtime-limits-detailed-snapshot" example: $ref: '../../example-narratives/examples/realtime-limit-set-detailed.json' + application/vnd.trolie.realtime-limits-snapshot-slim.v1+json: + schema: + $ref: "../components/schemas/array-max-monitored-elements.yaml#/realtime-limits-snapshot-slim" + example: + $ref: '../../example-narratives/examples/realtime-limit-set-slim.json' headers: $ref: '../openapi-split.yaml#/components/responses/204/headers' '304': diff --git a/docs/_data/paths/rating-proposals_realtime.yaml b/docs/_data/paths/rating-proposals_realtime.yaml index f06cf65..07c017c 100644 --- a/docs/_data/paths/rating-proposals_realtime.yaml +++ b/docs/_data/paths/rating-proposals_realtime.yaml @@ -92,6 +92,11 @@ post: $ref: "../components/schemas/array-max-monitored-elements.yaml#/realtime-proposal" example: $ref: ../../example-narratives/examples/realtime-proposal.json + application/vnd.trolie.rating-realtime-proposal-slim.v1+json: + schema: + $ref: "../components/schemas/array-max-monitored-elements.yaml#/realtime-proposal-slim" + example: + $ref: ../../example-narratives/examples/realtime-proposal-slim-patch.json responses: '202': description: | @@ -105,7 +110,7 @@ post: schema: $ref: ../components/schemas/array-max-monitored-elements.yaml#/real-time-proposal-status example: - $ref: ../../example-narratives/examples/realtime-proposal-status.json + $ref: ../../example-narratives/examples/realtime-proposal-status.json headers: $ref: '../openapi-split.yaml#/components/responses/204/headers' diff --git a/docs/example-narratives/examples/realtime-limit-set-slim.json b/docs/example-narratives/examples/realtime-limit-set-slim.json new file mode 100644 index 0000000..9eb234f --- /dev/null +++ b/docs/example-narratives/examples/realtime-limit-set-slim.json @@ -0,0 +1,33 @@ +{ + "snapshot-header": { + "snapshot-provenance": { + "provider": "X-AMPL", + "last-updated": "2023-07-12T15:05:43.044267100-07:00", + "origin-id": "//trolie.example.com/snapshots/2024-08-05T11%3a00%3a00-07%3a00" + }, + "default-emergency-durations": [ + { + "name": "emergency", + "duration-minutes": 240 + } + ], + "power-system-resources": [ + { "resource-id": "8badf00d", + "alternate-identifiers": [ + { "name": "segmentX", "authority": "TO-NERC-ID" }, + { "name": "LINE1 SEG-X", "authority": "RC-NERC-ID", "mrid": "8badf00d" } + ] + }, + { "resource-id": "f34d3d", + "alternate-identifiers": [ + { "name": "segmentY", "authority": "TO-NERC-ID" }, + { "name": "LINE2 SEG-Y", "authority": "RC-NERC-ID", "mrid": "8badf00d" } + ] + } + ] + }, + "limits": [ + [ 160, 170 ], + [ 155, 160 ] + ] +} diff --git a/docs/example-narratives/examples/realtime-proposal-slim-patch.json b/docs/example-narratives/examples/realtime-proposal-slim-patch.json new file mode 100644 index 0000000..92e800c --- /dev/null +++ b/docs/example-narratives/examples/realtime-proposal-slim-patch.json @@ -0,0 +1,33 @@ +{ + "proposal-header" : { + "source": { + "last-updated": "2025-10-31T15:05:43.044267100-07:00", + "provider": "UTILITY-A", + "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" + }, + "default-emergency-durations": [ + { + "name": "emergency", + "duration-minutes": 240 + } + ], + "power-system-resources": [ + { "resource-id": "8badf00d", + "alternate-identifiers": [ + {"name": "segmentX", "authority": "TO-NERC-ID"}, + {"name": "LINE1 SEG-X", "authority": "RC-NERC-ID", "mrid": "8badf00d"} + ] + }, + { "resource-id": "f34d3d", + "alternate-identifiers": [ + {"name": "segmentY", "authority": "TO-NERC-ID"}, + {"name": "LINE2 SEG-Y", "authority": "RC-NERC-ID", "mrid": "8badf00d"} + ] + } + ] + }, + "ratings": [ + [160, 170], + [155, 160] + ] +}