forked from openmobilityfoundation/mds-core
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mds-compliance][mds-db] Fix/compliance handles timestamp (#316)
* Query for policy by rule_id. * Adding ability to see Policies active at a particular time. * Refactored snapshot logic. * Adding test to ensure timestamp paramenter works for count endpoint * minor fixes * Making policy rules unique and refactoring compliance api logic to reflect that, and renaming `end_date` param to `timestamp`. * repairing test cases that broke because rules cannot be repeated * more consistent error handling and better active policies and rule uniqueness checks * Versioning and fixing the definition of an active policy * minor fixes * minor fixes Co-authored-by: Mark Maxham <max@ellis-and-associates.com>
- Loading branch information
Showing
8 changed files
with
278 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ApiVersionMiddleware } from '@mds-core/mds-api-server' | ||
import { COMPLIANCE_API_SUPPORTED_VERSIONS, COMPLIANCE_API_DEFAULT_VERSION } from '../types' | ||
|
||
export const ComplianceApiVersionMiddleware = ApiVersionMiddleware( | ||
'application/vnd.mds.compliance+json', | ||
COMPLIANCE_API_SUPPORTED_VERSIONS | ||
).withDefaultVersion(COMPLIANCE_API_DEFAULT_VERSION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './compliance-api-version' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.