From 2f39c428168d0c4c78caa6411ee1993bb93e2832 Mon Sep 17 00:00:00 2001 From: Christopher Atkins Date: Fri, 11 Oct 2024 12:11:03 +0000 Subject: [PATCH] use "source" as element name for all uses of data-provenance.yaml --- .../parameters/ratings-provider.yaml | 7 --- .../schemas/array-max-monitored-elements.yaml | 14 ++--- docs/_data/components/schemas/headers.yaml | 11 ++-- .../schemas/mutable-rating-proposal.yaml | 11 ---- .../schemas/time-bound-static-ratings.yaml | 62 ++++++++----------- .../examples/forecast-limits-detailed.json | 2 +- .../forecast-limits-slim-active-power.json | 2 +- .../examples/forecast-limits.json | 2 +- ...cast-ratings-proposal-status-complete.json | 2 +- .../forecast-ratings-proposal-status.json | 2 +- .../examples/realtime-limit-set-detailed.json | 2 +- .../examples/realtime-limit-set-slim.json | 2 +- .../examples/realtime-limit-set.json | 2 +- .../realtime-proposal-status-complete.json | 2 +- .../examples/realtime-proposal-status.json | 2 +- .../examples/seasonal-override-get.json | 10 +-- .../examples/seasonal-override-list.json | 10 +-- .../examples/seasonal-override-post.json | 13 ++-- ...al-ratings-proposal-status-incomplete.json | 2 +- .../seasonal-ratings-proposal-status.json | 2 +- .../examples/temporary-aar-exception-get.json | 10 +-- .../temporary-aar-exception-list.json | 10 +-- .../temporary-aar-exception-post.json | 9 ++- 23 files changed, 85 insertions(+), 106 deletions(-) delete mode 100644 docs/_data/components/parameters/ratings-provider.yaml delete mode 100644 docs/_data/components/schemas/mutable-rating-proposal.yaml diff --git a/docs/_data/components/parameters/ratings-provider.yaml b/docs/_data/components/parameters/ratings-provider.yaml deleted file mode 100644 index 3d4f850..0000000 --- a/docs/_data/components/parameters/ratings-provider.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: ratings-provider -description: | - Identifier (typically NERC Id) of a ratings provider. -in: path -required: true -schema: - $ref: ../schemas/entity-id.yaml diff --git a/docs/_data/components/schemas/array-max-monitored-elements.yaml b/docs/_data/components/schemas/array-max-monitored-elements.yaml index 0cca4f7..564bf94 100644 --- a/docs/_data/components/schemas/array-max-monitored-elements.yaml +++ b/docs/_data/components/schemas/array-max-monitored-elements.yaml @@ -169,13 +169,13 @@ forecast-proposal-status: properties: <<: *common-proposal-status-props - forecast-provider: + source: $ref: ./data-provenance.yaml begins: # nominates the forecast window $ref: ./period-start.yaml required: - - forecast-provider + - source - begins - incomplete-obligation-count - incomplete-obligations @@ -189,10 +189,10 @@ real-time-proposal-status: Includes any validation errors encountered while processing proposals. properties: <<: *common-proposal-status-props - ratings-provider: + source: $ref: ./data-provenance.yaml required: - - ratings-provider + - source - incomplete-obligation-count - incomplete-obligations - invalid-proposal-count @@ -306,10 +306,10 @@ seasonal-ratings-proposal-status: unfulfilled Obligations indicated in `incomplete-obligation-count`. items: $ref: ./array-max-seasons.yaml#/missing-seasonal-obligation - provider-info: + source: $ref: ./data-provenance.yaml required: - - provider-info + - source - incomplete-obligation-count - invalid-proposal-count @@ -345,4 +345,4 @@ seasonal-override-set: minItems: 0 maxItems: *max-facilities items: - $ref: ./time-bound-static-ratings.yaml#/seasonal-override \ No newline at end of file + $ref: ./time-bound-static-ratings.yaml#/seasonal-override diff --git a/docs/_data/components/schemas/headers.yaml b/docs/_data/components/schemas/headers.yaml index 4f2f27a..8fa6c9b 100644 --- a/docs/_data/components/schemas/headers.yaml +++ b/docs/_data/components/schemas/headers.yaml @@ -86,7 +86,7 @@ forecast-snapshot-header: &forecast-snapshot-header RFC 3339 date-time string with *no fractional seconds component* that Nominates the operational window of this snapshot. - snapshot-provenance: + source: $ref: ./data-provenance.yaml power-system-resources: $ref: ./array-max-monitored-elements.yaml#/named-power-system-resources @@ -94,7 +94,7 @@ forecast-snapshot-header: &forecast-snapshot-header $ref: ./array-max-emergency-durations.yaml#/emergency-durations required: - begins - - snapshot-provenance + - source - power-system-resources - default-emergency-durations @@ -113,21 +113,21 @@ forecast-snapshot-slim-header: required: - begins - ends - - snapshot-provenance + - source - power-system-resources - default-emergency-durations real-time-snapshot-header: description: Details about the snapshot provided by the Clearinghouse provider. properties: - snapshot-provenance: + source: $ref: ./data-provenance.yaml power-system-resources: $ref: ./array-max-monitored-elements.yaml#/named-power-system-resources default-emergency-durations: $ref: ./array-max-emergency-durations.yaml#/emergency-durations required: - - snapshot-provenance + - source - power-system-resources seasonal-proposal-header: @@ -136,7 +136,6 @@ seasonal-proposal-header: Describes the contents of this seasonal ratings proposal. - seasonal-proposal-header-slim: <<: *common-header description: | diff --git a/docs/_data/components/schemas/mutable-rating-proposal.yaml b/docs/_data/components/schemas/mutable-rating-proposal.yaml deleted file mode 100644 index 1ebff14..0000000 --- a/docs/_data/components/schemas/mutable-rating-proposal.yaml +++ /dev/null @@ -1,11 +0,0 @@ -type: object -description: > - - Used as a base type for mutable ratings proposals, i.e., forecast and seasonal - ratings. - -properties: - last-updated: - $ref: ./timestamp.yaml - ratings-provider: - $ref: ./entity-id.yaml diff --git a/docs/_data/components/schemas/time-bound-static-ratings.yaml b/docs/_data/components/schemas/time-bound-static-ratings.yaml index a017b11..ec05cb1 100644 --- a/docs/_data/components/schemas/time-bound-static-ratings.yaml +++ b/docs/_data/components/schemas/time-bound-static-ratings.yaml @@ -1,13 +1,13 @@ -temporary-aar-exception-request: +temporary-aar-exception-request: &time-bound-static-rating type: object description: | Represents a temporary AAR Exception against a resource. - Includes a start and (optional) end time, and a reason. + Includes a 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: &time-bound-static-rating - provenance: + context in which the temporary AAR exception is used. + properties: &time-bound-static-rating-props + source: $ref: ./data-provenance.yaml resource: $ref: ./names.yaml @@ -25,56 +25,44 @@ temporary-aar-exception-request: type: string format: free-form maxLength: 4000 + additionalProperties: false required: + - source - resource - start-time - continuous-operating-limit - emergency-operating-limits -temporary-aar-exception: - type: object +temporary-aar-exception: &time-bound-static-limit + <<: *time-bound-static-rating 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. - allOf: - - $ref: '#/temporary-aar-exception-request' - - type: object - properties: - id: - $ref: ./server-generated-id.yaml - required: - - id - -seasonal-override-request: - type: object - description: | - Data structure for a seasonal override against a resource. - Includes a unique ID, start and (optional) end time, and a reason. - - Must also include a set of values. - properties: - <<: *time-bound-static-rating + properties: + <<: *time-bound-static-rating-props + id: + $ref: ./server-generated-id.yaml + additionalProperties: false required: + - source + - id - resource - start-time - continuous-operating-limit - emergency-operating-limits -seasonal-override: - type: object +seasonal-override-request: + <<: *time-bound-static-rating description: | Data structure for a seasonal override against a resource. - Includes a unique ID, start and (optional) end time, and a reason. - Must also include a set of values. - allOf: - - $ref: '#/seasonal-override-request' - - type: object - properties: - id: - $ref: ./server-generated-id.yaml - required: - - id \ No newline at end of file + +seasonal-override: + <<: *time-bound-static-limit + description: | + Data structure for a seasonal override against a resource. Includes a + unique ID, start and (optional) end time, and a reason. Must also include a + set of values. diff --git a/docs/example-narratives/examples/forecast-limits-detailed.json b/docs/example-narratives/examples/forecast-limits-detailed.json index 8490f63..b115a79 100644 --- a/docs/example-narratives/examples/forecast-limits-detailed.json +++ b/docs/example-narratives/examples/forecast-limits-detailed.json @@ -1,7 +1,7 @@ { "snapshot-header": { "begins": "2023-07-12T16:00:00-07:00", - "snapshot-provenance": { + "source": { "provider":"X-AMPL-RC", "last-updated": "2023-07-12T16:00:00-07:00", "origin-id": "//trolie.example.com/snapshots/2024-08-05T11%3a00%3a00-07%3a00" diff --git a/docs/example-narratives/examples/forecast-limits-slim-active-power.json b/docs/example-narratives/examples/forecast-limits-slim-active-power.json index 267f52f..7a29bfc 100644 --- a/docs/example-narratives/examples/forecast-limits-slim-active-power.json +++ b/docs/example-narratives/examples/forecast-limits-slim-active-power.json @@ -2,7 +2,7 @@ "snapshot-header": { "begins": "2023-07-12T16:00:00-07:00", "ends": "2023-07-12T18:00:00-07:00", - "snapshot-provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T16:00:00-07:00", "origin-id": "//trolie.example.com/snapshots/2024-08-05T11%3a00%3a00-07%3a00" diff --git a/docs/example-narratives/examples/forecast-limits.json b/docs/example-narratives/examples/forecast-limits.json index 36ec49a..982b74e 100644 --- a/docs/example-narratives/examples/forecast-limits.json +++ b/docs/example-narratives/examples/forecast-limits.json @@ -1,7 +1,7 @@ { "snapshot-header": { "begins": "2023-07-12T16:00:00-07:00", - "snapshot-provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T16:00:00-07:00", "origin-id": "//trolie.example.com/snapshots/2024-08-05T11%3a00%3a00-07%3a00" diff --git a/docs/example-narratives/examples/forecast-ratings-proposal-status-complete.json b/docs/example-narratives/examples/forecast-ratings-proposal-status-complete.json index fc22382..f774a7d 100644 --- a/docs/example-narratives/examples/forecast-ratings-proposal-status-complete.json +++ b/docs/example-narratives/examples/forecast-ratings-proposal-status-complete.json @@ -1,5 +1,5 @@ { - "forecast-provider": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/forecast-ratings-proposal-status.json b/docs/example-narratives/examples/forecast-ratings-proposal-status.json index 4ac3bb2..b20af68 100644 --- a/docs/example-narratives/examples/forecast-ratings-proposal-status.json +++ b/docs/example-narratives/examples/forecast-ratings-proposal-status.json @@ -1,5 +1,5 @@ { - "forecast-provider": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/realtime-limit-set-detailed.json b/docs/example-narratives/examples/realtime-limit-set-detailed.json index 363f6fc..91a6566 100644 --- a/docs/example-narratives/examples/realtime-limit-set-detailed.json +++ b/docs/example-narratives/examples/realtime-limit-set-detailed.json @@ -1,6 +1,6 @@ { "snapshot-header": { - "snapshot-provenance": { + "source": { "provider": "X-AMPL-RC", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "//trolie.example.com/snapshots/2024-08-05T11%3a00%3a00-07%3a00" diff --git a/docs/example-narratives/examples/realtime-limit-set-slim.json b/docs/example-narratives/examples/realtime-limit-set-slim.json index 9eb234f..76184a6 100644 --- a/docs/example-narratives/examples/realtime-limit-set-slim.json +++ b/docs/example-narratives/examples/realtime-limit-set-slim.json @@ -1,6 +1,6 @@ { "snapshot-header": { - "snapshot-provenance": { + "source": { "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" diff --git a/docs/example-narratives/examples/realtime-limit-set.json b/docs/example-narratives/examples/realtime-limit-set.json index f03a016..30c983c 100644 --- a/docs/example-narratives/examples/realtime-limit-set.json +++ b/docs/example-narratives/examples/realtime-limit-set.json @@ -1,6 +1,6 @@ { "snapshot-header": { - "snapshot-provenance": { + "source": { "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" diff --git a/docs/example-narratives/examples/realtime-proposal-status-complete.json b/docs/example-narratives/examples/realtime-proposal-status-complete.json index 9a31936..f774a7d 100644 --- a/docs/example-narratives/examples/realtime-proposal-status-complete.json +++ b/docs/example-narratives/examples/realtime-proposal-status-complete.json @@ -1,5 +1,5 @@ { - "ratings-provider": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/realtime-proposal-status.json b/docs/example-narratives/examples/realtime-proposal-status.json index 1c3f80c..9b08f3d 100644 --- a/docs/example-narratives/examples/realtime-proposal-status.json +++ b/docs/example-narratives/examples/realtime-proposal-status.json @@ -1,5 +1,5 @@ { - "ratings-provider": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/seasonal-override-get.json b/docs/example-narratives/examples/seasonal-override-get.json index 81d0109..ef0c395 100644 --- a/docs/example-narratives/examples/seasonal-override-get.json +++ b/docs/example-narratives/examples/seasonal-override-get.json @@ -1,5 +1,5 @@ { - "provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "//trolie.example.com/seasonal-overrides/513a7cb3-5d3c-4b7e-849c-e4015846db53" @@ -25,18 +25,18 @@ "mva": 160 }, "emergency-operating-limits": [ - { + { "duration-name": "emergency", "limit": { "mva": 165 } }, - { + { "duration-name": "load-shed", "limit": { "mva": 170 } - } + } ], "reason": "Increased vegetation proximity" -} \ No newline at end of file +} diff --git a/docs/example-narratives/examples/seasonal-override-list.json b/docs/example-narratives/examples/seasonal-override-list.json index bd359e3..90f4c14 100644 --- a/docs/example-narratives/examples/seasonal-override-list.json +++ b/docs/example-narratives/examples/seasonal-override-list.json @@ -1,6 +1,6 @@ [ { - "provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "//trolie.example.com/seasonal-overrides/513a7cb3-5d3c-4b7e-849c-e4015846db53" @@ -26,19 +26,19 @@ "mva": 160 }, "emergency-operating-limits": [ - { + { "duration-name": "emergency", "limit": { "mva": 165 } }, - { + { "duration-name": "load-shed", "limit": { "mva": 170 } - } + } ], "reason": "Increased vegetation proximity" } -] \ No newline at end of file +] diff --git a/docs/example-narratives/examples/seasonal-override-post.json b/docs/example-narratives/examples/seasonal-override-post.json index f6399fd..36fda3e 100644 --- a/docs/example-narratives/examples/seasonal-override-post.json +++ b/docs/example-narratives/examples/seasonal-override-post.json @@ -1,4 +1,9 @@ { + "source": { + "provider":"X-AMPL", + "last-updated": "2023-07-12T15:05:43.044267100-07:00", + "origin-id": "513a7cb3-5d3c-4b7e-849c-e4015846db53" + }, "resource": { "resource-id": "8badf00d", "alternate-identifiers": [ @@ -19,18 +24,18 @@ "mva": 160 }, "emergency-operating-limits": [ - { + { "duration-name": "emergency", "limit": { "mva": 165 } }, - { + { "duration-name": "load-shed", "limit": { "mva": 170 } - } + } ], "reason": "Increased vegetation proximity" -} \ No newline at end of file +} diff --git a/docs/example-narratives/examples/seasonal-ratings-proposal-status-incomplete.json b/docs/example-narratives/examples/seasonal-ratings-proposal-status-incomplete.json index 9b38a4c..26c1ad8 100644 --- a/docs/example-narratives/examples/seasonal-ratings-proposal-status-incomplete.json +++ b/docs/example-narratives/examples/seasonal-ratings-proposal-status-incomplete.json @@ -1,5 +1,5 @@ { - "provider-info": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/seasonal-ratings-proposal-status.json b/docs/example-narratives/examples/seasonal-ratings-proposal-status.json index ef67539..f774a7d 100644 --- a/docs/example-narratives/examples/seasonal-ratings-proposal-status.json +++ b/docs/example-narratives/examples/seasonal-ratings-proposal-status.json @@ -1,5 +1,5 @@ { - "provider-info": { + "source": { "provider": "UTILITY-A", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" diff --git a/docs/example-narratives/examples/temporary-aar-exception-get.json b/docs/example-narratives/examples/temporary-aar-exception-get.json index 3fdcf4d..cc83157 100644 --- a/docs/example-narratives/examples/temporary-aar-exception-get.json +++ b/docs/example-narratives/examples/temporary-aar-exception-get.json @@ -1,5 +1,5 @@ { - "provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "//trolie.example.com/temporary-aar-exceptions/46f7212b-1633-4c30-ba71-c6e987b2ded7" @@ -25,18 +25,18 @@ "mva": 160 }, "emergency-operating-limits": [ - { + { "duration-name": "emergency", "limit": { "mva": 165 } }, - { + { "duration-name": "load-shed", "limit": { "mva": 170 } - } + } ], "reason": "High wildfire risk forecasted until mid-day 7/13/25" -} \ No newline at end of file +} diff --git a/docs/example-narratives/examples/temporary-aar-exception-list.json b/docs/example-narratives/examples/temporary-aar-exception-list.json index f0f732e..518af75 100644 --- a/docs/example-narratives/examples/temporary-aar-exception-list.json +++ b/docs/example-narratives/examples/temporary-aar-exception-list.json @@ -1,6 +1,6 @@ [ { - "provenance": { + "source": { "provider":"X-AMPL", "last-updated": "2023-07-12T15:05:43.044267100-07:00", "origin-id": "//trolie.example.com/temporary-aar-exceptions/46f7212b-1633-4c30-ba71-c6e987b2ded7" @@ -26,19 +26,19 @@ "mva": 160 }, "emergency-operating-limits": [ - { + { "duration-name": "emergency", "limit": { "mva": 165 } }, - { + { "duration-name": "load-shed", "limit": { "mva": 170 } - } + } ], "reason": "High wildfire risk forecasted until mid-day 7/13/25" } -] \ No newline at end of file +] diff --git a/docs/example-narratives/examples/temporary-aar-exception-post.json b/docs/example-narratives/examples/temporary-aar-exception-post.json index c383a6d..fd87ac6 100644 --- a/docs/example-narratives/examples/temporary-aar-exception-post.json +++ b/docs/example-narratives/examples/temporary-aar-exception-post.json @@ -1,4 +1,9 @@ { + "source": { + "provider":"X-AMPL", + "last-updated": "2023-07-12T15:05:43.044267100-07:00", + "origin-id": "//trolie.example.com/temporary-aar-exceptions/46f7212b-1633-4c30-ba71-c6e987b2ded7" + }, "resource": { "resource-id": "8badf00d", "alternate-identifiers": [ @@ -30,7 +35,7 @@ "limit": { "mva": 170 } - } + } ], "reason": "High wildfire risk forecasted until mid-day 7/13/25" -} \ No newline at end of file +}