def build()

in src/integ_test_resources/android/amplify/integration/cdk/scripts/api.py [0:0]


    def build(self):
        gql_schema = ""
        for entry in os.listdir(self.schema_dir):
            if os.path.isfile(os.path.join(self.schema_dir, entry)):
                with open(os.path.join(self.schema_dir, entry), "r") as text_file:
                    gql_schema += text_file.read() + "\n"
        api_config = {
            'version': 1
        }
        api_config_json_element_name = 'serviceModification' if self.is_update else 'serviceConfiguration'
        api_config[api_config_json_element_name] = {
            'serviceName': 'AppSync',
            'apiName': self.name,
            'transformSchema': gql_schema,
            'defaultAuthType': self.default_auth_mode,
            'additionalAuthTypes': list(self.additional_auth_modes.values())
        }
        return api_config