Github   Telegram
Loading...
Searching...
No Matches
merge_schemas.hpp
Go to the documentation of this file.
1#pragma once
2
5
7
8USERVER_NAMESPACE_BEGIN
9
10namespace yaml_config {
11
12namespace impl {
13
14void Merge(Schema& destination, Schema&& source);
15
16} // namespace impl
17
21template <typename ParentComponent>
22Schema MergeSchemas(const std::string& yaml_string) {
23 auto schema = impl::SchemaFromString(yaml_string);
24 impl::Merge(schema, ParentComponent::GetStaticConfigSchema());
25 return schema;
26}
27
28} // namespace yaml_config
29
30USERVER_NAMESPACE_END