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

Add descriptions to Compliance API spec #870

Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 4 additions & 3 deletions packages/mds-compliance-api/spec/flat-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
]
}
],
"summary": "Get violation periods",
"summary": "Get Violation Periods. Violation Periods are defined as periods where there are consecutive Compliance Snapshots for a given provider_id/policy_id which are in violation.",
"parameters": [
{
"in": "query",
Expand Down Expand Up @@ -193,7 +193,7 @@
]
}
],
"summary": "Get compliance snapshot_ids",
"summary": "Get compliance snapshot_ids given a token. Sometimes, an opaque token will be provided as part of a URI to point to a collection of snapshots, this endpoint can be utilized to access those snapshots.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but what does "opaque" mean here? What's an opaque token, and conversely, what's a transparent token?

Copy link
Author

@avatarneil avatarneil Jan 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unreadable vs readable is how I like to think of it. An opaque token could be impossible for a user to derive useful information from, whereas a transparent one would be the inverse.

"parameters": [
{
"in": "query",
Expand Down Expand Up @@ -249,7 +249,7 @@
]
}
],
"summary": "Get a compliance violation",
"summary": "Get a compliance violation. A single compliance violation is defined as a discrete violation of a policy. Typically, this will map back to a single vehicle.",
"parameters": [
{
"in": "path",
Expand Down Expand Up @@ -536,6 +536,7 @@
},
"ComplianceSnapshot": {
"type": "object",
"description": "A Compliance Snapshot can be thought of as a birds-eye-view picture of a Provider's compliance with a given policy at a point in time. Compliance Snapshots will typically consider a Provider's entire fleet in aggregate.",
"properties": {
"compliance_as_of": {
"$ref": "#/components/schemas/Timestamp"
Expand Down
7 changes: 4 additions & 3 deletions packages/mds-compliance-api/spec/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ paths:
get:
security:
- bearerAuth: ["compliance:read", "compliance:read:provider"]
summary: Get violation periods
summary: Get Violation Periods. Violation Periods are defined as periods where there are consecutive Compliance Snapshots for a given provider_id/policy_id which are in violation.
parameters:
- in: query
name: start_time
Expand Down Expand Up @@ -112,7 +112,7 @@ paths:
get:
security:
- bearerAuth: ["compliance:read", "compliance:read:provider"]
summary: Get compliance snapshot_ids
summary: Get compliance snapshot_ids given a token. Sometimes, an opaque token will be provided as part of a URI to point to a collection of snapshots, this endpoint can be utilized to access those snapshots.
parameters:
- in: query
name: compliance_ids_token
Expand Down Expand Up @@ -144,7 +144,7 @@ paths:
get:
security:
- bearerAuth: ["compliance:read", "compliance:read:provider"]
summary: Get a compliance violation
summary: Get a compliance violation. A single compliance violation is defined as a discrete violation of a policy. Typically, this will map back to a single vehicle.
parameters:
- in: path
name: violation_id
Expand Down Expand Up @@ -326,6 +326,7 @@ components:
format: float
ComplianceSnapshot:
type: object
description: A Compliance Snapshot can be thought of as a birds-eye-view picture of a Provider's compliance with a given policy at a point in time. Compliance Snapshots will typically consider a Provider's entire fleet in aggregate.
properties:
compliance_as_of:
$ref: "#/components/schemas/Timestamp"
Expand Down