The Data Standards Body (DSB) Engineering team has developed a library of open-source technical artefacts to assist the CDR Community with CDR software development and implementation. The Engineering Team routinely enhances existing tools to align with the latest version of the standards and adds new tools based on the needs of the community.
If you have any feedback on these tools or questions about them, feel free to contact the team by dropping an email to contact@consumerdatastandards.gov.au.
The following tools are currently available:
- JSON Schema Files
- CDR Test Documentation
- Postman Collections
- Java Artefacts
- Products Comparator Demo
- Type Definition Library
- Test Documentation CLI
JSON Schema Files
The schema files are JSON schemas extracted from the published standard. These can be used for a variety of purposes where JSON schema validations are required, or where the individual schema definitions are required for any reason. For instance, the DSB uses these schema files for API schema validation in the Ajv validator plugin in the Postman Collections, see below.
The individual schema files are derived from the OpenAPI Swagger (OAS) definitions published under the CDS standards repository.
The schema files are available in the CDS dsb-schema-tools repository, organised in directories according to CDS release version. For example, the schema files for release 1.17.0 are in https://github.com/ConsumerDataStandardsAustralia/dsb-schema-tools/tree/main/1.17.0.
CDR Test Documentation
The published CDR Test Documentation is an API-centric interpretation of the published Consumer Data Standards. It can be used for the development of a test suite. The documentation is grouped into suites, scenarios, test cases and assertions.
The documentation has been implemented as set of JSON files validated against the structure defined in the CDS standards-testing repository, schema directory. The individual JSON definitions, for suites, assertions and so on, can be found in the same CDS standards-testing json-docs directory.
These files form the basis of the HTML implementation of the CDR Test Documentation available here.
The DSB has provided some examples on how to implement API testing using the Postman tool.
See Postman Collections below.
Postman Collections
A number of Postman collections can be found in the public Postman workspace DSB-SCHEMA-TESTS. These collections use the Postman-to-GitHub integration feature. The corresponding DSB maintained repository is CDS dsb-postman.
These collections can be used to validate API endpoints. In order to achieve the validation of a data holder, a number of parameters must be set in a Postman environment file. The existing environment DSB Banking and DSB Energy can be used as guides as to which parameters are required. These environments use a cloud hosted version of the mock data holder published in the CDS java-artefacts repository.
The Postman collections contain a number of test scenarios and assertions as specified in the CDR Test Documentation. These demonstrate one possible way to structure a test suite for a data holder. For instance, the test scenario T.EAR.001 contains a number of implemented assertions as specified in the test documentation.
The highlighted reference links to the public Postman workspace.
The code under the Test tab in Postman is one example of a possible implementation for this test case.
Each test case in the Postman Collection links to the associated CDR Test Documentation scenario.
Java artefacts
Java Artefacts is a reference implementation for the Data Holder APIs described in the Consumer Data Standards (CDS). It is intended as a tool for CDR participants building a Data Holder server and client systems. It can be used for checking that requests to CDS APIs are well formed, and that responses to those requests conform to expectations.
The Java Artefacts are available in the CDS java-artefacts repository.
The Java Artefacts README.md file contains information and disclaimers related to the use of the Java Artefacts.
The Java Artefacts include the following components, each with its own README.md file:
- a reference implementation Data Holder server, implementing Consumer Data Standards APIs. See Data Holder README.md
- a Client Command Line Interface (CLI) tool for calling the Data Holder APIs. See Client CLI README.md
- Integration tests for verifying the system. See Integration tests README.md
- A client library, shared by the CLI and the integration tests. See Client README.md
See also the CDR support portal article Java Artefacts Data Holder server reference implementation.
Product Comparator Demo
The Product comparator demo is a proof-of-concept web app for viewing and comparing products. It uses the product reference data APIs of Data Holders who've requested their details be added via a Pull Request.
The Products comparator demo is developed using React/JavaScript and is available in the CDS products-comparator-demo repository. The README.md file contains instructions for installation.
See the CDR support portal article Add your organisation to the Product Comparator Demo for details of adding an organisation’s Product Reference Data to the comparator.
Link to the Product Comparator Demo.
Type Definition Library
The DSB maintains a set of type definitions files which can be very useful for any Typescript.
The type definition library is a collection of Typescript interfaces published via the CDS DefinitelyTyped repository.
The DSB maintained fork is a public repository and any requested enhancements, bugs or other issues can be raised on the CDS DefinitelyTyped repository.
The interfaces are typescript declarations corresponding to the JSON schemas published by the Data Standards Body. The published version of the library can be downloaded from the NPM package registry as the package @types/consumer-data-standards.
They can be used in any Typescript applications, such as Angular, React TypeScript or NodeJS Typescript. Apart from ensuring the development of type safe code, this library provides the basis for IntelliSense in a number of development IDEs, such as VS Code.
Installation
npm I @types/consumer-data-standards
Test documentation CLI
The testdocs CLI can be used to validate and render test case documentation documented in JSON that is compliant with the CDR Test Documentation JSON schema.
This tool has been created by the Data Standards Body to support participants implementing the technical standards developed for the Australian Consumer Data Right regime. The tool is maintained as part of public standards testing repository.
The goal of the testdocs CLI is to provide tooling for the documentation of tests so that CDR participants can test their implementations with confidence that they are conformant with the standards.
The published test documentation CLI is available as an npm package @cds-au/testdocs.