From 16487134cb8fd40710f5f2e511fef832b2ce389e Mon Sep 17 00:00:00 2001 From: Christopher Atkins Date: Wed, 9 Oct 2024 12:35:28 +0000 Subject: [PATCH] DRY up default monitoring set --- .../components/schemas/monitoring-set.yaml | 2 +- docs/_data/paths/monitoring-sets-default.yaml | 45 +++++-------------- .../examples/monitoring-set-get.json | 11 +++-- 3 files changed, 17 insertions(+), 41 deletions(-) diff --git a/docs/_data/components/schemas/monitoring-set.yaml b/docs/_data/components/schemas/monitoring-set.yaml index ff68d89..a455791 100644 --- a/docs/_data/components/schemas/monitoring-set.yaml +++ b/docs/_data/components/schemas/monitoring-set.yaml @@ -24,4 +24,4 @@ properties: required: - source - id -- power-system-resources \ No newline at end of file +- power-system-resources diff --git a/docs/_data/paths/monitoring-sets-default.yaml b/docs/_data/paths/monitoring-sets-default.yaml index f3a0eca..b995fa1 100644 --- a/docs/_data/paths/monitoring-sets-default.yaml +++ b/docs/_data/paths/monitoring-sets-default.yaml @@ -1,39 +1,16 @@ get: operationId: getDefaultMonitoringSet - description: &get_desc Obtain the logged in rating provider's default monitoring set. - summary: *get_desc - tags: - - Monitoring Sets - responses: - '200': - description: OK - content: - application/vnd.trolie.monitoring-set.v1+json: - schema: - $ref: ../components/schemas/monitoring-set.yaml - example: - $ref: ../../example-narratives/examples/monitoring-set-get.json - headers: - $ref: '../openapi-split.yaml#/components/responses/204/headers' + summary: Obtain your default monitoring set. + description: | - '304': - $ref: '../openapi-split.yaml#/components/responses/304' - '400': - $ref: '../openapi-split.yaml#/components/responses/400-problem' - '401': - $ref: '../openapi-split.yaml#/components/responses/401-empty' - '403': - $ref: '../openapi-split.yaml#/components/responses/403-empty' - '404': - $ref: '../openapi-split.yaml#/components/responses/404-empty' - '406': - $ref: '../openapi-split.yaml#/components/responses/406-empty' - '429': - $ref: '../openapi-split.yaml#/components/responses/429-empty' - '500': &unexpected-error-empty - $ref: '../openapi-split.yaml#/components/responses/500-empty' - default: *unexpected-error-empty + Obtain the default monitoring set for the authorized principal. TROLIE + implementations SHOULD provide a default monitoring set for each principal. + The default monitoring set is the monitoring set that is used for limits + snapshots when the `monitoring-set-id` query parameter is not supplied. + tags: + $ref: './monitoring-sets_{id}.yaml#/get/tags' + responses: + $ref: './monitoring-sets_{id}.yaml#/get/responses' security: - - oauth2-primary-flow: - - read:monitoring-sets + $ref: './monitoring-sets_{id}.yaml#/get/security' diff --git a/docs/example-narratives/examples/monitoring-set-get.json b/docs/example-narratives/examples/monitoring-set-get.json index b61ab23..b3fe262 100644 --- a/docs/example-narratives/examples/monitoring-set-get.json +++ b/docs/example-narratives/examples/monitoring-set-get.json @@ -3,14 +3,14 @@ "last-updated": "2025-10-31T15:05:43.044267100-07:00", "provider": "RC-NERC-ID", "origin-id": "5aeacb25-9b65-4738-8a00-ac10afa63640" - }, + }, "id":"UTILITY123", "description": "Lines in utility 123's footprint and immediate neighbors", "power-system-resources": [ { "resource-id": "01925421-0766-771a-a92d-1631a49f647c", "alternate-identifiers": [ { - "name": "MYSUBSTN.LN.12345", + "name": "MYSUBSTN.LN.12345", "type": "EMSID", "authority":"RC-NERC-ID" }, @@ -21,11 +21,11 @@ } ] }, - { + { "resource-id": "01925421-b967-78de-a746-7497c5105939", "alternate-identifiers": [ { - "name": "MYSUBSTN.LN.67890", + "name": "MYSUBSTN.LN.67890", "type": "EMSID", "authority":"RC-NERC-ID" }, @@ -35,7 +35,6 @@ "authority":"RC-NERC-ID" } ] - } ] -} \ No newline at end of file +}