Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
d5c9243c
Commit
d5c9243c
authored
1 year ago
by
Maja Jablonska
Browse files
Options
Downloads
Patches
Plain Diff
Add serialization guide to the docs
parent
bb4757a5
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!46
Merge COMBO 3.0 into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/Configuration.md
+21
-2
21 additions, 2 deletions
docs/Configuration.md
with
21 additions
and
2 deletions
docs/Configuration.md
+
21
−
2
View file @
d5c9243c
# Configuration
Dependency injection is used for configuration using the
```dependency_injector```
package.
Configuration files can be in json or ini format.
\ No newline at end of file
Models can be serialized as a
```json```
file with the following structure:
```
json
{
"model"
:
{
"type"
:
<model_type>
,
"parameters"
:
{
<parameter_name>:
{
"type"
:
<class_name>
,
"parameters"
:
{
...
}
}
}
}
}
```
The
```"type"```
field serves as a dependency-injection like mechanism and
sets which class and constructor is used.
The
```"parameters"```
dictionary is passed to the constructor method. Every
parameter is attempted to be resolved from the class registry and only if that's
not possible they are passed as-is.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment