userver
C++ Async Framework
Loading...
Searching...
No Matches
merge_schemas.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/yaml_config/merge_schemas.hpp
4
/// @brief @copybrief yaml_config::MergeSchemas
5
/// @ingroup userver_universal
6
7
#
include
<
userver
/
yaml_config
/
schema
.
hpp
>
8
9
USERVER_NAMESPACE_BEGIN
10
11
namespace
yaml_config
{
12
13
namespace
impl {
14
15
void
Merge(Schema& destination, Schema&& source);
16
17
}
// namespace impl
18
19
/// @brief Merge parent and child components schemas of static configs
20
///
21
/// @see @ref static-configs-validation "Static configs validation"
22
template
<
typename
ParentComponent>
23
Schema
MergeSchemas
(
const
std::string& yaml_string) {
24
auto
schema = impl::SchemaFromString(yaml_string);
25
impl::Merge(schema, ParentComponent::GetStaticConfigSchema());
26
return
schema;
27
}
28
29
}
// namespace yaml_config
30
31
USERVER_NAMESPACE_END
userver
yaml_config
merge_schemas.hpp
Generated on Mon Oct 6 2025 12:30:45 for userver by
Doxygen
1.13.2