Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRY up default monitoring set #176

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_data/components/schemas/monitoring-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ properties:
required:
- source
- id
- power-system-resources
- power-system-resources
45 changes: 11 additions & 34 deletions docs/_data/paths/monitoring-sets-default.yaml
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 5 additions & 6 deletions docs/example-narratives/examples/monitoring-set-get.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
},
Expand All @@ -35,7 +35,6 @@
"authority":"RC-NERC-ID"
}
]

}
]
}
}