Skip to content

Commit

Permalink
add _processing property to Property type
Browse files Browse the repository at this point in the history
  • Loading branch information
Eiko Thomas committed Dec 13, 2022
1 parent 7a694ad commit 29b8452
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions createRandomData.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from yacg.builder.yamlBuilder import getModelFromYaml
import yacg.util.normalize_helper as normalizeHelper
import yacg.model.modelFuncs as modelFuncs
import yacg.model.random_config as randomConfig
from yacg.util.fileUtils import getFileExt


Expand Down Expand Up @@ -35,6 +36,15 @@ def _searchForTypesToGenerateAndProcessThem(args, loadedTypes):
pass


def _extendMetaModelWithRandomConfigTypes(args, loadedTypes):
for t in loadedTypes:
if t._processing is not None:
randomTypeConf = randomConfig.RandomDataTypeConf.initFromDict(t.processing)
t.processing = randomTypeConf
# TODO
pass


def main():
args = parser.parse_args()
if args.model is None:
Expand Down
4 changes: 2 additions & 2 deletions resources/models/json/yacg_model_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "yacg inner type model",
"description": "model types used internally to provide loaded models for the code generators",
"version": "5.6.4",
"version": "5.6.5",
"x-domain": "yacg.model.model",
"definitions": {
"Type": {
Expand Down Expand Up @@ -678,7 +678,7 @@
"description": "holds the original 'format' value from the schema",
"type": "string"
},
"xProcessing": {
"_processing": {
"description": "anchor to store codegen runtime data, for instance for the random data creation",
"type": "object"
}
Expand Down

0 comments on commit 29b8452

Please sign in to comment.