Skip to content

Commit

Permalink
fix: fix schema generator script for updating sourceSpecific field sc…
Browse files Browse the repository at this point in the history
…hema for tagInput
  • Loading branch information
ujjwal-ab committed Nov 10, 2023
1 parent f774dfd commit ae906a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/schemaGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,15 @@ def generate_schema_for_tag_input(field, dbConfig, schema_field_name):
}
tagItem['properties'] = tagItemProps
tagObject["items"] = tagItem
isSourceDependent = is_dest_field_dependent_on_source(field, dbConfig, schema_field_name)
if isSourceDependent:
tagObjectCopy = tagObject
tagObject = {}
tagObject = {"type": FieldTypeEnum.OBJECT.value}
tagObject["properties"] = {}
for sourceType in dbConfig["supportedSourceTypes"]:
if sourceType in dbConfig["destConfig"] and field[schema_field_name] in dbConfig["destConfig"][sourceType]:
tagObject["properties"][sourceType] = tagObjectCopy
return tagObject


Expand Down

0 comments on commit ae906a5

Please sign in to comment.