mirror of
https://github.com/corda/corda.git
synced 2024-12-21 13:57:54 +00:00
963de40902
* [NOTICK] - Enable check in detekt for unused imports * Put back accidental removal of used import * Some more accidental removals |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
README.md |
configuration-parsing
This module provides types and functions to facilitate using Typesafe configuration objects.
Features
- A multi-step, structured validation framework for Typesafe configurations, allowing to merge Typesafe and application-level rules.
- A parsing framework, allowing to extract domain types from raw configuration objects in a versioned, type-safe fashion.
- A configuration description framework, allowing to print the expected schema of a configuration object.
- A configuration serialization framework, allowing to output the structure and values of a configuration object, potentially obfuscating sensitive data.
Concepts
The main idea is to create a Configuration.Specification
to model the expected structure of a Typesafe configuration.
The specification is then able to parse, validate, describe and serialize a raw Typesafe configuration.
By using VersionedConfigurationParser
, it is possible to map specific versions to Configuration.Specification
s and to parse and validate a raw configuration object based on a version header.
Refer to the following tests to gain an understanding of how the library works:
- net.corda.common.configuration.parsing.internal.versioned.VersionedParsingExampleTest
- net.corda.common.configuration.parsing.internal.SpecificationTest
- net.corda.common.configuration.parsing.internal.SchemaTest