1- from conversion_strategies import convert_with_strategy_most_features_preserved , ConversionStrategy , \
1+ from conversion_strategies import ConversionStrategy , \
22 convert_with_strategy_least_character_loss
33from converter import (Converter , ConverterExternal , prepare_conversion_results_for_serializing )
44from schema_types import schema_language_from_string
1414
1515converters : List [Converter ] = register_converters ()
1616conversion_graph : Dict [str , List [Converter ]] = build_conversion_graph (converters )
17- # schema_languages_features: SchemaLanguagesFeatures = load_schema_language_features()
1817
1918print ("Started Schema Conversion Orchestrator with the following converters:" )
2019for conv in converters :
@@ -34,7 +33,6 @@ def register_conversion():
3433 data ["serviceAddress" ],
3534 data ["sourceFormat" ],
3635 data ["targetFormat" ],
37- data ["supportedFeatures" ]
3836 )
3937 converters .append (conv )
4038 global conversion_graph
@@ -65,10 +63,7 @@ def convert():
6563 if not all_paths :
6664 return {"error" : "No path found for conversion from source " + source + " to target " + target + "." }, 400
6765
68- if CONVERSION_STRATEGY == ConversionStrategy .MostFeaturesPreserved :
69- attempts = convert_with_strategy_most_features_preserved (
70- source , target , schema , all_paths )
71- elif CONVERSION_STRATEGY == ConversionStrategy .LeastCharacterLoss :
66+ if CONVERSION_STRATEGY == ConversionStrategy .LeastCharacterLoss :
7267 attempts = convert_with_strategy_least_character_loss (
7368 source , target , schema , all_paths )
7469 else :
0 commit comments