Situation
Currently, our internal configuration repo contains many JSON files that were crafted manually.
The goal is to have these JSON files generated by docbuild.
Use Case
Writers don't need to care of all the details of having a valid and syntactically correct JSON file. In the past it was a challenge to provide changes not only to the Docserv XML config, but also reflect these changes manually in the JSON.
With the help of docbuild, this tedious task becomes obsolete.
Possible Implementation
-
Clone the GL://susedoc/docserv-config.
-
Pick one JSON file from the json-portal-dsc folder, for example sles/16.0.json.
-
Run docbuild to generate the metadata:
docbuild --env-config=env.devel.toml metadata `sles/16.0/en-us''
The result will be saved, for example, in /var/cache/docbuild/doc-example-com/meta/sles/16.0.json.
-
Compare the two files side-by-side. Either manually or by an appropriate tool (maybe https://jsondiff.com/?)
Differences can occur:
- A different order in
.documents. That should be fine.
- A different key would be an error.
- A different value could be an error. That depends on the datatype.
We need to collect the differences to ensure they are the same. They don't have to be byte-identical, but have the same structure, keys etc.
Relationship
See #155
Situation
Currently, our internal configuration repo contains many JSON files that were crafted manually.
The goal is to have these JSON files generated by docbuild.
Use Case
Writers don't need to care of all the details of having a valid and syntactically correct JSON file. In the past it was a challenge to provide changes not only to the Docserv XML config, but also reflect these changes manually in the JSON.
With the help of docbuild, this tedious task becomes obsolete.
Possible Implementation
Clone the GL://susedoc/docserv-config.
Pick one JSON file from the
json-portal-dscfolder, for examplesles/16.0.json.Run
docbuildto generate the metadata:The result will be saved, for example, in
/var/cache/docbuild/doc-example-com/meta/sles/16.0.json.Compare the two files side-by-side. Either manually or by an appropriate tool (maybe https://jsondiff.com/?)
Differences can occur:
.documents. That should be fine.We need to collect the differences to ensure they are the same. They don't have to be byte-identical, but have the same structure, keys etc.
Relationship
See #155