From 6bb9d53255aa2ceb5147acae48795136118e7f0f Mon Sep 17 00:00:00 2001 From: _sam <3804518+aahung@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:04:09 -0800 Subject: [PATCH] ci: Make transform test error json easier to diff/review (#2968) --- Makefile | 2 + bin/transform-test-error-json-format.py | 55 +++++++++++++++++++ .../error_api_auth_invalid_path_item.json | 6 ++ .../output/error_api_auth_null_path_item.json | 6 ++ ...ty_indentity_header_with_invalid_type.json | 8 +++ ..._property_indentity_with_invalid_type.json | 12 ++++ ...error_api_duplicate_methods_same_path.json | 7 +++ ...rror_api_event_import_vaule_reference.json | 7 +++ .../output/error_api_event_ref_http_api.json | 7 +++ .../error_api_event_ref_invalid_resource.json | 6 ++ .../output/error_api_event_ref_nothing.json | 7 +++ ...eway_responses_nonnumeric_status_code.json | 6 ++ ...ponses_responseparameter_invalid_type.json | 6 ++ ...y_responses_unknown_responseparameter.json | 6 ++ ...es_unknown_responseparameter_property.json | 6 ++ .../output/error_api_invalid_auth.json | 48 ++++++++++++++++ ...ror_api_invalid_auth_identity_cognito.json | 6 ++ ..._invalid_auth_identity_lambda_request.json | 6 ++ .../error_api_invalid_definitionbody.json | 6 ++ .../error_api_invalid_definitionuri.json | 8 +++ ...or_api_invalid_endpoint_configuration.json | 6 ++ ...alid_endpoint_configuration_openapi_3.json | 6 ++ ...ror_api_invalid_event_authorizer_type.json | 6 ++ .../error_api_invalid_fail_on_warnings.json | 6 ++ .../error_api_invalid_openapi_path.json | 6 ++ ...d_openapi_path_with_invalid_responses.json | 6 ++ ...id_openapi_path_with_string_responses.json | 6 ++ .../output/error_api_invalid_path.json | 6 ++ .../error_api_invalid_request_model.json | 18 ++++++ .../output/error_api_invalid_restapiid.json | 7 +++ .../output/error_api_invalid_security.json | 6 ++ ...rror_api_invalid_source_vpc_blacklist.json | 7 +++ ...rror_api_invalid_source_vpc_whitelist.json | 7 +++ .../output/error_api_invalid_stagename.json | 6 ++ .../output/error_api_invalid_usage_plan.json | 6 ++ ..._merge_definitions_with_definitionuri.json | 6 ++ ..._api_mtls_configuration_invalid_field.json | 6 ++ ...r_api_mtls_configuration_invalid_type.json | 6 ++ ...api_no_cors_invalid_openapi_null_path.json | 6 ++ ...i_no_cors_invalid_openapi_string_path.json | 6 ++ ...quest_model_with_intrinsics_validator.json | 13 +++++ ..._request_model_with_strings_validator.json | 7 +++ ...ation_with_condition_intrinsic_api_id.json | 7 +++ ...ion_with_find_in_map_intrinsic_api_id.json | 7 +++ ...egration_with_getatt_intrinsic_api_id.json | 7 +++ ...ntegration_with_join_intrinsic_api_id.json | 7 +++ ...egration_with_select_intrinsic_api_id.json | 7 +++ ...integration_with_sub_intrinsic_api_id.json | 7 +++ ...ation_with_transform_intrinsic_api_id.json | 7 +++ ..._api_with_cors_and_empty_allow_origin.json | 8 +++ ...error_api_with_custom_domains_invalid.json | 14 +++++ ...i_with_custom_domains_route53_invalid.json | 6 ++ ...h_custom_domains_route53_invalid_type.json | 6 ++ ...th_disable_api_execute_endpoint_false.json | 6 ++ ..._api_with_invalid_auth_scopes_openapi.json | 10 ++++ ...api_with_invalid_if_condition_swagger.json | 6 ++ ...ror_api_with_invalid_open_api_version.json | 6 ++ ...pi_with_invalid_open_api_version_type.json | 6 ++ ...error_api_with_models_of_invalid_type.json | 9 +++ ...api_with_usage_plan_invalid_parameter.json | 6 ++ .../error_application_does_not_exist.json | 6 ++ .../output/error_application_no_access.json | 10 ++++ .../error_application_preparing_timeout.json | 6 ++ .../output/error_application_properties.json | 23 ++++++++ ...error_auto_publish_alias_empty_string.json | 6 ++ .../error_cognito_trigger_invalid_type.json | 6 ++ ...or_cognito_userpool_duplicate_trigger.json | 7 +++ .../error_cognito_userpool_not_string.json | 7 +++ tests/translator/output/error_connector.json | 37 +++++++++++++ .../output/error_consumer_group_id.json | 9 +++ ...credentials_true_with_wildcard_origin.json | 6 ++ ...dentials_true_without_explicit_origin.json | 6 ++ .../error_cors_on_external_swagger.json | 6 ++ ...lt_authorizer_should_be_string_in_api.json | 8 +++ .../error_depends_on_invalid_types.json | 13 +++++ .../output/error_embedded_connectors.json | 49 +++++++++++++++++ .../output/error_event_filtering.json | 8 +++ .../error_existing_event_logical_id.json | 7 +++ .../error_existing_permission_logical_id.json | 7 +++ .../error_existing_role_logical_id.json | 7 +++ ...error_function_api_invalid_properties.json | 7 +++ ...r_function_fnsub_in_auto_publish_hash.json | 6 ++ .../error_function_invalid_api_event.json | 19 +++++++ ...ror_function_invalid_autopublishalias.json | 6 ++ ...nvalid_autopublishalias_allproperties.json | 6 ++ .../error_function_invalid_codeuri.json | 6 ++ .../error_function_invalid_event_api_ref.json | 7 +++ ...r_function_invalid_event_http_api_ref.json | 7 +++ .../error_function_invalid_event_type.json | 15 +++++ .../output/error_function_invalid_layer.json | 6 ++ ...r_function_invalid_request_parameters.json | 26 +++++++++ .../error_function_invalid_s3_event.json | 6 ++ .../output/error_function_no_codeuri.json | 6 ++ .../output/error_function_no_handler.json | 6 ++ .../output/error_function_no_imageuri.json | 6 ++ .../output/error_function_no_runtime.json | 6 ++ ...unction_policy_template_invalid_value.json | 6 ++ ...olicy_template_with_missing_parameter.json | 6 ++ .../error_function_with_api_key_false.json | 7 +++ ...n_with_cwe_both_dlq_property_provided.json | 7 +++ ...or_function_with_cwe_invalid_dlq_type.json | 7 +++ ...unction_with_cwe_missing_dlq_property.json | 7 +++ ..._deployment_preference_invalid_alarms.json | 6 ++ ...h_deployment_preference_missing_alias.json | 6 ++ ...through_condition_with_invalid_values.json | 8 +++ ...nt_bridge_rule_dlq_intrinsic_function.json | 7 +++ ...rror_function_with_event_dest_invalid.json | 6 ++ .../error_function_with_event_dest_type.json | 9 +++ ...rl_config_with_invalid_cors_parameter.json | 8 +++ ...with_invalid_cors_parameter_data_type.json | 6 ++ ...url_config_with_no_authorization_type.json | 7 +++ ..._function_with_invalid_condition_name.json | 6 ++ ...d_deployment_preference_hook_property.json | 6 ++ ...nction_with_invalid_dlq_property_type.json | 6 ++ ...nction_with_invalid_event_bridge_rule.json | 7 +++ ...with_invalid_event_destination_config.json | 10 ++++ ...valid_kms_type_for_self_managed_kafka.json | 7 +++ ...unction_with_invalid_policy_statement.json | 6 ++ ..._function_with_invalid_schedule_event.json | 7 +++ ..._invalid_stream_eventsource_dest_type.json | 7 +++ ...tion_with_method_auth_and_no_api_auth.json | 7 +++ ...ror_function_with_mq_kms_invalid_type.json | 7 +++ ...with_no_alias_provisioned_concurrency.json | 6 ++ ...n_with_schedue_dlq_intrinsic_function.json | 7 +++ ...h_schedule_both_dlq_property_provided.json | 7 +++ ...nction_with_schedule_invalid_dlq_type.json | 7 +++ ...on_with_schedule_missing_dlq_property.json | 7 +++ .../error_function_with_schedulev2.json | 13 +++++ ...function_with_unknown_policy_template.json | 6 ++ ...ror_gateway_response_invalid_type_int.json | 7 +++ ...teway_response_invalid_type_intrinsic.json | 6 ++ .../error_globals_api_with_stage_name.json | 7 +++ .../output/error_globals_is_not_dict.json | 6 ++ .../error_globals_unsupported_property.json | 7 +++ .../error_globals_unsupported_type.json | 7 +++ .../output/error_http_api_def_body_uri.json | 6 ++ .../error_http_api_event_invalid_api.json | 13 +++++ ...ror_http_api_event_multiple_same_path.json | 7 +++ .../output/error_http_api_invalid_auth.json | 23 ++++++++ .../error_http_api_invalid_basepath_type.json | 6 ++ ..._invalid_disable_execute_api_endpoint.json | 6 ++ ...ttp_api_invalid_event_authorizer_type.json | 10 ++++ .../error_http_api_invalid_lambda_auth.json | 8 +++ .../error_http_api_invalid_openapi.json | 8 +++ .../error_http_api_invalid_tags_format.json | 7 +++ .../output/error_http_api_null_method.json | 6 ++ .../output/error_http_api_tags.json | 6 ++ .../output/error_http_api_tags_def_uri.json | 6 ++ .../error_http_api_with_cors_def_uri.json | 6 ++ ...th_disable_api_execute_endpoint_false.json | 6 ++ ...nvalid_auth_while_method_auth_is_none.json | 8 +++ ...papi_mtls_configuration_invalid_field.json | 6 ++ ...tpapi_mtls_configuration_invalid_type.json | 6 ++ ...ror_implicit_http_api_auth_any_method.json | 6 ++ .../error_implicit_http_api_method.json | 7 +++ .../output/error_implicit_http_api_path.json | 7 +++ .../error_implicit_http_api_properties.json | 7 +++ .../output/error_intrinsic_sub_with_list.json | 7 +++ .../output/error_invalid_config_mq.json | 8 +++ .../output/error_invalid_cors_dict.json | 6 ++ ...valid_document_empty_semantic_version.json | 6 ++ .../output/error_invalid_findinmap.json | 7 +++ .../output/error_invalid_logical_id.json | 8 +++ .../error_invalid_mapping_by_findinmap.json | 6 ++ .../error_invalid_method_definition.json | 6 ++ .../output/error_invalid_properties.json | 6 ++ ...or_invalid_property_in_sac_documentdb.json | 8 +++ .../error_invalid_resource_parameters.json | 6 ++ ...ror_invalid_self_managed_kafka_config.json | 10 ++++ .../output/error_invalid_template.json | 6 ++ .../error_layer_invalid_properties.json | 21 +++++++ .../output/error_mappings_is_null.json | 6 ++ .../error_missing_basic_auth_in_mq.json | 7 +++ .../error_missing_basic_auth_uri_in_mq.json | 7 +++ .../output/error_missing_broker.json | 6 ++ ...otstrap_server_for_self_managed_kafka.json | 7 +++ .../output/error_missing_queue.json | 6 ++ .../output/error_missing_sac_in_mq.json | 7 +++ ...urce_access_configurations_documentdb.json | 7 +++ ...configurations_for_self_managed_kafka.json | 7 +++ .../error_missing_startingposition.json | 6 ++ .../output/error_missing_stream.json | 6 ++ ...missing_topics_for_self_managed_kafka.json | 7 +++ ...sk_invalid_sourceaccessconfigurations.json | 6 ++ ...h_mechanism_self_managed_kafka_config.json | 7 +++ .../error_multiple_basic_auth_documentdb.json | 7 +++ .../error_multiple_basic_auth_in_mq.json | 7 +++ .../error_multiple_resource_errors.json | 15 +++++ ...ultiple_topics_for_self_managed_kafka.json | 7 +++ ...ror_no_basic_auth_provided_documentdb.json | 8 +++ ...no_basic_auth_uri_provided_documentdb.json | 7 +++ .../output/error_null_application_id.json | 6 ++ .../output/error_null_method_definition.json | 6 ++ .../output/error_reserved_sam_tag.json | 10 ++++ .../output/error_resource_not_dict.json | 7 +++ .../error_resource_policy_not_dict.json | 6 ++ ...or_resource_policy_not_dict_empty_api.json | 6 ++ .../error_resource_properties_not_dict.json | 6 ++ .../error_s3_bucket_invalid_properties.json | 8 +++ ..._s3_lambda_configuration_invalid_type.json | 9 +++ .../output/error_s3_not_in_template.json | 7 +++ ...rror_schema_validation_wrong_property.json | 6 ++ .../error_schema_validation_wrong_type.json | 6 ++ .../output/error_sns_intrinsics.json | 7 +++ .../output/error_sns_not_in_template.json | 7 +++ ...error_state_machine_definition_string.json | 6 ++ ...error_state_machine_invalid_s3_object.json | 6 ++ ...error_state_machine_invalid_s3_string.json | 6 ++ .../error_state_machine_schedulev2.json | 9 +++ ...rror_state_machine_with_api_auth_none.json | 6 ++ ...ror_state_machine_with_api_intrinsics.json | 6 ++ ...e_with_cwe_both_dlq_property_provided.json | 6 ++ ...ate_machine_with_cwe_invalid_dlq_type.json | 6 ++ ...machine_with_cwe_missing_dlq_property.json | 6 ++ ...h_eb_dlq_generated_intrinsic_function.json | 6 ++ ...chine_with_invalid_default_authorizer.json | 6 ++ ...e_machine_with_invalid_schedule_event.json | 6 ++ ...state_machine_with_no_api_authorizers.json | 6 ++ ...h_schedule_both_dlq_property_provided.json | 6 ++ ...dule_dlq_generated_intrinsic_function.json | 6 ++ ...achine_with_schedule_invalid_dlq_type.json | 6 ++ ...ne_with_schedule_missing_dlq_property.json | 6 ++ ...machine_with_undefined_api_authorizer.json | 6 ++ ...swagger_security_definitions_not_dict.json | 6 ++ .../error_swagger_security_not_dict.json | 6 ++ ...curity_not_dict_with_api_key_required.json | 6 ++ .../error_table_invalid_attributetype.json | 6 ++ .../error_table_primary_key_missing_name.json | 6 ++ .../error_table_primary_key_missing_type.json | 6 ++ 229 files changed, 1824 insertions(+) create mode 100755 bin/transform-test-error-json-format.py diff --git a/Makefile b/Makefile index d88f5dd7b..1cfe80916 100755 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ integ-test: black: black setup.py samtranslator tests integration bin schema_source + bin/transform-test-error-json-format.py --write tests/translator/output/error_*.json bin/json-format.py --write tests integration samtranslator/policy_templates_data bin/yaml-format.py --write tests bin/yaml-format.py --write integration --add-test-metadata @@ -30,6 +31,7 @@ black-check: diff -u schema_source/sam.schema.json .tmp/sam.schema.json diff -u samtranslator/schema/schema.json .tmp/schema.json black --check setup.py samtranslator tests integration bin schema_source + bin/transform-test-error-json-format.py --check tests/translator/output/error_*.json bin/json-format.py --check tests integration samtranslator/policy_templates_data bin/yaml-format.py --check tests bin/yaml-format.py --check integration --add-test-metadata diff --git a/bin/transform-test-error-json-format.py b/bin/transform-test-error-json-format.py new file mode 100755 index 000000000..f50d16022 --- /dev/null +++ b/bin/transform-test-error-json-format.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +""" +Transform test error JSON file formatter (without prettier). + +It makes error json easier to review by breaking down "errorMessage" +into list of strings (delimiter: ". "). +""" +import os +import sys + +from typing_extensions import Final + +my_path = os.path.dirname(os.path.abspath(__file__)) +sys.path.insert(0, my_path + "/..") + +import json +from typing import Type + +from bin._file_formatter import FileFormatter + + +class TransformTestErrorJSONFormatter(FileFormatter): + _ERROR_MESSAGE_KEY: Final[str] = "errorMessage" + _BREAKDOWN_ERROR_MESSAGE_KEY: Final[str] = "_autoGeneratedBreakdownErrorMessage" + _DELIMITER: Final[str] = ". " + + @staticmethod + def description() -> str: + return "Transform test error JSON file formatter" + + def format_str(self, input_str: str) -> str: + """ + It makes error json easier to review by breaking down "errorMessage" + into list of strings (delimiter: ". "). + """ + obj = json.loads(input_str) + error_message = obj.get(self._ERROR_MESSAGE_KEY) + if isinstance(error_message, str): + tokens = error_message.split(self._DELIMITER) + obj[self._BREAKDOWN_ERROR_MESSAGE_KEY] = [ + token if index == len(tokens) - 1 else token + self._DELIMITER for index, token in enumerate(tokens) + ] + return json.dumps(obj, indent=2, sort_keys=True) + "\n" + + @staticmethod + def decode_exception() -> Type[Exception]: + return json.JSONDecodeError + + @staticmethod + def file_extension() -> str: + return ".json" + + +if __name__ == "__main__": + TransformTestErrorJSONFormatter.main() diff --git a/tests/translator/output/error_api_auth_invalid_path_item.json b/tests/translator/output/error_api_auth_invalid_path_item.json index 319c42351..a7d650f59 100644 --- a/tests/translator/output/error_api_auth_invalid_path_item.json +++ b/tests/translator/output/error_api_auth_invalid_path_item.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_auth_null_path_item.json b/tests/translator/output/error_api_auth_null_path_item.json index 319c42351..a7d650f59 100644 --- a/tests/translator/output/error_api_auth_null_path_item.json +++ b/tests/translator/output/error_api_auth_null_path_item.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_authorizer_property_indentity_header_with_invalid_type.json b/tests/translator/output/error_api_authorizer_property_indentity_header_with_invalid_type.json index 234e73ab0..c4a685f7f 100644 --- a/tests/translator/output/error_api_authorizer_property_indentity_header_with_invalid_type.json +++ b/tests/translator/output/error_api_authorizer_property_indentity_header_with_invalid_type.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Authorizers.MyLambdaAuthUpdated.Identity.Headers[0]' should be a string. ", + "Resource with id [MyApi2] is invalid. ", + "Property 'Authorizers.MyLambdaAuthUpdated.Identity.QueryStrings' should be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApi] is invalid. Property 'Authorizers.MyLambdaAuthUpdated.Identity.Headers[0]' should be a string. Resource with id [MyApi2] is invalid. Property 'Authorizers.MyLambdaAuthUpdated.Identity.QueryStrings' should be a list." } diff --git a/tests/translator/output/error_api_authorizer_property_indentity_with_invalid_type.json b/tests/translator/output/error_api_authorizer_property_indentity_with_invalid_type.json index 674b9a704..6aa2790b7 100644 --- a/tests/translator/output/error_api_authorizer_property_indentity_with_invalid_type.json +++ b/tests/translator/output/error_api_authorizer_property_indentity_with_invalid_type.json @@ -1,3 +1,15 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 4. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Auth.Authorizers.MyLambdaAuthUpdated.Identity' should be a map. ", + "Resource with id [MyRestApi] is invalid. ", + "Property 'Authorizer.LambdaRequestIdentityNotObject.Identity' should be a map. ", + "Resource with id [MyRestApiInvalidHeadersItemType] is invalid. ", + "Property 'Auth.Authorizers.LambdaRequestIdentityNotObject.Identity.Headers[1]' should be a string. ", + "Resource with id [MyRestApiInvalidHeadersType] is invalid. ", + "Property 'Auth.Authorizers.LambdaRequestIdentityNotObject.Identity.Headers' should be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 4. Resource with id [MyApi] is invalid. Property 'Auth.Authorizers.MyLambdaAuthUpdated.Identity' should be a map. Resource with id [MyRestApi] is invalid. Property 'Authorizer.LambdaRequestIdentityNotObject.Identity' should be a map. Resource with id [MyRestApiInvalidHeadersItemType] is invalid. Property 'Auth.Authorizers.LambdaRequestIdentityNotObject.Identity.Headers[1]' should be a string. Resource with id [MyRestApiInvalidHeadersType] is invalid. Property 'Auth.Authorizers.LambdaRequestIdentityNotObject.Identity.Headers' should be a list." } diff --git a/tests/translator/output/error_api_duplicate_methods_same_path.json b/tests/translator/output/error_api_duplicate_methods_same_path.json index 9fff8aaaa..735d4ffba 100644 --- a/tests/translator/output/error_api_duplicate_methods_same_path.json +++ b/tests/translator/output/error_api_duplicate_methods_same_path.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function2] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "API method \"post\" defined multiple times for path \"/add\"." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function2] is invalid. Event with id [GetHtml] is invalid. API method \"post\" defined multiple times for path \"/add\".", "errors": [ { diff --git a/tests/translator/output/error_api_event_import_vaule_reference.json b/tests/translator/output/error_api_event_import_vaule_reference.json index 5199cc9bd..2f3e089c7 100644 --- a/tests/translator/output/error_api_event_import_vaule_reference.json +++ b/tests/translator/output/error_api_event_import_vaule_reference.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_event_ref_http_api.json b/tests/translator/output/error_api_event_ref_http_api.json index 1b455d998..c766d164e 100644 --- a/tests/translator/output/error_api_event_ref_http_api.json +++ b/tests/translator/output/error_api_event_ref_http_api.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "Event with id [Event1] is invalid. ", + "RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Event with id [Event1] is invalid. RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template." } diff --git a/tests/translator/output/error_api_event_ref_invalid_resource.json b/tests/translator/output/error_api_event_ref_invalid_resource.json index fb38771a3..fb03ed854 100644 --- a/tests/translator/output/error_api_event_ref_invalid_resource.json +++ b/tests/translator/output/error_api_event_ref_invalid_resource.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [RestApi] is invalid. ", + "Attribute 'Properties' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [RestApi] is invalid. Attribute 'Properties' should be a map." } diff --git a/tests/translator/output/error_api_event_ref_nothing.json b/tests/translator/output/error_api_event_ref_nothing.json index 1b455d998..c766d164e 100644 --- a/tests/translator/output/error_api_event_ref_nothing.json +++ b/tests/translator/output/error_api_event_ref_nothing.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "Event with id [Event1] is invalid. ", + "RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Event with id [Event1] is invalid. RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template." } diff --git a/tests/translator/output/error_api_gateway_responses_nonnumeric_status_code.json b/tests/translator/output/error_api_gateway_responses_nonnumeric_status_code.json index 2465346b8..80805c692 100644 --- a/tests/translator/output/error_api_gateway_responses_nonnumeric_status_code.json +++ b/tests/translator/output/error_api_gateway_responses_nonnumeric_status_code.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Property 'StatusCode' must be numeric" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Property 'StatusCode' must be numeric" } diff --git a/tests/translator/output/error_api_gateway_responses_responseparameter_invalid_type.json b/tests/translator/output/error_api_gateway_responses_responseparameter_invalid_type.json index 32a561aad..7cd40811d 100644 --- a/tests/translator/output/error_api_gateway_responses_responseparameter_invalid_type.json +++ b/tests/translator/output/error_api_gateway_responses_responseparameter_invalid_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Property 'GatewayResponses.UNAUTHORIZED.ResponseParameters' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Property 'GatewayResponses.UNAUTHORIZED.ResponseParameters' should be a map." } diff --git a/tests/translator/output/error_api_gateway_responses_unknown_responseparameter.json b/tests/translator/output/error_api_gateway_responses_unknown_responseparameter.json index ae31d40a2..21d6567c5 100644 --- a/tests/translator/output/error_api_gateway_responses_unknown_responseparameter.json +++ b/tests/translator/output/error_api_gateway_responses_unknown_responseparameter.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Invalid gateway response parameter 'Footers'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Invalid gateway response parameter 'Footers'" } diff --git a/tests/translator/output/error_api_gateway_responses_unknown_responseparameter_property.json b/tests/translator/output/error_api_gateway_responses_unknown_responseparameter_property.json index 061d578c0..50f33b477 100644 --- a/tests/translator/output/error_api_gateway_responses_unknown_responseparameter_property.json +++ b/tests/translator/output/error_api_gateway_responses_unknown_responseparameter_property.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Invalid property 'SubStatusCode' in 'GatewayResponses' property 'UNAUTHORIZED'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Invalid property 'SubStatusCode' in 'GatewayResponses' property 'UNAUTHORIZED'." } diff --git a/tests/translator/output/error_api_invalid_auth.json b/tests/translator/output/error_api_invalid_auth.json index 2c342674d..7a56c6f8e 100644 --- a/tests/translator/output/error_api_invalid_auth.json +++ b/tests/translator/output/error_api_invalid_auth.json @@ -1,3 +1,51 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 20. ", + "Resource with id [AuthNotDictApi] is invalid. ", + "Property 'Auth' should be a map. ", + "Resource with id [AuthWithAdditionalPropertyApi] is invalid. ", + "Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. ", + "Auth works only with inline Swagger specified in 'DefinitionBody' property. ", + "Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. ", + "Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. ", + "Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. ", + "Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. ", + "Resource with id [AuthorizerNotDict] is invalid. ", + "Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. ", + "Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. ", + "Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. ", + "Resource with id [AuthorizersNotDictApi] is invalid. ", + "Property 'Auth.Authorizers' should be a map. ", + "Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. ", + "Property 'Auth.DefaultAuthorizer' should be a string. ", + "Resource with id [InvalidFunctionPayloadTypeApi] is invalid. ", + "MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. ", + "Resource with id [MissingAuthorizerFn] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. ", + "Resource with id [NoApiAuthorizerFn] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. ", + "Resource with id [NoAuthFn] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. ", + "Resource with id [NoAuthorizersFn] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. ", + "Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. ", + "Resource with id [NoIdentityOnRequestAuthorizer] is invalid. ", + "MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. ", + "Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. ", + "MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. ", + "Resource with id [NonDictAuthorizerApi] is invalid. ", + "Property 'Auth.Authorizers.MyAuth' should be a map. ", + "Resource with id [NonDictAuthorizerRestApi] is invalid. ", + "Property 'Auth.Authorizers.MyAuth' should be a map. ", + "Resource with id [NonStringDefaultAuthorizerApi] is invalid. ", + "Property 'Auth.DefaultAuthorizer' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 20. Resource with id [AuthNotDictApi] is invalid. Property 'Auth' should be a map. Resource with id [AuthWithAdditionalPropertyApi] is invalid. Invalid value for 'Auth' property Resource with id [AuthWithDefinitionUriApi] is invalid. Auth works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [AuthWithInvalidDefinitionBodyApi] is invalid. Unable to add Auth configuration because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [AuthWithMissingDefaultAuthorizerApi] is invalid. Unable to set DefaultAuthorizer because 'NotThere' was not defined in 'Authorizers'. Resource with id [AuthorizerNotDict] is invalid. Property 'Auth.Authorizers.MyCognitoAuthorizer' should be a map. Resource with id [AuthorizerWithBadDisableFunctionDefaultPermissionsType] is invalid. Property 'Authorizers.MyAuth.DisableFunctionDefaultPermissions' should be a boolean. Resource with id [AuthorizersNotDictApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [IntrinsicDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string. Resource with id [InvalidFunctionPayloadTypeApi] is invalid. MyLambdaAuthorizer Authorizer has invalid 'FunctionPayloadType': INVALID. Resource with id [MissingAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [UnspecifiedAuthorizer] on API method [get] for path [/] because it wasn't defined in the API's Authorizers. Resource with id [NoApiAuthorizerFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoAuthorizersFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [MyAuth] on API method [get] for path [/] because the related API does not define any Authorizers. Resource with id [NoDefaultAuthorizerWithNoneFn] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer on API method [get] for path [/] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [NoIdentityOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NoIdentitySourceOnRequestAuthorizer] is invalid. MyLambdaRequestAuthorizer Authorizer must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. Resource with id [NonDictAuthorizerApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonDictAuthorizerRestApi] is invalid. Property 'Auth.Authorizers.MyAuth' should be a map. Resource with id [NonStringDefaultAuthorizerApi] is invalid. Property 'Auth.DefaultAuthorizer' should be a string." } diff --git a/tests/translator/output/error_api_invalid_auth_identity_cognito.json b/tests/translator/output/error_api_invalid_auth_identity_cognito.json index a18cdd3ad..beacd9ad1 100644 --- a/tests/translator/output/error_api_invalid_auth_identity_cognito.json +++ b/tests/translator/output/error_api_invalid_auth_identity_cognito.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ServerlessApi] is invalid. ", + "Auth.Authorizers..Identity must be a dict (LambdaTokenAuthorizationIdentity, LambdaRequestAuthorizationIdentity or CognitoAuthorizationIdentity)." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ServerlessApi] is invalid. Auth.Authorizers..Identity must be a dict (LambdaTokenAuthorizationIdentity, LambdaRequestAuthorizationIdentity or CognitoAuthorizationIdentity).", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_auth_identity_lambda_request.json b/tests/translator/output/error_api_invalid_auth_identity_lambda_request.json index a18cdd3ad..beacd9ad1 100644 --- a/tests/translator/output/error_api_invalid_auth_identity_lambda_request.json +++ b/tests/translator/output/error_api_invalid_auth_identity_lambda_request.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ServerlessApi] is invalid. ", + "Auth.Authorizers..Identity must be a dict (LambdaTokenAuthorizationIdentity, LambdaRequestAuthorizationIdentity or CognitoAuthorizationIdentity)." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ServerlessApi] is invalid. Auth.Authorizers..Identity must be a dict (LambdaTokenAuthorizationIdentity, LambdaRequestAuthorizationIdentity or CognitoAuthorizationIdentity).", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_definitionbody.json b/tests/translator/output/error_api_invalid_definitionbody.json index 01c86b45b..28b82ee17 100644 --- a/tests/translator/output/error_api_invalid_definitionbody.json +++ b/tests/translator/output/error_api_invalid_definitionbody.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiWithInvalidBodyType] is invalid. ", + "Property 'DefinitionBody' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiWithInvalidBodyType] is invalid. Property 'DefinitionBody' should be a map." } diff --git a/tests/translator/output/error_api_invalid_definitionuri.json b/tests/translator/output/error_api_invalid_definitionuri.json index 6c9ccad1f..72719a099 100644 --- a/tests/translator/output/error_api_invalid_definitionuri.json +++ b/tests/translator/output/error_api_invalid_definitionuri.json @@ -1,4 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [Api] is invalid. ", + "'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. ", + "Resource with id [ApiWithBodyAndDefinitionUri] is invalid. ", + "Specify either 'DefinitionUri' or 'DefinitionBody' property and not both." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [Api] is invalid. 'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [ApiWithBodyAndDefinitionUri] is invalid. Specify either 'DefinitionUri' or 'DefinitionBody' property and not both.", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_endpoint_configuration.json b/tests/translator/output/error_api_invalid_endpoint_configuration.json index be88a41b3..4ec505dcb 100644 --- a/tests/translator/output/error_api_invalid_endpoint_configuration.json +++ b/tests/translator/output/error_api_invalid_endpoint_configuration.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Invalid OpenAPI definition: The value of 'x-amazon-apigateway-endpoint-configuration' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Invalid OpenAPI definition: The value of 'x-amazon-apigateway-endpoint-configuration' should be a map." } diff --git a/tests/translator/output/error_api_invalid_endpoint_configuration_openapi_3.json b/tests/translator/output/error_api_invalid_endpoint_configuration_openapi_3.json index d96d308b2..3f0b05d7f 100644 --- a/tests/translator/output/error_api_invalid_endpoint_configuration_openapi_3.json +++ b/tests/translator/output/error_api_invalid_endpoint_configuration_openapi_3.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Invalid OpenAPI definition of 'servers[0]': The value of 'x-amazon-apigateway-endpoint-configuration' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Invalid OpenAPI definition of 'servers[0]': The value of 'x-amazon-apigateway-endpoint-configuration' should be a map." } diff --git a/tests/translator/output/error_api_invalid_event_authorizer_type.json b/tests/translator/output/error_api_invalid_event_authorizer_type.json index 172d2d128..97ec7f647 100644 --- a/tests/translator/output/error_api_invalid_event_authorizer_type.json +++ b/tests/translator/output/error_api_invalid_event_authorizer_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [AuthorizedApi] is invalid. ", + "Property 'Auth.Authorizers' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [AuthorizedApi] is invalid. Property 'Auth.Authorizers' should be a map." } diff --git a/tests/translator/output/error_api_invalid_fail_on_warnings.json b/tests/translator/output/error_api_invalid_fail_on_warnings.json index 3999eec81..1c2645237 100644 --- a/tests/translator/output/error_api_invalid_fail_on_warnings.json +++ b/tests/translator/output/error_api_invalid_fail_on_warnings.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiGatewayApi] is invalid. ", + "Type of property 'FailOnWarnings' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiGatewayApi] is invalid. Type of property 'FailOnWarnings' is invalid.", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_openapi_path.json b/tests/translator/output/error_api_invalid_openapi_path.json index 54228b95b..a315977d4 100644 --- a/tests/translator/output/error_api_invalid_openapi_path.json +++ b/tests/translator/output/error_api_invalid_openapi_path.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/foo' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/foo' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_invalid_openapi_path_with_invalid_responses.json b/tests/translator/output/error_api_invalid_openapi_path_with_invalid_responses.json index 81b00be1a..0f5a220b8 100644 --- a/tests/translator/output/error_api_invalid_openapi_path_with_invalid_responses.json +++ b/tests/translator/output/error_api_invalid_openapi_path_with_invalid_responses.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of response's headers in options method for path /foo must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of response's headers in options method for path /foo must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_invalid_openapi_path_with_string_responses.json b/tests/translator/output/error_api_invalid_openapi_path_with_string_responses.json index f44b8ff79..8728f8f25 100644 --- a/tests/translator/output/error_api_invalid_openapi_path_with_string_responses.json +++ b/tests/translator/output/error_api_invalid_openapi_path_with_string_responses.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Invalid responses in options method for path /foo: It should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Invalid responses in options method for path /foo: It should be a map." } diff --git a/tests/translator/output/error_api_invalid_path.json b/tests/translator/output/error_api_invalid_path.json index 54228b95b..a315977d4 100644 --- a/tests/translator/output/error_api_invalid_path.json +++ b/tests/translator/output/error_api_invalid_path.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/foo' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/foo' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_invalid_request_model.json b/tests/translator/output/error_api_invalid_request_model.json index e015f1b5e..457655181 100644 --- a/tests/translator/output/error_api_invalid_request_model.json +++ b/tests/translator/output/error_api_invalid_request_model.json @@ -1,3 +1,21 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 6. ", + "Resource with id [MissingModelFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set RequestModel [UnspecifiedModel] on API method [get] for path [/] because it wasn't defined in the API's Models. ", + "Resource with id [ModelIsNotString] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set RequestModel [['NotString']] on API method [get] for path [/] because the related API does not contain valid Models. ", + "Resource with id [ModelsNotDictApi] is invalid. ", + "Invalid value for 'Models' property Resource with id [ModelsWithDefinitionUrlApi] is invalid. ", + "Models works only with inline Swagger specified in 'DefinitionBody' property. ", + "Resource with id [ModelsWithInvalidDefinitionBodyApi] is invalid. ", + "Unable to add Models definitions because 'DefinitionBody' does not contain a valid Swagger definition. ", + "Resource with id [NoModelFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set RequestModel [User] on API method [get] for path [/] because the related API does not define any Models." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 6. Resource with id [MissingModelFunction] is invalid. Event with id [GetHtml] is invalid. Unable to set RequestModel [UnspecifiedModel] on API method [get] for path [/] because it wasn't defined in the API's Models. Resource with id [ModelIsNotString] is invalid. Event with id [GetHtml] is invalid. Unable to set RequestModel [['NotString']] on API method [get] for path [/] because the related API does not contain valid Models. Resource with id [ModelsNotDictApi] is invalid. Invalid value for 'Models' property Resource with id [ModelsWithDefinitionUrlApi] is invalid. Models works only with inline Swagger specified in 'DefinitionBody' property. Resource with id [ModelsWithInvalidDefinitionBodyApi] is invalid. Unable to add Models definitions because 'DefinitionBody' does not contain a valid Swagger definition. Resource with id [NoModelFunction] is invalid. Event with id [GetHtml] is invalid. Unable to set RequestModel [User] on API method [get] for path [/] because the related API does not define any Models." } diff --git a/tests/translator/output/error_api_invalid_restapiid.json b/tests/translator/output/error_api_invalid_restapiid.json index ac03db210..81d75aa4e 100644 --- a/tests/translator/output/error_api_invalid_restapiid.json +++ b/tests/translator/output/error_api_invalid_restapiid.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [FunctionWithNonExistentApiReference] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [FunctionWithNonExistentApiReference] is invalid. Event with id [GetHtml] is invalid. RestApiId must be a valid reference to an 'AWS::Serverless::Api' resource in same template.", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_security.json b/tests/translator/output/error_api_invalid_security.json index 643592a61..9f5fce406 100644 --- a/tests/translator/output/error_api_invalid_security.json +++ b/tests/translator/output/error_api_invalid_security.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Type of security for path /test method get must be a list" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Type of security for path /test method get must be a list" } diff --git a/tests/translator/output/error_api_invalid_source_vpc_blacklist.json b/tests/translator/output/error_api_invalid_source_vpc_blacklist.json index 5ea296452..26681064b 100644 --- a/tests/translator/output/error_api_invalid_source_vpc_blacklist.json +++ b/tests/translator/output/error_api_invalid_source_vpc_blacklist.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "SourceVpcBlacklist must be a list of strings. ", + "Use IntrinsicVpcBlacklist instead for values that use Intrinsic Functions" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. SourceVpcBlacklist must be a list of strings. Use IntrinsicVpcBlacklist instead for values that use Intrinsic Functions" } diff --git a/tests/translator/output/error_api_invalid_source_vpc_whitelist.json b/tests/translator/output/error_api_invalid_source_vpc_whitelist.json index 6553006ee..a33a28ba9 100644 --- a/tests/translator/output/error_api_invalid_source_vpc_whitelist.json +++ b/tests/translator/output/error_api_invalid_source_vpc_whitelist.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "SourceVpcWhitelist must be a list of strings. ", + "Use IntrinsicVpcWhitelist instead for values that use Intrinsic Functions" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. SourceVpcWhitelist must be a list of strings. Use IntrinsicVpcWhitelist instead for values that use Intrinsic Functions" } diff --git a/tests/translator/output/error_api_invalid_stagename.json b/tests/translator/output/error_api_invalid_stagename.json index 89002f58a..4c5d50811 100644 --- a/tests/translator/output/error_api_invalid_stagename.json +++ b/tests/translator/output/error_api_invalid_stagename.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiWithEmptyStageName] is invalid. ", + "StageName cannot be empty." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiWithEmptyStageName] is invalid. StageName cannot be empty.", "errors": [ { diff --git a/tests/translator/output/error_api_invalid_usage_plan.json b/tests/translator/output/error_api_invalid_usage_plan.json index ba66f8848..1bd47dafc 100644 --- a/tests/translator/output/error_api_invalid_usage_plan.json +++ b/tests/translator/output/error_api_invalid_usage_plan.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApiWithCognitoAuth] is invalid. ", + "'UsagePlan' must be a dictionary" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApiWithCognitoAuth] is invalid. 'UsagePlan' must be a dictionary", "errors": [ { diff --git a/tests/translator/output/error_api_merge_definitions_with_definitionuri.json b/tests/translator/output/error_api_merge_definitions_with_definitionuri.json index d145479e2..d026df945 100644 --- a/tests/translator/output/error_api_merge_definitions_with_definitionuri.json +++ b/tests/translator/output/error_api_merge_definitions_with_definitionuri.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Cannot set 'MergeDefinitions' to True when using `DefinitionUri`." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Cannot set 'MergeDefinitions' to True when using `DefinitionUri`." } diff --git a/tests/translator/output/error_api_mtls_configuration_invalid_field.json b/tests/translator/output/error_api_mtls_configuration_invalid_field.json index ada5b36f3..a55ecaec0 100644 --- a/tests/translator/output/error_api_mtls_configuration_invalid_field.json +++ b/tests/translator/output/error_api_mtls_configuration_invalid_field.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Available Domain.MutualTlsAuthentication fields are ['TruststoreUri', 'TruststoreVersion']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Available Domain.MutualTlsAuthentication fields are ['TruststoreUri', 'TruststoreVersion']." } diff --git a/tests/translator/output/error_api_mtls_configuration_invalid_type.json b/tests/translator/output/error_api_mtls_configuration_invalid_type.json index faaa84649..442629731 100644 --- a/tests/translator/output/error_api_mtls_configuration_invalid_type.json +++ b/tests/translator/output/error_api_mtls_configuration_invalid_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Domain.MutualTlsAuthentication' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Property 'Domain.MutualTlsAuthentication' should be a map." } diff --git a/tests/translator/output/error_api_no_cors_invalid_openapi_null_path.json b/tests/translator/output/error_api_no_cors_invalid_openapi_null_path.json index 54228b95b..a315977d4 100644 --- a/tests/translator/output/error_api_no_cors_invalid_openapi_null_path.json +++ b/tests/translator/output/error_api_no_cors_invalid_openapi_null_path.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/foo' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/foo' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_no_cors_invalid_openapi_string_path.json b/tests/translator/output/error_api_no_cors_invalid_openapi_string_path.json index 54228b95b..a315977d4 100644 --- a/tests/translator/output/error_api_no_cors_invalid_openapi_string_path.json +++ b/tests/translator/output/error_api_no_cors_invalid_openapi_string_path.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of '/foo' path must be a dictionary according to Swagger spec." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of '/foo' path must be a dictionary according to Swagger spec." } diff --git a/tests/translator/output/error_api_request_model_with_intrinsics_validator.json b/tests/translator/output/error_api_request_model_with_intrinsics_validator.json index c51ae4c45..2f2ea7b4b 100644 --- a/tests/translator/output/error_api_request_model_with_intrinsics_validator.json +++ b/tests/translator/output/error_api_request_model_with_intrinsics_validator.json @@ -1,3 +1,16 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set Validator to RequestModel [User] on API method [get] for path [/] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported. ", + "Resource with id [HtmlFunctionNoValue] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set Validator to RequestModel [User] on API method [get] for path [/novalue] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported. ", + "Resource with id [HtmlFunctionWithIfIntrinsics] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set Validator to RequestModel [User] on API method [get] for path [/if/intrinics] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Unable to set Validator to RequestModel [User] on API method [get] for path [/] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported. Resource with id [HtmlFunctionNoValue] is invalid. Event with id [GetHtml] is invalid. Unable to set Validator to RequestModel [User] on API method [get] for path [/novalue] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported. Resource with id [HtmlFunctionWithIfIntrinsics] is invalid. Event with id [GetHtml] is invalid. Unable to set Validator to RequestModel [User] on API method [get] for path [/if/intrinics] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported." } diff --git a/tests/translator/output/error_api_request_model_with_strings_validator.json b/tests/translator/output/error_api_request_model_with_strings_validator.json index 92b765259..b283ef6b6 100644 --- a/tests/translator/output/error_api_request_model_with_strings_validator.json +++ b/tests/translator/output/error_api_request_model_with_strings_validator.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Unable to set Validator to RequestModel [User] on API method [get] for path [/] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Unable to set Validator to RequestModel [User] on API method [get] for path [/] ValidateBody and ValidateParameters must be a boolean type, strings or intrinsics are not supported." } diff --git a/tests/translator/output/error_api_swagger_integration_with_condition_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_condition_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_condition_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_condition_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_find_in_map_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_find_in_map_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_find_in_map_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_find_in_map_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_getatt_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_getatt_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_getatt_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_getatt_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_join_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_join_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_join_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_join_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_select_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_select_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_select_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_select_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_sub_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_sub_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_sub_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_sub_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_swagger_integration_with_transform_intrinsic_api_id.json b/tests/translator/output/error_api_swagger_integration_with_transform_intrinsic_api_id.json index 217216708..9ec98e1c1 100644 --- a/tests/translator/output/error_api_swagger_integration_with_transform_intrinsic_api_id.json +++ b/tests/translator/output/error_api_swagger_integration_with_transform_intrinsic_api_id.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HtmlFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HtmlFunction] is invalid. Event with id [GetHtml] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_api_with_cors_and_empty_allow_origin.json b/tests/translator/output/error_api_with_cors_and_empty_allow_origin.json index 1febed40c..cec345852 100644 --- a/tests/translator/output/error_api_with_cors_and_empty_allow_origin.json +++ b/tests/translator/output/error_api_with_cors_and_empty_allow_origin.json @@ -1,4 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Structure of the SAM template is invalid. ", + "Invalid input. ", + "Value for AllowedOrigins is required" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Structure of the SAM template is invalid. Invalid input. Value for AllowedOrigins is required", "errors": [ { diff --git a/tests/translator/output/error_api_with_custom_domains_invalid.json b/tests/translator/output/error_api_with_custom_domains_invalid.json index 51c260d6d..0b40e1291 100644 --- a/tests/translator/output/error_api_with_custom_domains_invalid.json +++ b/tests/translator/output/error_api_with_custom_domains_invalid.json @@ -1,3 +1,17 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 5. ", + "Resource with id [MyApi] is invalid. ", + "EndpointConfiguration for Custom Domains must be one of ['EDGE', 'REGIONAL', 'PRIVATE']. ", + "Resource with id [MyApiInvalidDomainType] is invalid. ", + "Property 'Domain' should be a map. ", + "Resource with id [MyApiMissingCertificateArn] is invalid. ", + "Property 'Domain.CertificateArn' is required. ", + "Resource with id [MyApiWithIncorrectBasePathItemType] is invalid. ", + "Property 'Domain.BasePath[0]' should be a string. ", + "Resource with id [ServerlessRestApi] is invalid. ", + "Property 'Domain.DomainName' is required." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 5. Resource with id [MyApi] is invalid. EndpointConfiguration for Custom Domains must be one of ['EDGE', 'REGIONAL', 'PRIVATE']. Resource with id [MyApiInvalidDomainType] is invalid. Property 'Domain' should be a map. Resource with id [MyApiMissingCertificateArn] is invalid. Property 'Domain.CertificateArn' is required. Resource with id [MyApiWithIncorrectBasePathItemType] is invalid. Property 'Domain.BasePath[0]' should be a string. Resource with id [ServerlessRestApi] is invalid. Property 'Domain.DomainName' is required." } diff --git a/tests/translator/output/error_api_with_custom_domains_route53_invalid.json b/tests/translator/output/error_api_with_custom_domains_route53_invalid.json index e76c49b31..d8d7ce78c 100644 --- a/tests/translator/output/error_api_with_custom_domains_route53_invalid.json +++ b/tests/translator/output/error_api_with_custom_domains_route53_invalid.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "HostedZoneId or HostedZoneName is required to enable Route53 support on Custom Domains." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. HostedZoneId or HostedZoneName is required to enable Route53 support on Custom Domains.", "errors": [ { diff --git a/tests/translator/output/error_api_with_custom_domains_route53_invalid_type.json b/tests/translator/output/error_api_with_custom_domains_route53_invalid_type.json index 64290a1f3..5c917059c 100644 --- a/tests/translator/output/error_api_with_custom_domains_route53_invalid_type.json +++ b/tests/translator/output/error_api_with_custom_domains_route53_invalid_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Domain.Route53' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Property 'Domain.Route53' should be a map." } diff --git a/tests/translator/output/error_api_with_disable_api_execute_endpoint_false.json b/tests/translator/output/error_api_with_disable_api_execute_endpoint_false.json index 822bd5c17..5d218256f 100644 --- a/tests/translator/output/error_api_with_disable_api_execute_endpoint_false.json +++ b/tests/translator/output/error_api_with_disable_api_execute_endpoint_false.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiGatewayApi] is invalid. ", + "DisableExecuteApiEndpoint works only within 'DefinitionBody' property." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiGatewayApi] is invalid. DisableExecuteApiEndpoint works only within 'DefinitionBody' property." } diff --git a/tests/translator/output/error_api_with_invalid_auth_scopes_openapi.json b/tests/translator/output/error_api_with_invalid_auth_scopes_openapi.json index 2840829b9..395c5e27a 100644 --- a/tests/translator/output/error_api_with_invalid_auth_scopes_openapi.json +++ b/tests/translator/output/error_api_with_invalid_auth_scopes_openapi.json @@ -1,3 +1,13 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApiWithCognitoAuth] is invalid. ", + "Property 'Authorizers.MyCognitoAuthWithDefaultScopes.AuthorizationScopes' should be a list. ", + "Resource with id [MyFn] is invalid. ", + "Event with id [CognitoAuthorizerNotString] is invalid. ", + "Unable to set Authorizer [['NotString']] on API method [get] for path [/cognitoauthorizernotstring]. ", + "The method authorizer must be a string with a corresponding dict entry in the api authorizer." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApiWithCognitoAuth] is invalid. Property 'Authorizers.MyCognitoAuthWithDefaultScopes.AuthorizationScopes' should be a list. Resource with id [MyFn] is invalid. Event with id [CognitoAuthorizerNotString] is invalid. Unable to set Authorizer [['NotString']] on API method [get] for path [/cognitoauthorizernotstring]. The method authorizer must be a string with a corresponding dict entry in the api authorizer." } diff --git a/tests/translator/output/error_api_with_invalid_if_condition_swagger.json b/tests/translator/output/error_api_with_invalid_if_condition_swagger.json index cfc32c7b5..8d6d4b84f 100644 --- a/tests/translator/output/error_api_with_invalid_if_condition_swagger.json +++ b/tests/translator/output/error_api_with_invalid_if_condition_swagger.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Value of Fn::If must be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Value of Fn::If must be a list." } diff --git a/tests/translator/output/error_api_with_invalid_open_api_version.json b/tests/translator/output/error_api_with_invalid_open_api_version.json index 971235172..16c6d94bd 100644 --- a/tests/translator/output/error_api_with_invalid_open_api_version.json +++ b/tests/translator/output/error_api_with_invalid_open_api_version.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "The OpenApiVersion value must be of the format '3.0.0'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. The OpenApiVersion value must be of the format '3.0.0'.", "errors": [ { diff --git a/tests/translator/output/error_api_with_invalid_open_api_version_type.json b/tests/translator/output/error_api_with_invalid_open_api_version_type.json index 7d2a0a538..f02ef88e1 100644 --- a/tests/translator/output/error_api_with_invalid_open_api_version_type.json +++ b/tests/translator/output/error_api_with_invalid_open_api_version_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Property 'OpenApiVersion' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Property 'OpenApiVersion' should be a string." } diff --git a/tests/translator/output/error_api_with_models_of_invalid_type.json b/tests/translator/output/error_api_with_models_of_invalid_type.json index da6ab8362..6e2f6b955 100644 --- a/tests/translator/output/error_api_with_models_of_invalid_type.json +++ b/tests/translator/output/error_api_with_models_of_invalid_type.json @@ -1,3 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Models' should be a map. ", + "Resource with id [MyFunction] is invalid. ", + "Event with id [None] is invalid. ", + "Unable to set RequestModel [User] on API method [get] for path [/none] because the related API Models defined is of invalid type." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApi] is invalid. Property 'Models' should be a map. Resource with id [MyFunction] is invalid. Event with id [None] is invalid. Unable to set RequestModel [User] on API method [get] for path [/none] because the related API Models defined is of invalid type." } diff --git a/tests/translator/output/error_api_with_usage_plan_invalid_parameter.json b/tests/translator/output/error_api_with_usage_plan_invalid_parameter.json index 1591492b0..970ae0da8 100644 --- a/tests/translator/output/error_api_with_usage_plan_invalid_parameter.json +++ b/tests/translator/output/error_api_with_usage_plan_invalid_parameter.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApiOne] is invalid. ", + "Invalid property for 'UsagePlan'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApiOne] is invalid. Invalid property for 'UsagePlan'", "errors": [ { diff --git a/tests/translator/output/error_application_does_not_exist.json b/tests/translator/output/error_application_does_not_exist.json index 5c823c458..d9b6aff65 100644 --- a/tests/translator/output/error_application_does_not_exist.json +++ b/tests/translator/output/error_application_does_not_exist.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApplication] is invalid. ", + "Cannot access application: non-existent." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApplication] is invalid. Cannot access application: non-existent.", "errors": [ { diff --git a/tests/translator/output/error_application_no_access.json b/tests/translator/output/error_application_no_access.json index 9314935a4..9fa22f18f 100644 --- a/tests/translator/output/error_application_no_access.json +++ b/tests/translator/output/error_application_no_access.json @@ -1,4 +1,14 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [InvalidSemver] is invalid. ", + "Cannot access application: invalid-semver. ", + "Resource with id [NoAccess] is invalid. ", + "Cannot access application: no-access. ", + "Resource with id [NonExistent] is invalid. ", + "Cannot access application: non-existent." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [InvalidSemver] is invalid. Cannot access application: invalid-semver. Resource with id [NoAccess] is invalid. Cannot access application: no-access. Resource with id [NonExistent] is invalid. Cannot access application: non-existent.", "errors": [ { diff --git a/tests/translator/output/error_application_preparing_timeout.json b/tests/translator/output/error_application_preparing_timeout.json index 3fd0ffc52..7f0c732e6 100644 --- a/tests/translator/output/error_application_preparing_timeout.json +++ b/tests/translator/output/error_application_preparing_timeout.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [['preparing-never-ready']] is invalid. ", + "Timed out waiting for nested stack templates to reach ACTIVE status." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [['preparing-never-ready']] is invalid. Timed out waiting for nested stack templates to reach ACTIVE status.", "errors": [ { diff --git a/tests/translator/output/error_application_properties.json b/tests/translator/output/error_application_properties.json index 9f1d3dbdc..5581b8b33 100644 --- a/tests/translator/output/error_application_properties.json +++ b/tests/translator/output/error_application_properties.json @@ -1,3 +1,26 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 9. ", + "Resource with id [BlankProperties] is invalid. ", + "Property 'ApplicationId' is required. ", + "Resource with id [IntrinsicProperties] is invalid. ", + "Property 'ApplicationId' cannot be resolved. ", + "Only FindInMap and Ref intrinsic functions are supported. ", + "Resource with id [MissingApplicationId] is invalid. ", + "Resource is missing the required [ApplicationId] property. ", + "Resource with id [MissingLocation] is invalid. ", + "Resource is missing the required [Location] property. ", + "Resource with id [MissingSemanticVersion] is invalid. ", + "Resource is missing the required [SemanticVersion] property. ", + "Resource with id [NormalApplication] is invalid. ", + "Property 'Location.ApplicationId' should be a string. ", + "Resource with id [UnsupportedProperty] is invalid. ", + "Resource is missing the required [Location] property. ", + "Resource with id [WrongTypeApplicationId] is invalid. ", + "Property 'Location.ApplicationId' should be a string. ", + "Resource with id [WrongTypeSemanticVersion] is invalid. ", + "Property 'Location.SemanticVersion' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 9. Resource with id [BlankProperties] is invalid. Property 'ApplicationId' is required. Resource with id [IntrinsicProperties] is invalid. Property 'ApplicationId' cannot be resolved. Only FindInMap and Ref intrinsic functions are supported. Resource with id [MissingApplicationId] is invalid. Resource is missing the required [ApplicationId] property. Resource with id [MissingLocation] is invalid. Resource is missing the required [Location] property. Resource with id [MissingSemanticVersion] is invalid. Resource is missing the required [SemanticVersion] property. Resource with id [NormalApplication] is invalid. Property 'Location.ApplicationId' should be a string. Resource with id [UnsupportedProperty] is invalid. Resource is missing the required [Location] property. Resource with id [WrongTypeApplicationId] is invalid. Property 'Location.ApplicationId' should be a string. Resource with id [WrongTypeSemanticVersion] is invalid. Property 'Location.SemanticVersion' should be a string." } diff --git a/tests/translator/output/error_auto_publish_alias_empty_string.json b/tests/translator/output/error_auto_publish_alias_empty_string.json index dc60ec505..e2b8f80bf 100644 --- a/tests/translator/output/error_auto_publish_alias_empty_string.json +++ b/tests/translator/output/error_auto_publish_alias_empty_string.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MinimalFunction] is invalid. ", + "'DeploymentPreference' requires AutoPublishAlias property to be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MinimalFunction] is invalid. 'DeploymentPreference' requires AutoPublishAlias property to be specified." } diff --git a/tests/translator/output/error_cognito_trigger_invalid_type.json b/tests/translator/output/error_cognito_trigger_invalid_type.json index f35146455..9908367ab 100644 --- a/tests/translator/output/error_cognito_trigger_invalid_type.json +++ b/tests/translator/output/error_cognito_trigger_invalid_type.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ImplicitApiFunctionOneTrigger] is invalid. ", + "Type of property 'Trigger' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ImplicitApiFunctionOneTrigger] is invalid. Type of property 'Trigger' is invalid.", "errors": [ { diff --git a/tests/translator/output/error_cognito_userpool_duplicate_trigger.json b/tests/translator/output/error_cognito_userpool_duplicate_trigger.json index bd6170cf1..31b3753e9 100644 --- a/tests/translator/output/error_cognito_userpool_duplicate_trigger.json +++ b/tests/translator/output/error_cognito_userpool_duplicate_trigger.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ImplicitApiFunction] is invalid. ", + "Event with id [TwoTrigger] is invalid. ", + "Cognito trigger \"PreSignUp\" defined multiple times." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ImplicitApiFunction] is invalid. Event with id [TwoTrigger] is invalid. Cognito trigger \"PreSignUp\" defined multiple times.", "errors": [ { diff --git a/tests/translator/output/error_cognito_userpool_not_string.json b/tests/translator/output/error_cognito_userpool_not_string.json index e9a1bad49..5f69a101c 100644 --- a/tests/translator/output/error_cognito_userpool_not_string.json +++ b/tests/translator/output/error_cognito_userpool_not_string.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ImplicitApiFunction] is invalid. ", + "Event with id [ImplicitApiFunctionOneTrigger] is invalid. ", + "Ref in Userpool is not a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ImplicitApiFunction] is invalid. Event with id [ImplicitApiFunctionOneTrigger] is invalid. Ref in Userpool is not a string." } diff --git a/tests/translator/output/error_connector.json b/tests/translator/output/error_connector.json index 8c07545bc..ba74a9634 100644 --- a/tests/translator/output/error_connector.json +++ b/tests/translator/output/error_connector.json @@ -1,4 +1,41 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 17. ", + "Resource with id [BothIdAndOtherProps] is invalid. ", + "Must provide 'Id' (with optional 'Qualifier') or a supported combination of other properties. ", + "Resource with id [EmptyDestinationListConnector] is invalid. ", + "'Destination' is an empty list Resource with id [EmptyListPermissionConnector] is invalid. ", + "'Permissions' cannot be empty; valid values are: Read, Write. ", + "Resource with id [EmptyPermissionConnector] is invalid. ", + "Missing required property 'Permissions'. ", + "Resource with id [MissingLambdaFunctionArn] is invalid. ", + "Source.Arn is missing. ", + "Resource with id [MissingRole] is invalid. ", + "Unable to get IAM role name from 'Source' resource. ", + "Resource with id [MissingRoleDestination] is invalid. ", + "Unable to get IAM role name from 'Destination' resource. ", + "Resource with id [MissingSnsTopicArn] is invalid. ", + "Destination.Arn is missing. ", + "Resource with id [MissingSqsQueueUrl] is invalid. ", + "Destination.Arn is missing. ", + "Resource with id [NoIdMissingType] is invalid. ", + "'Type' is missing or not a string. ", + "Resource with id [NoPermissionConnector] is invalid. ", + "Missing required property 'Permissions'. ", + "Resource with id [NonExistentLogicalId] is invalid. ", + "Unable to find resource with logical ID 'ThisDoesntExist'. ", + "Resource with id [NonStrId] is invalid. ", + "'Id' is missing or not a string. ", + "Resource with id [ResourceWithoutType] is invalid. ", + "'Type' is missing or not a string. ", + "Resource with id [UnsupportedAccessCategory] is invalid. ", + "Unsupported 'Permissions' provided for connector from AWS::Lambda::Function to AWS::SQS::Queue; valid values are: Read, Write. ", + "Resource with id [UnsupportedAccessCategoryCombination] is invalid. ", + "Unsupported 'Permissions' provided for connector from AWS::SQS::Queue to AWS::Lambda::Function; valid combinations are: Read + Write. ", + "Resource with id [UnsupportedType] is invalid. ", + "Unable to create connector from AWS::Fancy::CoolType to AWS::Lambda::Function; it's not supported or the template is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 17. Resource with id [BothIdAndOtherProps] is invalid. Must provide 'Id' (with optional 'Qualifier') or a supported combination of other properties. Resource with id [EmptyDestinationListConnector] is invalid. 'Destination' is an empty list Resource with id [EmptyListPermissionConnector] is invalid. 'Permissions' cannot be empty; valid values are: Read, Write. Resource with id [EmptyPermissionConnector] is invalid. Missing required property 'Permissions'. Resource with id [MissingLambdaFunctionArn] is invalid. Source.Arn is missing. Resource with id [MissingRole] is invalid. Unable to get IAM role name from 'Source' resource. Resource with id [MissingRoleDestination] is invalid. Unable to get IAM role name from 'Destination' resource. Resource with id [MissingSnsTopicArn] is invalid. Destination.Arn is missing. Resource with id [MissingSqsQueueUrl] is invalid. Destination.Arn is missing. Resource with id [NoIdMissingType] is invalid. 'Type' is missing or not a string. Resource with id [NoPermissionConnector] is invalid. Missing required property 'Permissions'. Resource with id [NonExistentLogicalId] is invalid. Unable to find resource with logical ID 'ThisDoesntExist'. Resource with id [NonStrId] is invalid. 'Id' is missing or not a string. Resource with id [ResourceWithoutType] is invalid. 'Type' is missing or not a string. Resource with id [UnsupportedAccessCategory] is invalid. Unsupported 'Permissions' provided for connector from AWS::Lambda::Function to AWS::SQS::Queue; valid values are: Read, Write. Resource with id [UnsupportedAccessCategoryCombination] is invalid. Unsupported 'Permissions' provided for connector from AWS::SQS::Queue to AWS::Lambda::Function; valid combinations are: Read + Write. Resource with id [UnsupportedType] is invalid. Unable to create connector from AWS::Fancy::CoolType to AWS::Lambda::Function; it's not supported or the template is invalid.", "errors": [ { diff --git a/tests/translator/output/error_consumer_group_id.json b/tests/translator/output/error_consumer_group_id.json index 628c8874d..e8e664311 100644 --- a/tests/translator/output/error_consumer_group_id.json +++ b/tests/translator/output/error_consumer_group_id.json @@ -1,3 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [NotSupportedPullTrigger] is invalid. ", + "Event with id [NotSupportedPullTriggerDDBEvent] is invalid. ", + "Property ConsumerGroupId not defined for resource of type DynamoDB. ", + "Resource with id [NotSupportedPushTriggerSNSEvent] is invalid. ", + "property ConsumerGroupId not defined for resource of type SNS" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [NotSupportedPullTrigger] is invalid. Event with id [NotSupportedPullTriggerDDBEvent] is invalid. Property ConsumerGroupId not defined for resource of type DynamoDB. Resource with id [NotSupportedPushTriggerSNSEvent] is invalid. property ConsumerGroupId not defined for resource of type SNS" } diff --git a/tests/translator/output/error_cors_credentials_true_with_wildcard_origin.json b/tests/translator/output/error_cors_credentials_true_with_wildcard_origin.json index 6c4395ca3..070c06dc0 100644 --- a/tests/translator/output/error_cors_credentials_true_with_wildcard_origin.json +++ b/tests/translator/output/error_cors_credentials_true_with_wildcard_origin.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Unable to add Cors configuration because 'AllowCredentials' can not be true when 'AllowOrigin' is \"'*'\" or not set" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Unable to add Cors configuration because 'AllowCredentials' can not be true when 'AllowOrigin' is \"'*'\" or not set", "errors": [ { diff --git a/tests/translator/output/error_cors_credentials_true_without_explicit_origin.json b/tests/translator/output/error_cors_credentials_true_without_explicit_origin.json index 6c4395ca3..070c06dc0 100644 --- a/tests/translator/output/error_cors_credentials_true_without_explicit_origin.json +++ b/tests/translator/output/error_cors_credentials_true_without_explicit_origin.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Unable to add Cors configuration because 'AllowCredentials' can not be true when 'AllowOrigin' is \"'*'\" or not set" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Unable to add Cors configuration because 'AllowCredentials' can not be true when 'AllowOrigin' is \"'*'\" or not set", "errors": [ { diff --git a/tests/translator/output/error_cors_on_external_swagger.json b/tests/translator/output/error_cors_on_external_swagger.json index c1670cec2..d82b0eaec 100644 --- a/tests/translator/output/error_cors_on_external_swagger.json +++ b/tests/translator/output/error_cors_on_external_swagger.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ExplicitApi] is invalid. ", + "Cors works only with inline Swagger specified in 'DefinitionBody' property." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ExplicitApi] is invalid. Cors works only with inline Swagger specified in 'DefinitionBody' property.", "errors": [ { diff --git a/tests/translator/output/error_default_authorizer_should_be_string_in_api.json b/tests/translator/output/error_default_authorizer_should_be_string_in_api.json index c37f24fd9..f78c6e7ac 100644 --- a/tests/translator/output/error_default_authorizer_should_be_string_in_api.json +++ b/tests/translator/output/error_default_authorizer_should_be_string_in_api.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApiIntrinsicDefaultAuthorizer] is invalid. ", + "DefaultAuthorizer is not a string. ", + "Resource with id [MyApiOtherTypeDefaultAuthorizer] is invalid. ", + "DefaultAuthorizer is not a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApiIntrinsicDefaultAuthorizer] is invalid. DefaultAuthorizer is not a string. Resource with id [MyApiOtherTypeDefaultAuthorizer] is invalid. DefaultAuthorizer is not a string." } diff --git a/tests/translator/output/error_depends_on_invalid_types.json b/tests/translator/output/error_depends_on_invalid_types.json index e215c4b6b..55cd74d72 100644 --- a/tests/translator/output/error_depends_on_invalid_types.json +++ b/tests/translator/output/error_depends_on_invalid_types.json @@ -1,4 +1,17 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [Function1BucketEvent] is invalid. ", + "Invalid type for field 'DependsOn'. ", + "Expected a string or list of strings. ", + "Resource with id [Function2BucketEvent] is invalid. ", + "Invalid type for field 'DependsOn'. ", + "Expected a string or list of strings. ", + "Resource with id [Function3BucketEvent] is invalid. ", + "Invalid type for field 'DependsOn'. ", + "Expected a string or list of strings." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [Function1BucketEvent] is invalid. Invalid type for field 'DependsOn'. Expected a string or list of strings. Resource with id [Function2BucketEvent] is invalid. Invalid type for field 'DependsOn'. Expected a string or list of strings. Resource with id [Function3BucketEvent] is invalid. Invalid type for field 'DependsOn'. Expected a string or list of strings.", "errors": [ { diff --git a/tests/translator/output/error_embedded_connectors.json b/tests/translator/output/error_embedded_connectors.json index 306e3b931..20b6a60dc 100644 --- a/tests/translator/output/error_embedded_connectors.json +++ b/tests/translator/output/error_embedded_connectors.json @@ -1,3 +1,52 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 22. ", + "Transforming resource with id [DuplicateTest] attempts to create a new resource with id [DuplicateTestDuplicateId] and type \"AWS::Serverless::Connector\". ", + "A resource with that id already exists within this template. ", + "Please use a different id for that resource. ", + "Resource with id [EventsRuleMissingLambdaFunctionArn] is invalid. ", + "Unable to get Lambda function ARN from 'Destination' resource. ", + "Resource with id [EventsRuleMissingSnsTopicArn] is invalid. ", + "Destination.Arn is missing. ", + "Resource with id [EventsRuleMissingSqsQueueUrl] is invalid. ", + "Unable to create connector from AWS::Events::Rule to AWS::SQS:Queue; it's not supported or the template is invalid. ", + "Resource with id [MyFunctionBothIdAndOtherProps] is invalid. ", + "Must provide 'Id' (with optional 'Qualifier') or a supported combination of other properties. ", + "Resource with id [MyFunctionEmptyDestination] is invalid. ", + "Missing required property 'Destination'. ", + "Resource with id [MyFunctionEmptyPermissions] is invalid. ", + "Missing required property 'Permissions'. ", + "Resource with id [MyFunctionEmptyPermissionsList] is invalid. ", + "'Permissions' cannot be empty; valid values are: Read, Write. ", + "Resource with id [MyFunctionEmptyProperties] is invalid. ", + "Properties of a resource must be an object. ", + "Resource with id [MyFunctionMissingRoleMissingRole] is invalid. ", + "Unable to get IAM role name from 'Source' resource. ", + "Resource with id [MyFunctionNoDestination] is invalid. ", + "Missing required property 'Destination'. ", + "Resource with id [MyFunctionNoDictConnectorNonDictConnector] is invalid. ", + "MyFunctionNoDictConnector.MyFunctionNoDictConnectorNonDictConnector should be a map. ", + "Resource with id [MyFunctionNoIdMissingType] is invalid. ", + "'Type' is missing or not a string. ", + "Resource with id [MyFunctionNoPermissions] is invalid. ", + "Missing required property 'Permissions'. ", + "Resource with id [MyFunctionNoStrId] is invalid. ", + "'Id' is missing or not a string. ", + "Resource with id [MyFunctionNonDictProperties] is invalid. ", + "Properties of a resource must be an object. ", + "Resource with id [MyFunctionNonExistentId] is invalid. ", + "Unable to find resource with logical ID 'ThisDoesntExist'. ", + "Resource with id [MyFunctionTestSourceReferenceId] is invalid. ", + "'Id' shouldn't be defined in 'SourceReference'. ", + "Resource with id [MyFunctionUnsupportedAccessCategory] is invalid. ", + "Unsupported 'Permissions' provided for connector from AWS::Lambda::Function to AWS::SQS::Queue; valid values are: Read, Write. ", + "Resource with id [MyQueueMissingRoleDestination] is invalid. ", + "Unable to get IAM role name from 'Destination' resource. ", + "Resource with id [MyQueueUnsupportedAccessCategoryCombination] is invalid. ", + "Unsupported 'Permissions' provided for connector from AWS::SQS::Queue to AWS::Lambda::Function; valid combinations are: Read + Write. ", + "Resource with id [MyResourceWithoutTypeResourceWithoutType] is invalid. ", + "'Type' is missing or not a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 22. Transforming resource with id [DuplicateTest] attempts to create a new resource with id [DuplicateTestDuplicateId] and type \"AWS::Serverless::Connector\". A resource with that id already exists within this template. Please use a different id for that resource. Resource with id [EventsRuleMissingLambdaFunctionArn] is invalid. Unable to get Lambda function ARN from 'Destination' resource. Resource with id [EventsRuleMissingSnsTopicArn] is invalid. Destination.Arn is missing. Resource with id [EventsRuleMissingSqsQueueUrl] is invalid. Unable to create connector from AWS::Events::Rule to AWS::SQS:Queue; it's not supported or the template is invalid. Resource with id [MyFunctionBothIdAndOtherProps] is invalid. Must provide 'Id' (with optional 'Qualifier') or a supported combination of other properties. Resource with id [MyFunctionEmptyDestination] is invalid. Missing required property 'Destination'. Resource with id [MyFunctionEmptyPermissions] is invalid. Missing required property 'Permissions'. Resource with id [MyFunctionEmptyPermissionsList] is invalid. 'Permissions' cannot be empty; valid values are: Read, Write. Resource with id [MyFunctionEmptyProperties] is invalid. Properties of a resource must be an object. Resource with id [MyFunctionMissingRoleMissingRole] is invalid. Unable to get IAM role name from 'Source' resource. Resource with id [MyFunctionNoDestination] is invalid. Missing required property 'Destination'. Resource with id [MyFunctionNoDictConnectorNonDictConnector] is invalid. MyFunctionNoDictConnector.MyFunctionNoDictConnectorNonDictConnector should be a map. Resource with id [MyFunctionNoIdMissingType] is invalid. 'Type' is missing or not a string. Resource with id [MyFunctionNoPermissions] is invalid. Missing required property 'Permissions'. Resource with id [MyFunctionNoStrId] is invalid. 'Id' is missing or not a string. Resource with id [MyFunctionNonDictProperties] is invalid. Properties of a resource must be an object. Resource with id [MyFunctionNonExistentId] is invalid. Unable to find resource with logical ID 'ThisDoesntExist'. Resource with id [MyFunctionTestSourceReferenceId] is invalid. 'Id' shouldn't be defined in 'SourceReference'. Resource with id [MyFunctionUnsupportedAccessCategory] is invalid. Unsupported 'Permissions' provided for connector from AWS::Lambda::Function to AWS::SQS::Queue; valid values are: Read, Write. Resource with id [MyQueueMissingRoleDestination] is invalid. Unable to get IAM role name from 'Destination' resource. Resource with id [MyQueueUnsupportedAccessCategoryCombination] is invalid. Unsupported 'Permissions' provided for connector from AWS::SQS::Queue to AWS::Lambda::Function; valid combinations are: Read + Write. Resource with id [MyResourceWithoutTypeResourceWithoutType] is invalid. 'Type' is missing or not a string." } diff --git a/tests/translator/output/error_event_filtering.json b/tests/translator/output/error_event_filtering.json index bf5a964a9..7c2a2eb2a 100644 --- a/tests/translator/output/error_event_filtering.json +++ b/tests/translator/output/error_event_filtering.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [NotSupportedPushEventSNSEvent] is invalid. ", + "property FilterCriteria not defined for resource of type SNS Resource with id [WrongFilterName] is invalid. ", + "Event with id [DynamoDBStreamEvent] is invalid. ", + "FilterCriteria field has a wrong format" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [NotSupportedPushEventSNSEvent] is invalid. property FilterCriteria not defined for resource of type SNS Resource with id [WrongFilterName] is invalid. Event with id [DynamoDBStreamEvent] is invalid. FilterCriteria field has a wrong format" } diff --git a/tests/translator/output/error_existing_event_logical_id.json b/tests/translator/output/error_existing_event_logical_id.json index bed644dc3..bdab2e3e9 100644 --- a/tests/translator/output/error_existing_event_logical_id.json +++ b/tests/translator/output/error_existing_event_logical_id.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Transforming resource with id [IoTRuleFunc] attempts to create a new resource with id [IoTRuleFuncMyIoTRule] and type \"AWS::IoT::TopicRule\". ", + "A resource with that id already exists within this template. ", + "Please use a different id for that resource." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Transforming resource with id [IoTRuleFunc] attempts to create a new resource with id [IoTRuleFuncMyIoTRule] and type \"AWS::IoT::TopicRule\". A resource with that id already exists within this template. Please use a different id for that resource.", "errors": [ { diff --git a/tests/translator/output/error_existing_permission_logical_id.json b/tests/translator/output/error_existing_permission_logical_id.json index d48445d31..042092bc8 100644 --- a/tests/translator/output/error_existing_permission_logical_id.json +++ b/tests/translator/output/error_existing_permission_logical_id.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Transforming resource with id [AlexaSkillFunc] attempts to create a new resource with id [AlexaSkillFuncAlexaSkillEventPermission] and type \"AWS::Lambda::Permission\". ", + "A resource with that id already exists within this template. ", + "Please use a different id for that resource." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Transforming resource with id [AlexaSkillFunc] attempts to create a new resource with id [AlexaSkillFuncAlexaSkillEventPermission] and type \"AWS::Lambda::Permission\". A resource with that id already exists within this template. Please use a different id for that resource.", "errors": [ { diff --git a/tests/translator/output/error_existing_role_logical_id.json b/tests/translator/output/error_existing_role_logical_id.json index 56ee6999d..58671124b 100644 --- a/tests/translator/output/error_existing_role_logical_id.json +++ b/tests/translator/output/error_existing_role_logical_id.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Transforming resource with id [RestApiFunction] attempts to create a new resource with id [RestApiFunctionRole] and type \"AWS::IAM::Role\". ", + "A resource with that id already exists within this template. ", + "Please use a different id for that resource." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Transforming resource with id [RestApiFunction] attempts to create a new resource with id [RestApiFunctionRole] and type \"AWS::IAM::Role\". A resource with that id already exists within this template. Please use a different id for that resource.", "errors": [ { diff --git a/tests/translator/output/error_function_api_invalid_properties.json b/tests/translator/output/error_function_api_invalid_properties.json index a2b221708..7a0ee9b70 100644 --- a/tests/translator/output/error_function_api_invalid_properties.json +++ b/tests/translator/output/error_function_api_invalid_properties.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Event with id [Api] is invalid. ", + "Properties should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Event with id [Api] is invalid. Properties should be a map." } diff --git a/tests/translator/output/error_function_fnsub_in_auto_publish_hash.json b/tests/translator/output/error_function_fnsub_in_auto_publish_hash.json index 9977dd755..1698c744b 100644 --- a/tests/translator/output/error_function_fnsub_in_auto_publish_hash.json +++ b/tests/translator/output/error_function_fnsub_in_auto_publish_hash.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "AutoPublishCodeSha256 must be a string" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. AutoPublishCodeSha256 must be a string", "errors": [ { diff --git a/tests/translator/output/error_function_invalid_api_event.json b/tests/translator/output/error_function_invalid_api_event.json index f609c3699..3b9ba2779 100644 --- a/tests/translator/output/error_function_invalid_api_event.json +++ b/tests/translator/output/error_function_invalid_api_event.json @@ -1,3 +1,22 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 5. ", + "Resource with id [FunctionApiInvalidProperties] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Properties should be a map. ", + "Resource with id [FunctionApiMethodArray] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'Method' should be a string. ", + "Resource with id [FunctionApiNoMethod] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'Method' is required. ", + "Resource with id [FunctionApiNoPath] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'Path' is required. ", + "Resource with id [FunctionApiPathArray] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'Path' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 5. Resource with id [FunctionApiInvalidProperties] is invalid. Event with id [ApiEvent] is invalid. Properties should be a map. Resource with id [FunctionApiMethodArray] is invalid. Event with id [ApiEvent] is invalid. Property 'Method' should be a string. Resource with id [FunctionApiNoMethod] is invalid. Event with id [ApiEvent] is invalid. Property 'Method' is required. Resource with id [FunctionApiNoPath] is invalid. Event with id [ApiEvent] is invalid. Property 'Path' is required. Resource with id [FunctionApiPathArray] is invalid. Event with id [ApiEvent] is invalid. Property 'Path' should be a string." } diff --git a/tests/translator/output/error_function_invalid_autopublishalias.json b/tests/translator/output/error_function_invalid_autopublishalias.json index 27fdeaf29..dfc7cd567 100644 --- a/tests/translator/output/error_function_invalid_autopublishalias.json +++ b/tests/translator/output/error_function_invalid_autopublishalias.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [InvalidAutoPublishAliasFunction] is invalid. ", + "Alias name is required to create an alias" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [InvalidAutoPublishAliasFunction] is invalid. Alias name is required to create an alias", "errors": [ { diff --git a/tests/translator/output/error_function_invalid_autopublishalias_allproperties.json b/tests/translator/output/error_function_invalid_autopublishalias_allproperties.json index 4b2caf1bc..3b4217bd1 100644 --- a/tests/translator/output/error_function_invalid_autopublishalias_allproperties.json +++ b/tests/translator/output/error_function_invalid_autopublishalias_allproperties.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [InvalidAutoPublishAliasAllPropertiesFunction] is invalid. ", + "Type of property 'AutoPublishAliasAllProperties' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [InvalidAutoPublishAliasAllPropertiesFunction] is invalid. Type of property 'AutoPublishAliasAllProperties' is invalid." } diff --git a/tests/translator/output/error_function_invalid_codeuri.json b/tests/translator/output/error_function_invalid_codeuri.json index 69d2a1747..34f2463cd 100644 --- a/tests/translator/output/error_function_invalid_codeuri.json +++ b/tests/translator/output/error_function_invalid_codeuri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter.", "errors": [ { diff --git a/tests/translator/output/error_function_invalid_event_api_ref.json b/tests/translator/output/error_function_invalid_event_api_ref.json index 75e36b80b..4defcfb39 100644 --- a/tests/translator/output/error_function_invalid_event_api_ref.json +++ b/tests/translator/output/error_function_invalid_event_api_ref.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [FunctionApiRestApiRefError] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'RestApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [FunctionApiRestApiRefError] is invalid. Event with id [ApiEvent] is invalid. Property 'RestApiId' should be a string." } diff --git a/tests/translator/output/error_function_invalid_event_http_api_ref.json b/tests/translator/output/error_function_invalid_event_http_api_ref.json index b188a47cb..405f88b1d 100644 --- a/tests/translator/output/error_function_invalid_event_http_api_ref.json +++ b/tests/translator/output/error_function_invalid_event_http_api_ref.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [FunctionApiHttpApiRefError] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Property 'ApiId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [FunctionApiHttpApiRefError] is invalid. Event with id [ApiEvent] is invalid. Property 'ApiId' should be a string." } diff --git a/tests/translator/output/error_function_invalid_event_type.json b/tests/translator/output/error_function_invalid_event_type.json index e8aaf5074..99038c8f5 100644 --- a/tests/translator/output/error_function_invalid_event_type.json +++ b/tests/translator/output/error_function_invalid_event_type.json @@ -1,4 +1,19 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [FunctionApiTypeError] is invalid. ", + "Event with id [ApiEvent] is invalid. ", + "Resource dict has missing or invalid value for key Type. ", + "Event Type is: API. ", + "Resource with id [FunctionNoEventType] is invalid. ", + "Event with id [MissingType] is invalid. ", + "Resource dict has missing or invalid value for key Type. ", + "Event Type is: None. ", + "Resource with id [TestFunction] is invalid. ", + "Event with id [FileUploaded] is invalid. ", + "'NoneType' object has no attribute 'get'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [FunctionApiTypeError] is invalid. Event with id [ApiEvent] is invalid. Resource dict has missing or invalid value for key Type. Event Type is: API. Resource with id [FunctionNoEventType] is invalid. Event with id [MissingType] is invalid. Resource dict has missing or invalid value for key Type. Event Type is: None. Resource with id [TestFunction] is invalid. Event with id [FileUploaded] is invalid. 'NoneType' object has no attribute 'get'", "errors": [ { diff --git a/tests/translator/output/error_function_invalid_layer.json b/tests/translator/output/error_function_invalid_layer.json index fb3985a1f..f7d3f4552 100644 --- a/tests/translator/output/error_function_invalid_layer.json +++ b/tests/translator/output/error_function_invalid_layer.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [FunctionWithLayersString] is invalid. ", + "Type of property 'Layers' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [FunctionWithLayersString] is invalid. Type of property 'Layers' is invalid.", "errors": [ { diff --git a/tests/translator/output/error_function_invalid_request_parameters.json b/tests/translator/output/error_function_invalid_request_parameters.json index 758c28bc9..bbf30eaa4 100644 --- a/tests/translator/output/error_function_invalid_request_parameters.json +++ b/tests/translator/output/error_function_invalid_request_parameters.json @@ -1,3 +1,29 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 6. ", + "Resource with id [InvalidNameDictParameterFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. ", + "Resource with id [InvalidNameLocationStringParameterFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. ", + "Resource with id [InvalidNameStringParameterFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. ", + "Resource with id [ParameterInvalidFieldFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Values must be an object, e.g { Required: true, Caching: false } Resource with id [ParameterNotDictFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Values must be an object, e.g { Required: true, Caching: false } Resource with id [ParameterNotDictOrStringFunction] is invalid. ", + "Event with id [GetHtml] is invalid. ", + "Invalid value for 'RequestParameters' property. ", + "Property must be either a string or an object" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 6. Resource with id [InvalidNameDictParameterFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. Resource with id [InvalidNameLocationStringParameterFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. Resource with id [InvalidNameStringParameterFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Keys must be in the format 'method.request.[querystring|path|header].{value}', e.g 'method.request.header.Authorization'. Resource with id [ParameterInvalidFieldFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Values must be an object, e.g { Required: true, Caching: false } Resource with id [ParameterNotDictFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Values must be an object, e.g { Required: true, Caching: false } Resource with id [ParameterNotDictOrStringFunction] is invalid. Event with id [GetHtml] is invalid. Invalid value for 'RequestParameters' property. Property must be either a string or an object" } diff --git a/tests/translator/output/error_function_invalid_s3_event.json b/tests/translator/output/error_function_invalid_s3_event.json index 14dde55ea..1944512a9 100644 --- a/tests/translator/output/error_function_invalid_s3_event.json +++ b/tests/translator/output/error_function_invalid_s3_event.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [FunctionInvalidS3EventS3Event] is invalid. ", + "Type of property 'Events' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [FunctionInvalidS3EventS3Event] is invalid. Type of property 'Events' is invalid.", "errors": [ { diff --git a/tests/translator/output/error_function_no_codeuri.json b/tests/translator/output/error_function_no_codeuri.json index 30b33b6fb..87210a1da 100644 --- a/tests/translator/output/error_function_no_codeuri.json +++ b/tests/translator/output/error_function_no_codeuri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Only one of 'InlineCode' or 'CodeUri' can be set." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Only one of 'InlineCode' or 'CodeUri' can be set.", "errors": [ { diff --git a/tests/translator/output/error_function_no_handler.json b/tests/translator/output/error_function_no_handler.json index caeec6dfa..cdeb35b1c 100644 --- a/tests/translator/output/error_function_no_handler.json +++ b/tests/translator/output/error_function_no_handler.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Runtime and Handler needs to be present when PackageType is of type `Zip`" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Runtime and Handler needs to be present when PackageType is of type `Zip`", "errors": [ { diff --git a/tests/translator/output/error_function_no_imageuri.json b/tests/translator/output/error_function_no_imageuri.json index e7270d0ba..f0b965305 100644 --- a/tests/translator/output/error_function_no_imageuri.json +++ b/tests/translator/output/error_function_no_imageuri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "'ImageUri' must be set." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. 'ImageUri' must be set.", "errors": [ { diff --git a/tests/translator/output/error_function_no_runtime.json b/tests/translator/output/error_function_no_runtime.json index caeec6dfa..cdeb35b1c 100644 --- a/tests/translator/output/error_function_no_runtime.json +++ b/tests/translator/output/error_function_no_runtime.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Runtime and Handler needs to be present when PackageType is of type `Zip`" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Runtime and Handler needs to be present when PackageType is of type `Zip`", "errors": [ { diff --git a/tests/translator/output/error_function_policy_template_invalid_value.json b/tests/translator/output/error_function_policy_template_invalid_value.json index ec42bed91..13f737cf1 100644 --- a/tests/translator/output/error_function_policy_template_invalid_value.json +++ b/tests/translator/output/error_function_policy_template_invalid_value.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "Must specify valid parameter values for policy template 'LambdaInvokePolicy'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Must specify valid parameter values for policy template 'LambdaInvokePolicy'", "errors": [ { diff --git a/tests/translator/output/error_function_policy_template_with_missing_parameter.json b/tests/translator/output/error_function_policy_template_with_missing_parameter.json index e0187010e..8ec1e90c4 100644 --- a/tests/translator/output/error_function_policy_template_with_missing_parameter.json +++ b/tests/translator/output/error_function_policy_template_with_missing_parameter.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "Following required parameters of template 'LambdaInvokePolicy' don't have values: ['FunctionName']" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Following required parameters of template 'LambdaInvokePolicy' don't have values: ['FunctionName']", "errors": [ { diff --git a/tests/translator/output/error_function_with_api_key_false.json b/tests/translator/output/error_function_with_api_key_false.json index ff43b7761..69cb2eac7 100644 --- a/tests/translator/output/error_function_with_api_key_false.json +++ b/tests/translator/output/error_function_with_api_key_false.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunctionWithApiKeyRequired] is invalid. ", + "Event with id [MyApiWithApiKeyRequired] is invalid. ", + "Unable to set ApiKeyRequired [False] on API method [get] for path [/ApiKeyRequiredTrue] because the related API does not specify any ApiKeyRequired." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunctionWithApiKeyRequired] is invalid. Event with id [MyApiWithApiKeyRequired] is invalid. Unable to set ApiKeyRequired [False] on API method [get] for path [/ApiKeyRequiredTrue] because the related API does not specify any ApiKeyRequired.", "errors": [ { diff --git a/tests/translator/output/error_function_with_cwe_both_dlq_property_provided.json b/tests/translator/output/error_function_with_cwe_both_dlq_property_provided.json index 9abc3e868..1ce691ecd 100644 --- a/tests/translator/output/error_function_with_cwe_both_dlq_property_provided.json +++ b/tests/translator/output/error_function_with_cwe_both_dlq_property_provided.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [TriggeredFunction] is invalid. ", + "Event with id [TriggeredFunctionOnTerminate] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [TriggeredFunction] is invalid. Event with id [TriggeredFunctionOnTerminate] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig" } diff --git a/tests/translator/output/error_function_with_cwe_invalid_dlq_type.json b/tests/translator/output/error_function_with_cwe_invalid_dlq_type.json index e73edc94e..9b99abb6f 100644 --- a/tests/translator/output/error_function_with_cwe_invalid_dlq_type.json +++ b/tests/translator/output/error_function_with_cwe_invalid_dlq_type.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [TriggeredFunction] is invalid. ", + "Event with id [TriggeredFunctionOnTerminate] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [TriggeredFunction] is invalid. Event with id [TriggeredFunctionOnTerminate] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" } diff --git a/tests/translator/output/error_function_with_cwe_missing_dlq_property.json b/tests/translator/output/error_function_with_cwe_missing_dlq_property.json index 9ff14dc61..b9db67bf3 100644 --- a/tests/translator/output/error_function_with_cwe_missing_dlq_property.json +++ b/tests/translator/output/error_function_with_cwe_missing_dlq_property.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [TriggeredFunction] is invalid. ", + "Event with id [TriggeredFunctionOnTerminate] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [TriggeredFunction] is invalid. Event with id [TriggeredFunctionOnTerminate] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig" } diff --git a/tests/translator/output/error_function_with_deployment_preference_invalid_alarms.json b/tests/translator/output/error_function_with_deployment_preference_invalid_alarms.json index c3e2c8d49..fcac2ea13 100644 --- a/tests/translator/output/error_function_with_deployment_preference_invalid_alarms.json +++ b/tests/translator/output/error_function_with_deployment_preference_invalid_alarms.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MinimalFunction] is invalid. ", + "Alarms must be a list" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MinimalFunction] is invalid. Alarms must be a list" } diff --git a/tests/translator/output/error_function_with_deployment_preference_missing_alias.json b/tests/translator/output/error_function_with_deployment_preference_missing_alias.json index ee76c819e..8ad5413bc 100644 --- a/tests/translator/output/error_function_with_deployment_preference_missing_alias.json +++ b/tests/translator/output/error_function_with_deployment_preference_missing_alias.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MinimalFunction] is invalid. ", + "'DeploymentPreference' requires AutoPublishAlias property to be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MinimalFunction] is invalid. 'DeploymentPreference' requires AutoPublishAlias property to be specified.", "errors": [ { diff --git a/tests/translator/output/error_function_with_deployment_preference_passthrough_condition_with_invalid_values.json b/tests/translator/output/error_function_with_deployment_preference_passthrough_condition_with_invalid_values.json index 6373c0b14..01cc7adf4 100644 --- a/tests/translator/output/error_function_with_deployment_preference_passthrough_condition_with_invalid_values.json +++ b/tests/translator/output/error_function_with_deployment_preference_passthrough_condition_with_invalid_values.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [InvalidType] is invalid. ", + "Invalid value for property PassthroughCondition. ", + "Resource with id [UnsupportedIntrinsic] is invalid. ", + "Unsupported intrinsic: the only intrinsic functions supported for property PassthroughCondition are FindInMap and parameter Refs." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [InvalidType] is invalid. Invalid value for property PassthroughCondition. Resource with id [UnsupportedIntrinsic] is invalid. Unsupported intrinsic: the only intrinsic functions supported for property PassthroughCondition are FindInMap and parameter Refs." } diff --git a/tests/translator/output/error_function_with_event_bridge_rule_dlq_intrinsic_function.json b/tests/translator/output/error_function_with_event_bridge_rule_dlq_intrinsic_function.json index 774b13986..0af2d3c7a 100644 --- a/tests/translator/output/error_function_with_event_bridge_rule_dlq_intrinsic_function.json +++ b/tests/translator/output/error_function_with_event_bridge_rule_dlq_intrinsic_function.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [testLambdaFn] is invalid. ", + "Event with id [testLambdaFnTestEventBridgeRule] is invalid. ", + "QueueLogicalId must be a string" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [testLambdaFn] is invalid. Event with id [testLambdaFnTestEventBridgeRule] is invalid. QueueLogicalId must be a string", "errors": [ { diff --git a/tests/translator/output/error_function_with_event_dest_invalid.json b/tests/translator/output/error_function_with_event_dest_invalid.json index 21424a5c5..59f742355 100644 --- a/tests/translator/output/error_function_with_event_dest_invalid.json +++ b/tests/translator/output/error_function_with_event_dest_invalid.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyTestFunction] is invalid. ", + "Destination is required if Type is not ['SQS', 'SNS']" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyTestFunction] is invalid. Destination is required if Type is not ['SQS', 'SNS']", "errors": [ { diff --git a/tests/translator/output/error_function_with_event_dest_type.json b/tests/translator/output/error_function_with_event_dest_type.json index 65bc08924..41e6a6901 100644 --- a/tests/translator/output/error_function_with_event_dest_type.json +++ b/tests/translator/output/error_function_with_event_dest_type.json @@ -1,3 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [MyTestFunction] is invalid. ", + "'Type: blah' must be one of ['SQS', 'SNS', 'EventBridge', 'Lambda'] Resource with id [MyTestFunctionInvalidDestinationConfigOnSuccessType] is invalid. ", + "Property 'EventInvokeConfig.DestinationConfig.OnSuccess' should be a map. ", + "Resource with id [MyTestFunctionInvalidDestinationConfigType] is invalid. ", + "Property 'EventInvokeConfig.DestinationConfig' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [MyTestFunction] is invalid. 'Type: blah' must be one of ['SQS', 'SNS', 'EventBridge', 'Lambda'] Resource with id [MyTestFunctionInvalidDestinationConfigOnSuccessType] is invalid. Property 'EventInvokeConfig.DestinationConfig.OnSuccess' should be a map. Resource with id [MyTestFunctionInvalidDestinationConfigType] is invalid. Property 'EventInvokeConfig.DestinationConfig' should be a map." } diff --git a/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter.json b/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter.json index 02c194139..aa848d00d 100644 --- a/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter.json +++ b/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyFunction] is invalid. ", + "AllowOrigin is not a valid property for configuring Cors. ", + "Resource with id [MyFunction2] is invalid. ", + "Property 'FunctionUrlConfig.Cors' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyFunction] is invalid. AllowOrigin is not a valid property for configuring Cors. Resource with id [MyFunction2] is invalid. Property 'FunctionUrlConfig.Cors' should be a map." } diff --git a/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter_data_type.json b/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter_data_type.json index 8d4ec696d..af43e0d30 100644 --- a/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter_data_type.json +++ b/tests/translator/output/error_function_with_function_url_config_with_invalid_cors_parameter_data_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "MaxAge must be of type int." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. MaxAge must be of type int." } diff --git a/tests/translator/output/error_function_with_function_url_config_with_no_authorization_type.json b/tests/translator/output/error_function_with_function_url_config_with_no_authorization_type.json index 4ad36f8f6..15132336d 100644 --- a/tests/translator/output/error_function_with_function_url_config_with_no_authorization_type.json +++ b/tests/translator/output/error_function_with_function_url_config_with_no_authorization_type.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "AuthType is required to configure function property `FunctionUrlConfig`. ", + "Please provide either AWS_IAM or NONE." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. AuthType is required to configure function property `FunctionUrlConfig`. Please provide either AWS_IAM or NONE." } diff --git a/tests/translator/output/error_function_with_invalid_condition_name.json b/tests/translator/output/error_function_with_invalid_condition_name.json index 3e2da2acf..0526f87c1 100644 --- a/tests/translator/output/error_function_with_invalid_condition_name.json +++ b/tests/translator/output/error_function_with_invalid_condition_name.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Every Condition member must be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Every Condition member must be a string.", "errors": [ { diff --git a/tests/translator/output/error_function_with_invalid_deployment_preference_hook_property.json b/tests/translator/output/error_function_with_invalid_deployment_preference_hook_property.json index 251a19e5e..0eda9f900 100644 --- a/tests/translator/output/error_function_with_invalid_deployment_preference_hook_property.json +++ b/tests/translator/output/error_function_with_invalid_deployment_preference_hook_property.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MinimalFunction] is invalid. ", + "'Hooks' property of 'DeploymentPreference' must be a dictionary" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MinimalFunction] is invalid. 'Hooks' property of 'DeploymentPreference' must be a dictionary", "errors": [ { diff --git a/tests/translator/output/error_function_with_invalid_dlq_property_type.json b/tests/translator/output/error_function_with_invalid_dlq_property_type.json index 96111b6d7..4b5c2ed9d 100644 --- a/tests/translator/output/error_function_with_invalid_dlq_property_type.json +++ b/tests/translator/output/error_function_with_invalid_dlq_property_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MySqsDlqLambdaFunction] is invalid. ", + "Property 'DeadLetterQueue.Type' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MySqsDlqLambdaFunction] is invalid. Property 'DeadLetterQueue.Type' should be a string." } diff --git a/tests/translator/output/error_function_with_invalid_event_bridge_rule.json b/tests/translator/output/error_function_with_invalid_event_bridge_rule.json index 3da966b58..b79b029a3 100644 --- a/tests/translator/output/error_function_with_invalid_event_bridge_rule.json +++ b/tests/translator/output/error_function_with_invalid_event_bridge_rule.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [TestFunction] is invalid. ", + "Event with id [TestEventBridgeRule] is invalid. ", + "State and Enabled Properties cannot both be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [TestFunction] is invalid. Event with id [TestEventBridgeRule] is invalid. State and Enabled Properties cannot both be specified." } diff --git a/tests/translator/output/error_function_with_invalid_event_destination_config.json b/tests/translator/output/error_function_with_invalid_event_destination_config.json index d6c5664c4..487df2d93 100644 --- a/tests/translator/output/error_function_with_invalid_event_destination_config.json +++ b/tests/translator/output/error_function_with_invalid_event_destination_config.json @@ -1,3 +1,13 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyFunctionWithInvalidOnFailureType] is invalid. ", + "Event with id [MyFunctionWithInvalidOnFailureTypeStreamEvent] is invalid. ", + "Property 'DestinationConfig.OnFailure' should be a map. ", + "Resource with id [MyFunctionWithMissingOnFailure] is invalid. ", + "Event with id [MyFunctionWithMissingOnFailureStreamEvent] is invalid. ", + "Property 'DestinationConfig.OnFailure' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyFunctionWithInvalidOnFailureType] is invalid. Event with id [MyFunctionWithInvalidOnFailureTypeStreamEvent] is invalid. Property 'DestinationConfig.OnFailure' should be a map. Resource with id [MyFunctionWithMissingOnFailure] is invalid. Event with id [MyFunctionWithMissingOnFailureStreamEvent] is invalid. Property 'DestinationConfig.OnFailure' should be a map." } diff --git a/tests/translator/output/error_function_with_invalid_kms_type_for_self_managed_kafka.json b/tests/translator/output/error_function_with_invalid_kms_type_for_self_managed_kafka.json index 8440a12a8..b7099a7ba 100644 --- a/tests/translator/output/error_function_with_invalid_kms_type_for_self_managed_kafka.json +++ b/tests/translator/output/error_function_with_invalid_kms_type_for_self_managed_kafka.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "Property 'SecretsManagerKmsKeyId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. Property 'SecretsManagerKmsKeyId' should be a string." } diff --git a/tests/translator/output/error_function_with_invalid_policy_statement.json b/tests/translator/output/error_function_with_invalid_policy_statement.json index 7f43c1586..4e9884f11 100644 --- a/tests/translator/output/error_function_with_invalid_policy_statement.json +++ b/tests/translator/output/error_function_with_invalid_policy_statement.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [UnknownTemplate] is invalid. ", + "Policy at index 1 in the 'Policies' property is not valid" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [UnknownTemplate] is invalid. Policy at index 1 in the 'Policies' property is not valid", "errors": [ { diff --git a/tests/translator/output/error_function_with_invalid_schedule_event.json b/tests/translator/output/error_function_with_invalid_schedule_event.json index c46ce7a45..5d09b9fc3 100644 --- a/tests/translator/output/error_function_with_invalid_schedule_event.json +++ b/tests/translator/output/error_function_with_invalid_schedule_event.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ScheduledFunction] is invalid. ", + "Event with id [Schedule1] is invalid. ", + "State and Enabled Properties cannot both be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ScheduledFunction] is invalid. Event with id [Schedule1] is invalid. State and Enabled Properties cannot both be specified.", "errors": [ { diff --git a/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json b/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json index f52c232d9..a9c911511 100644 --- a/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json +++ b/tests/translator/output/error_function_with_invalid_stream_eventsource_dest_type.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyFunction] is invalid. ", + "Event with id [MyFunctionStreamEvent] is invalid. ", + "The only valid values for 'Type' are 'SQS' and 'SNS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyFunction] is invalid. Event with id [MyFunctionStreamEvent] is invalid. The only valid values for 'Type' are 'SQS' and 'SNS'", "errors": [ { diff --git a/tests/translator/output/error_function_with_method_auth_and_no_api_auth.json b/tests/translator/output/error_function_with_method_auth_and_no_api_auth.json index 5e02eb6cb..e36f9880b 100644 --- a/tests/translator/output/error_function_with_method_auth_and_no_api_auth.json +++ b/tests/translator/output/error_function_with_method_auth_and_no_api_auth.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HelloWorldFunction] is invalid. ", + "Event with id [HttpGetUserGroupIdUserId] is invalid. ", + "Unable to set Authorizer on API method [get] for path [/users/{groupId}/{userId}] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HelloWorldFunction] is invalid. Event with id [HttpGetUserGroupIdUserId] is invalid. Unable to set Authorizer on API method [get] for path [/users/{groupId}/{userId}] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified.", "errors": [ { diff --git a/tests/translator/output/error_function_with_mq_kms_invalid_type.json b/tests/translator/output/error_function_with_mq_kms_invalid_type.json index 346ca025c..940acda27 100644 --- a/tests/translator/output/error_function_with_mq_kms_invalid_type.json +++ b/tests/translator/output/error_function_with_mq_kms_invalid_type.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "Property 'SecretsManagerKmsKeyId' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. Property 'SecretsManagerKmsKeyId' should be a string." } diff --git a/tests/translator/output/error_function_with_no_alias_provisioned_concurrency.json b/tests/translator/output/error_function_with_no_alias_provisioned_concurrency.json index b8bfdc0f8..b543822ce 100644 --- a/tests/translator/output/error_function_with_no_alias_provisioned_concurrency.json +++ b/tests/translator/output/error_function_with_no_alias_provisioned_concurrency.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MinimalFunction] is invalid. ", + "To set ProvisionedConcurrencyConfig AutoPublishALias must be defined on the function" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MinimalFunction] is invalid. To set ProvisionedConcurrencyConfig AutoPublishALias must be defined on the function", "errors": [ { diff --git a/tests/translator/output/error_function_with_schedue_dlq_intrinsic_function.json b/tests/translator/output/error_function_with_schedue_dlq_intrinsic_function.json index 84e30a2f4..197395694 100644 --- a/tests/translator/output/error_function_with_schedue_dlq_intrinsic_function.json +++ b/tests/translator/output/error_function_with_schedue_dlq_intrinsic_function.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [testLambdaFn] is invalid. ", + "Event with id [testLambdaFnSchedule] is invalid. ", + "QueueLogicalId must be a string" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [testLambdaFn] is invalid. Event with id [testLambdaFnSchedule] is invalid. QueueLogicalId must be a string", "errors": [ { diff --git a/tests/translator/output/error_function_with_schedule_both_dlq_property_provided.json b/tests/translator/output/error_function_with_schedule_both_dlq_property_provided.json index 7d5047ea9..ebe109a69 100644 --- a/tests/translator/output/error_function_with_schedule_both_dlq_property_provided.json +++ b/tests/translator/output/error_function_with_schedule_both_dlq_property_provided.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ScheduledFunction] is invalid. ", + "Event with id [ScheduledFunctionSchedule] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ScheduledFunction] is invalid. Event with id [ScheduledFunctionSchedule] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig" } diff --git a/tests/translator/output/error_function_with_schedule_invalid_dlq_type.json b/tests/translator/output/error_function_with_schedule_invalid_dlq_type.json index f6f334da1..1ba498d15 100644 --- a/tests/translator/output/error_function_with_schedule_invalid_dlq_type.json +++ b/tests/translator/output/error_function_with_schedule_invalid_dlq_type.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ScheduledFunction] is invalid. ", + "Event with id [ScheduledFunctionSchedule] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ScheduledFunction] is invalid. Event with id [ScheduledFunctionSchedule] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" } diff --git a/tests/translator/output/error_function_with_schedule_missing_dlq_property.json b/tests/translator/output/error_function_with_schedule_missing_dlq_property.json index d653850d4..f26312684 100644 --- a/tests/translator/output/error_function_with_schedule_missing_dlq_property.json +++ b/tests/translator/output/error_function_with_schedule_missing_dlq_property.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ScheduledFunction] is invalid. ", + "Event with id [ScheduledFunctionSchedule] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ScheduledFunction] is invalid. Event with id [ScheduledFunctionSchedule] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig" } diff --git a/tests/translator/output/error_function_with_schedulev2.json b/tests/translator/output/error_function_with_schedulev2.json index 97ec2f46a..557cfe550 100644 --- a/tests/translator/output/error_function_with_schedulev2.json +++ b/tests/translator/output/error_function_with_schedulev2.json @@ -1,3 +1,16 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 4. ", + "Resource with id [ScheduledFunction] is invalid. ", + "Event with id [ScheduledFunctionScheduleMissingDLQProperty] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig Resource with id [ScheduledFunction2] is invalid. ", + "Event with id [ScheduledFunction2ScheduleIntrinsics] is invalid. ", + "QueueLogicalId must be a string Resource with id [ScheduledFunction3] is invalid. ", + "Event with id [ScheduledFunction3ScheduleBothProvided] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig Resource with id [ScheduledFunction4] is invalid. ", + "Event with id [ScheduledFunction4ScheduleInvalidType] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 4. Resource with id [ScheduledFunction] is invalid. Event with id [ScheduledFunctionScheduleMissingDLQProperty] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig Resource with id [ScheduledFunction2] is invalid. Event with id [ScheduledFunction2ScheduleIntrinsics] is invalid. QueueLogicalId must be a string Resource with id [ScheduledFunction3] is invalid. Event with id [ScheduledFunction3ScheduleBothProvided] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig Resource with id [ScheduledFunction4] is invalid. Event with id [ScheduledFunction4ScheduleInvalidType] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" } diff --git a/tests/translator/output/error_function_with_unknown_policy_template.json b/tests/translator/output/error_function_with_unknown_policy_template.json index 5ba89e352..e598e5b99 100644 --- a/tests/translator/output/error_function_with_unknown_policy_template.json +++ b/tests/translator/output/error_function_with_unknown_policy_template.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [UnknownTemplate] is invalid. ", + "Policy at index 2 in the 'Policies' property is not valid" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [UnknownTemplate] is invalid. Policy at index 2 in the 'Policies' property is not valid", "errors": [ { diff --git a/tests/translator/output/error_gateway_response_invalid_type_int.json b/tests/translator/output/error_gateway_response_invalid_type_int.json index 6a22a82dc..a03e4ac6d 100644 --- a/tests/translator/output/error_gateway_response_invalid_type_int.json +++ b/tests/translator/output/error_gateway_response_invalid_type_int.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiResource] is invalid. ", + "Invalid property type 'int' for GatewayResponses. ", + "Expected an object of type 'GatewayResponse'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiResource] is invalid. Invalid property type 'int' for GatewayResponses. Expected an object of type 'GatewayResponse'.", "errors": [ { diff --git a/tests/translator/output/error_gateway_response_invalid_type_intrinsic.json b/tests/translator/output/error_gateway_response_invalid_type_intrinsic.json index b3ee6a8a0..977674ceb 100644 --- a/tests/translator/output/error_gateway_response_invalid_type_intrinsic.json +++ b/tests/translator/output/error_gateway_response_invalid_type_intrinsic.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiResource] is invalid. ", + "Unable to set GatewayResponses attribute because intrinsic functions are not supported for this field." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiResource] is invalid. Unable to set GatewayResponses attribute because intrinsic functions are not supported for this field.", "errors": [ { diff --git a/tests/translator/output/error_globals_api_with_stage_name.json b/tests/translator/output/error_globals_api_with_stage_name.json index 6bb994ff4..426ceed06 100644 --- a/tests/translator/output/error_globals_api_with_stage_name.json +++ b/tests/translator/output/error_globals_api_with_stage_name.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "'Globals' section is invalid. ", + "'StageName' is not a supported property of 'Api'. ", + "Must be one of the following values - ['Auth', 'Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'MinimumCompressionSize', 'Cors', 'GatewayResponses', 'AccessLogSetting', 'CanarySetting', 'TracingEnabled', 'OpenApiVersion', 'Domain']" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'StageName' is not a supported property of 'Api'. Must be one of the following values - ['Auth', 'Name', 'DefinitionUri', 'CacheClusterEnabled', 'CacheClusterSize', 'Variables', 'EndpointConfiguration', 'MethodSettings', 'BinaryMediaTypes', 'MinimumCompressionSize', 'Cors', 'GatewayResponses', 'AccessLogSetting', 'CanarySetting', 'TracingEnabled', 'OpenApiVersion', 'Domain']", "errors": [ { diff --git a/tests/translator/output/error_globals_is_not_dict.json b/tests/translator/output/error_globals_is_not_dict.json index 263bfb20a..e49524e00 100644 --- a/tests/translator/output/error_globals_is_not_dict.json +++ b/tests/translator/output/error_globals_is_not_dict.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "'Globals' section is invalid. ", + "It must be a non-empty dictionary" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. It must be a non-empty dictionary", "errors": [ { diff --git a/tests/translator/output/error_globals_unsupported_property.json b/tests/translator/output/error_globals_unsupported_property.json index 42aa0bcfd..e4188c14c 100644 --- a/tests/translator/output/error_globals_unsupported_property.json +++ b/tests/translator/output/error_globals_unsupported_property.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "'Globals' section is invalid. ", + "'SomeKey' is not a supported property of 'Function'. ", + "Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig']" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'SomeKey' is not a supported property of 'Function'. Must be one of the following values - ['Handler', 'Runtime', 'CodeUri', 'DeadLetterQueue', 'Description', 'MemorySize', 'Timeout', 'VpcConfig', 'Environment', 'Tags', 'Tracing', 'KmsKeyArn', 'AutoPublishAlias', 'AutoPublishAliasAllProperties', 'Layers', 'DeploymentPreference', 'RolePath', 'PermissionsBoundary', 'ReservedConcurrentExecutions', 'ProvisionedConcurrencyConfig', 'AssumeRolePolicyDocument', 'EventInvokeConfig', 'FileSystemConfigs', 'CodeSigningConfigArn', 'Architectures', 'SnapStart', 'EphemeralStorage', 'FunctionUrlConfig']" } diff --git a/tests/translator/output/error_globals_unsupported_type.json b/tests/translator/output/error_globals_unsupported_type.json index 214796cb7..ac4d893e1 100644 --- a/tests/translator/output/error_globals_unsupported_type.json +++ b/tests/translator/output/error_globals_unsupported_type.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "'Globals' section is invalid. ", + "'NewType' is not supported. ", + "Must be one of the following values - ['Api', 'Function', 'HttpApi', 'SimpleTable']" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. 'Globals' section is invalid. 'NewType' is not supported. Must be one of the following values - ['Api', 'Function', 'HttpApi', 'SimpleTable']", "errors": [ { diff --git a/tests/translator/output/error_http_api_def_body_uri.json b/tests/translator/output/error_http_api_def_body_uri.json index df2151e31..44d56b401 100644 --- a/tests/translator/output/error_http_api_def_body_uri.json +++ b/tests/translator/output/error_http_api_def_body_uri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Specify either 'DefinitionUri' or 'DefinitionBody' property and not both." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Specify either 'DefinitionUri' or 'DefinitionBody' property and not both.", "errors": [ { diff --git a/tests/translator/output/error_http_api_event_invalid_api.json b/tests/translator/output/error_http_api_event_invalid_api.json index 0649422c1..bcea69296 100644 --- a/tests/translator/output/error_http_api_event_invalid_api.json +++ b/tests/translator/output/error_http_api_event_invalid_api.json @@ -1,3 +1,16 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 3. ", + "Resource with id [HttpApiFunction] is invalid. ", + "Event with id [Api] is invalid. ", + "ApiId must be a valid reference to an 'AWS::Serverless::HttpApi' resource in same template. ", + "Resource with id [HttpApiFunctionInvalidRouteSettings] is invalid. ", + "Event with id [ApiNullRouteSettings] is invalid. ", + "Property 'RouteSettings' should be a map. ", + "Resource with id [HttpApiFunctionInvalidRouteSettings2] is invalid. ", + "Event with id [ApiRouteSettingsNotMap] is invalid. ", + "Property 'RouteSettings' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 3. Resource with id [HttpApiFunction] is invalid. Event with id [Api] is invalid. ApiId must be a valid reference to an 'AWS::Serverless::HttpApi' resource in same template. Resource with id [HttpApiFunctionInvalidRouteSettings] is invalid. Event with id [ApiNullRouteSettings] is invalid. Property 'RouteSettings' should be a map. Resource with id [HttpApiFunctionInvalidRouteSettings2] is invalid. Event with id [ApiRouteSettingsNotMap] is invalid. Property 'RouteSettings' should be a map." } diff --git a/tests/translator/output/error_http_api_event_multiple_same_path.json b/tests/translator/output/error_http_api_event_multiple_same_path.json index 458f021fe..29d775115 100644 --- a/tests/translator/output/error_http_api_event_multiple_same_path.json +++ b/tests/translator/output/error_http_api_event_multiple_same_path.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HttpApiFunction2] is invalid. ", + "Event with id [Api2] is invalid. ", + "API method 'x-amazon-apigateway-any-method' defined multiple times for path '$default'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HttpApiFunction2] is invalid. Event with id [Api2] is invalid. API method 'x-amazon-apigateway-any-method' defined multiple times for path '$default'.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_auth.json b/tests/translator/output/error_http_api_invalid_auth.json index f7a435bbd..418841217 100644 --- a/tests/translator/output/error_http_api_invalid_auth.json +++ b/tests/translator/output/error_http_api_invalid_auth.json @@ -1,4 +1,27 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 6. ", + "Resource with id [Function] is invalid. ", + "Event with id [Api] is invalid. ", + "Unable to set Authorizer [myAuth] on API method [x-amazon-apigateway-any-method] for path [$default] because the related API does not define any Authorizers. ", + "Resource with id [Function2] is invalid. ", + "Event with id [Api2] is invalid. ", + "Unable to set Authorizer [myAuth] on API method [x-amazon-apigateway-any-method] for path [$default] because it wasn't defined in the API's Authorizers. ", + "Resource with id [Function3] is invalid. ", + "Event with id [Api3] is invalid. ", + "Unable to set Authorizer on API method [x-amazon-apigateway-any-method] for path [$default] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. ", + "Resource with id [Function4] is invalid. ", + "Event with id [Api4] is invalid. ", + "Unable to set Authorizer on API method [x-amazon-apigateway-any-method] for path [$default] because 'AuthorizationScopes' must be a list of strings. ", + "Resource with id [MyApi5] is invalid. ", + "'OpenIdConnectUrl' is no longer a supported property for authorizer 'OIDC'. ", + "Please refer to the AWS SAM documentation. ", + "Resource with id [NonStringAuthFunction] is invalid. ", + "Event with id [GetRoot] is invalid. ", + "Unable to set Authorizer [{'Ref': 'MyAuth'}] on API method [get] for path [/]. ", + "The method authorizer must be a string with a corresponding dict entry in the api authorizer." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 6. Resource with id [Function] is invalid. Event with id [Api] is invalid. Unable to set Authorizer [myAuth] on API method [x-amazon-apigateway-any-method] for path [$default] because the related API does not define any Authorizers. Resource with id [Function2] is invalid. Event with id [Api2] is invalid. Unable to set Authorizer [myAuth] on API method [x-amazon-apigateway-any-method] for path [$default] because it wasn't defined in the API's Authorizers. Resource with id [Function3] is invalid. Event with id [Api3] is invalid. Unable to set Authorizer on API method [x-amazon-apigateway-any-method] for path [$default] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified. Resource with id [Function4] is invalid. Event with id [Api4] is invalid. Unable to set Authorizer on API method [x-amazon-apigateway-any-method] for path [$default] because 'AuthorizationScopes' must be a list of strings. Resource with id [MyApi5] is invalid. 'OpenIdConnectUrl' is no longer a supported property for authorizer 'OIDC'. Please refer to the AWS SAM documentation. Resource with id [NonStringAuthFunction] is invalid. Event with id [GetRoot] is invalid. Unable to set Authorizer [{'Ref': 'MyAuth'}] on API method [get] for path [/]. The method authorizer must be a string with a corresponding dict entry in the api authorizer.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_basepath_type.json b/tests/translator/output/error_http_api_invalid_basepath_type.json index d6d40affc..378f20abc 100644 --- a/tests/translator/output/error_http_api_invalid_basepath_type.json +++ b/tests/translator/output/error_http_api_invalid_basepath_type.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HttpApi] is invalid. ", + "Basepath must be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HttpApi] is invalid. Basepath must be a string.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_disable_execute_api_endpoint.json b/tests/translator/output/error_http_api_invalid_disable_execute_api_endpoint.json index 3945ad212..bd3ed3145 100644 --- a/tests/translator/output/error_http_api_invalid_disable_execute_api_endpoint.json +++ b/tests/translator/output/error_http_api_invalid_disable_execute_api_endpoint.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Type of property 'DisableExecuteApiEndpoint' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Type of property 'DisableExecuteApiEndpoint' is invalid.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_event_authorizer_type.json b/tests/translator/output/error_http_api_invalid_event_authorizer_type.json index 9ba8cd5e2..88303c224 100644 --- a/tests/translator/output/error_http_api_invalid_event_authorizer_type.json +++ b/tests/translator/output/error_http_api_invalid_event_authorizer_type.json @@ -1,3 +1,13 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [AuthorizedApi] is invalid. ", + "Property 'Auth.Authorizers' should be a map. ", + "Resource with id [SignInFunction] is invalid. ", + "Event with id [MainFuncPostV1] is invalid. ", + "Unable to set Authorizer [['CognitoAuthorizer']] on API method [post] for path [/v1/signin]. ", + "The method authorizer must be a string with a corresponding dict entry in the api authorizer." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [AuthorizedApi] is invalid. Property 'Auth.Authorizers' should be a map. Resource with id [SignInFunction] is invalid. Event with id [MainFuncPostV1] is invalid. Unable to set Authorizer [['CognitoAuthorizer']] on API method [post] for path [/v1/signin]. The method authorizer must be a string with a corresponding dict entry in the api authorizer." } diff --git a/tests/translator/output/error_http_api_invalid_lambda_auth.json b/tests/translator/output/error_http_api_invalid_lambda_auth.json index 337028dff..dd7196172 100644 --- a/tests/translator/output/error_http_api_invalid_lambda_auth.json +++ b/tests/translator/output/error_http_api_invalid_lambda_auth.json @@ -1,4 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApi1] is invalid. ", + "LambdaAuth Lambda Authorizer must define 'AuthorizerPayloadFormatVersion'. ", + "Resource with id [MyApi2] is invalid. ", + "LambdaAuth Lambda Authorizer must define 'FunctionArn'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApi1] is invalid. LambdaAuth Lambda Authorizer must define 'AuthorizerPayloadFormatVersion'. Resource with id [MyApi2] is invalid. LambdaAuth Lambda Authorizer must define 'FunctionArn'.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_openapi.json b/tests/translator/output/error_http_api_invalid_openapi.json index 937d2232c..06e71e970 100644 --- a/tests/translator/output/error_http_api_invalid_openapi.json +++ b/tests/translator/output/error_http_api_invalid_openapi.json @@ -1,4 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Api] is invalid. ", + "Structure of the SAM template is invalid. ", + "Invalid OpenApi document. ", + "Invalid values or missing keys for 'openapi' or 'paths' in 'DefinitionBody'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Api] is invalid. Structure of the SAM template is invalid. Invalid OpenApi document. Invalid values or missing keys for 'openapi' or 'paths' in 'DefinitionBody'.", "errors": [ { diff --git a/tests/translator/output/error_http_api_invalid_tags_format.json b/tests/translator/output/error_http_api_invalid_tags_format.json index eb5532eba..fcf8c4807 100644 --- a/tests/translator/output/error_http_api_invalid_tags_format.json +++ b/tests/translator/output/error_http_api_invalid_tags_format.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Tags in OpenApi DefinitionBody needs to be a list. ", + "{'name': 'tag1'} is a dict not a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Tags in OpenApi DefinitionBody needs to be a list. {'name': 'tag1'} is a dict not a list.", "errors": [ { diff --git a/tests/translator/output/error_http_api_null_method.json b/tests/translator/output/error_http_api_null_method.json index 569c949ae..37fab4c4f 100644 --- a/tests/translator/output/error_http_api_null_method.json +++ b/tests/translator/output/error_http_api_null_method.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Definition of method 'post' for path '/test' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Definition of method 'post' for path '/test' should be a map." } diff --git a/tests/translator/output/error_http_api_tags.json b/tests/translator/output/error_http_api_tags.json index 425bb3555..f856bef29 100644 --- a/tests/translator/output/error_http_api_tags.json +++ b/tests/translator/output/error_http_api_tags.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Api] is invalid. ", + "Unable to add `Tags` because 'DefinitionBody' does not contain a valid OpenApi definition." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Api] is invalid. Unable to add `Tags` because 'DefinitionBody' does not contain a valid OpenApi definition.", "errors": [ { diff --git a/tests/translator/output/error_http_api_tags_def_uri.json b/tests/translator/output/error_http_api_tags_def_uri.json index 6a5f63946..fa316c511 100644 --- a/tests/translator/output/error_http_api_tags_def_uri.json +++ b/tests/translator/output/error_http_api_tags_def_uri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Api] is invalid. ", + "Tags works only with inline OpenApi specified in the 'DefinitionBody' property." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Api] is invalid. Tags works only with inline OpenApi specified in the 'DefinitionBody' property.", "errors": [ { diff --git a/tests/translator/output/error_http_api_with_cors_def_uri.json b/tests/translator/output/error_http_api_with_cors_def_uri.json index f71c25417..98e57059b 100644 --- a/tests/translator/output/error_http_api_with_cors_def_uri.json +++ b/tests/translator/output/error_http_api_with_cors_def_uri.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "Cors works only with inline OpenApi specified in 'DefinitionBody' property." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. Cors works only with inline OpenApi specified in 'DefinitionBody' property.", "errors": [ { diff --git a/tests/translator/output/error_http_api_with_disable_api_execute_endpoint_false.json b/tests/translator/output/error_http_api_with_disable_api_execute_endpoint_false.json index 822bd5c17..5d218256f 100644 --- a/tests/translator/output/error_http_api_with_disable_api_execute_endpoint_false.json +++ b/tests/translator/output/error_http_api_with_disable_api_execute_endpoint_false.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ApiGatewayApi] is invalid. ", + "DisableExecuteApiEndpoint works only within 'DefinitionBody' property." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ApiGatewayApi] is invalid. DisableExecuteApiEndpoint works only within 'DefinitionBody' property." } diff --git a/tests/translator/output/error_http_api_with_invalid_auth_while_method_auth_is_none.json b/tests/translator/output/error_http_api_with_invalid_auth_while_method_auth_is_none.json index cfd46c268..9e4375758 100644 --- a/tests/translator/output/error_http_api_with_invalid_auth_while_method_auth_is_none.json +++ b/tests/translator/output/error_http_api_with_invalid_auth_while_method_auth_is_none.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [MyApi] is invalid. ", + "Property 'Auth' should be a map. ", + "Resource with id [MyRestApi] is invalid. ", + "Property 'Auth' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [MyApi] is invalid. Property 'Auth' should be a map. Resource with id [MyRestApi] is invalid. Property 'Auth' should be a map." } diff --git a/tests/translator/output/error_httpapi_mtls_configuration_invalid_field.json b/tests/translator/output/error_httpapi_mtls_configuration_invalid_field.json index 60eedabe8..5ba56ef8b 100644 --- a/tests/translator/output/error_httpapi_mtls_configuration_invalid_field.json +++ b/tests/translator/output/error_httpapi_mtls_configuration_invalid_field.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [TruststoreVersionWrong,WrongTruststoreUri] is invalid. ", + "Available MutualTlsAuthentication fields are ['TruststoreUri', 'TruststoreVersion']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [TruststoreVersionWrong,WrongTruststoreUri] is invalid. Available MutualTlsAuthentication fields are ['TruststoreUri', 'TruststoreVersion'].", "errors": [ { diff --git a/tests/translator/output/error_httpapi_mtls_configuration_invalid_type.json b/tests/translator/output/error_httpapi_mtls_configuration_invalid_type.json index 2990f5cdd..ae51671c7 100644 --- a/tests/translator/output/error_httpapi_mtls_configuration_invalid_type.json +++ b/tests/translator/output/error_httpapi_mtls_configuration_invalid_type.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "MutualTlsAuthentication must be a map with at least one of the following fields ['TruststoreUri', 'TruststoreVersion']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. MutualTlsAuthentication must be a map with at least one of the following fields ['TruststoreUri', 'TruststoreVersion'].", "errors": [ { diff --git a/tests/translator/output/error_implicit_http_api_auth_any_method.json b/tests/translator/output/error_implicit_http_api_auth_any_method.json index 1f0f89890..35bc4e83f 100644 --- a/tests/translator/output/error_implicit_http_api_auth_any_method.json +++ b/tests/translator/output/error_implicit_http_api_auth_any_method.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Could not find x-amazon-apigateway-any-method in /{domain} within DefinitionBody." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Could not find x-amazon-apigateway-any-method in /{domain} within DefinitionBody." } diff --git a/tests/translator/output/error_implicit_http_api_method.json b/tests/translator/output/error_implicit_http_api_method.json index 197d480dc..99c867fa4 100644 --- a/tests/translator/output/error_implicit_http_api_method.json +++ b/tests/translator/output/error_implicit_http_api_method.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HttpApiFunction] is invalid. ", + "Event with id [Basic] is invalid. ", + "Property 'Method' is required." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HttpApiFunction] is invalid. Event with id [Basic] is invalid. Property 'Method' is required." } diff --git a/tests/translator/output/error_implicit_http_api_path.json b/tests/translator/output/error_implicit_http_api_path.json index c2a0e9699..92cbab451 100644 --- a/tests/translator/output/error_implicit_http_api_path.json +++ b/tests/translator/output/error_implicit_http_api_path.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HttpApiFunction] is invalid. ", + "Event with id [Basic] is invalid. ", + "Property 'Path' should be a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HttpApiFunction] is invalid. Event with id [Basic] is invalid. Property 'Path' should be a string." } diff --git a/tests/translator/output/error_implicit_http_api_properties.json b/tests/translator/output/error_implicit_http_api_properties.json index 21c8827a1..81d4087bb 100644 --- a/tests/translator/output/error_implicit_http_api_properties.json +++ b/tests/translator/output/error_implicit_http_api_properties.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [HttpApiFunction] is invalid. ", + "Event with id [Basic] is invalid. ", + "Properties should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [HttpApiFunction] is invalid. Event with id [Basic] is invalid. Properties should be a map.", "errors": [ { diff --git a/tests/translator/output/error_intrinsic_sub_with_list.json b/tests/translator/output/error_intrinsic_sub_with_list.json index 04d8ace3d..15dbd258e 100644 --- a/tests/translator/output/error_intrinsic_sub_with_list.json +++ b/tests/translator/output/error_intrinsic_sub_with_list.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Invalid Fn::Sub variable value ['a', 'b']. ", + "Fn::Sub expects all variables to be strings." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Invalid Fn::Sub variable value ['a', 'b']. Fn::Sub expects all variables to be strings." } diff --git a/tests/translator/output/error_invalid_config_mq.json b/tests/translator/output/error_invalid_config_mq.json index af304546a..18d92c1e0 100644 --- a/tests/translator/output/error_invalid_config_mq.json +++ b/tests/translator/output/error_invalid_config_mq.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "Invalid property Type specified in SourceAccessConfigurations. ", + "The supported values are: ['BASIC_AUTH', 'VIRTUAL_HOST']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. Invalid property Type specified in SourceAccessConfigurations. The supported values are: ['BASIC_AUTH', 'VIRTUAL_HOST']." } diff --git a/tests/translator/output/error_invalid_cors_dict.json b/tests/translator/output/error_invalid_cors_dict.json index 8d31ddd46..5a5da8656 100644 --- a/tests/translator/output/error_invalid_cors_dict.json +++ b/tests/translator/output/error_invalid_cors_dict.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [ServerlessRestApi] is invalid. ", + "Invalid value for 'Cors' property" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [ServerlessRestApi] is invalid. Invalid value for 'Cors' property", "errors": [ { diff --git a/tests/translator/output/error_invalid_document_empty_semantic_version.json b/tests/translator/output/error_invalid_document_empty_semantic_version.json index d16e59a8b..bd84c7284 100644 --- a/tests/translator/output/error_invalid_document_empty_semantic_version.json +++ b/tests/translator/output/error_invalid_document_empty_semantic_version.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [helloworld] is invalid. ", + "Property 'SemanticVersion' cannot be blank." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [helloworld] is invalid. Property 'SemanticVersion' cannot be blank.", "errors": [ { diff --git a/tests/translator/output/error_invalid_findinmap.json b/tests/translator/output/error_invalid_findinmap.json index 92cb4cb3f..e7e996352 100644 --- a/tests/translator/output/error_invalid_findinmap.json +++ b/tests/translator/output/error_invalid_findinmap.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Invalid FindInMap value ['ApplicationLocations', 'ap-southeast-1']. ", + "FindInMap expects an array with 3 values." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Invalid FindInMap value ['ApplicationLocations', 'ap-southeast-1']. FindInMap expects an array with 3 values.", "errors": [ { diff --git a/tests/translator/output/error_invalid_logical_id.json b/tests/translator/output/error_invalid_logical_id.json index 4f10ff694..894280a0b 100644 --- a/tests/translator/output/error_invalid_logical_id.json +++ b/tests/translator/output/error_invalid_logical_id.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [0] is invalid. ", + "Logical ids must be alphanumeric. ", + "Resource with id [Bad-Function-Name-@#$%^&] is invalid. ", + "Logical ids must be alphanumeric." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [0] is invalid. Logical ids must be alphanumeric. Resource with id [Bad-Function-Name-@#$%^&] is invalid. Logical ids must be alphanumeric." } diff --git a/tests/translator/output/error_invalid_mapping_by_findinmap.json b/tests/translator/output/error_invalid_mapping_by_findinmap.json index 82fa107f5..226079a02 100644 --- a/tests/translator/output/error_invalid_mapping_by_findinmap.json +++ b/tests/translator/output/error_invalid_mapping_by_findinmap.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Cannot use Fn::FindInMap on Mapping 'InvaliMapping' which is not a a two-level map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Cannot use Fn::FindInMap on Mapping 'InvaliMapping' which is not a a two-level map." } diff --git a/tests/translator/output/error_invalid_method_definition.json b/tests/translator/output/error_invalid_method_definition.json index e7d7be0cc..690f375c9 100644 --- a/tests/translator/output/error_invalid_method_definition.json +++ b/tests/translator/output/error_invalid_method_definition.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Definition of method 'tags' for path '/' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Definition of method 'tags' for path '/' should be a map." } diff --git a/tests/translator/output/error_invalid_properties.json b/tests/translator/output/error_invalid_properties.json index e7f3997dc..b16871355 100644 --- a/tests/translator/output/error_invalid_properties.json +++ b/tests/translator/output/error_invalid_properties.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Attribute 'Properties' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Attribute 'Properties' should be a map.", "errors": [ { diff --git a/tests/translator/output/error_invalid_property_in_sac_documentdb.json b/tests/translator/output/error_invalid_property_in_sac_documentdb.json index 5937654ef..c4262bd72 100644 --- a/tests/translator/output/error_invalid_property_in_sac_documentdb.json +++ b/tests/translator/output/error_invalid_property_in_sac_documentdb.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DocumentDBFunction] is invalid. ", + "Event with id [MyDocumentDBEvent] is invalid. ", + "Invalid property Type specified in SourceAccessConfigurations. ", + "The supported values are: ['BASIC_AUTH']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DocumentDBFunction] is invalid. Event with id [MyDocumentDBEvent] is invalid. Invalid property Type specified in SourceAccessConfigurations. The supported values are: ['BASIC_AUTH']." } diff --git a/tests/translator/output/error_invalid_resource_parameters.json b/tests/translator/output/error_invalid_resource_parameters.json index 2e40a12d8..9c35e634a 100644 --- a/tests/translator/output/error_invalid_resource_parameters.json +++ b/tests/translator/output/error_invalid_resource_parameters.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [UnknownPropertyInResource] is invalid. ", + "property SomeProperty not defined for resource of type AWS::Serverless::Api" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [UnknownPropertyInResource] is invalid. property SomeProperty not defined for resource of type AWS::Serverless::Api", "errors": [ { diff --git a/tests/translator/output/error_invalid_self_managed_kafka_config.json b/tests/translator/output/error_invalid_self_managed_kafka_config.json index aa3bd4504..942a4864d 100644 --- a/tests/translator/output/error_invalid_self_managed_kafka_config.json +++ b/tests/translator/output/error_invalid_self_managed_kafka_config.json @@ -1,3 +1,13 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "VPC_SUBNET and VPC_SECURITY_GROUP in SourceAccessConfigurations for SelfManagedKafka must be both provided. ", + "Resource with id [KafkaFunction2] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "SourceAccessConfigurations for self managed kafka event should be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. VPC_SUBNET and VPC_SECURITY_GROUP in SourceAccessConfigurations for SelfManagedKafka must be both provided. Resource with id [KafkaFunction2] is invalid. Event with id [MyKafkaCluster] is invalid. SourceAccessConfigurations for self managed kafka event should be a list." } diff --git a/tests/translator/output/error_invalid_template.json b/tests/translator/output/error_invalid_template.json index 9b0bea98c..0f90e7e62 100644 --- a/tests/translator/output/error_invalid_template.json +++ b/tests/translator/output/error_invalid_template.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "'Resources' section is required" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. 'Resources' section is required", "errors": [ { diff --git a/tests/translator/output/error_layer_invalid_properties.json b/tests/translator/output/error_layer_invalid_properties.json index 69022a3f8..4ab0cd4b5 100644 --- a/tests/translator/output/error_layer_invalid_properties.json +++ b/tests/translator/output/error_layer_invalid_properties.json @@ -1,3 +1,24 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 9. ", + "Resource with id [LayerWithLicenseInfoList] is invalid. ", + "Property 'LicenseInfo' should be a string. ", + "Resource with id [LayerWithNoContentUri] is invalid. ", + "Missing required property 'ContentUri'. ", + "Resource with id [LayerWithRetentionPolicy] is invalid. ", + "'RetentionPolicy' must be one of the following options: ['Retain', 'Delete']. ", + "Resource with id [LayerWithRetentionPolicyAsIntrinsic] is invalid. ", + "'RetentionPolicy' does not accept intrinsic functions, please use one of the following options: ['Retain', 'Delete'] Resource with id [LayerWithRetentionPolicyListParam] is invalid. ", + "Could not resolve parameter for 'RetentionPolicy' or parameter is not a String. ", + "Resource with id [LayerWithRetentionPolicyParam] is invalid. ", + "'RetentionPolicy' must be one of the following options: ['Retain', 'Delete']. ", + "Resource with id [LayerWithRuntimesString] is invalid. ", + "Type of property 'CompatibleRuntimes' is invalid. ", + "Resource with id [LayerWithStringArchitecture] is invalid. ", + "Type of property 'CompatibleArchitectures' is invalid. ", + "Resource with id [LayerWithWrongArchitecture5b58896c5a] is invalid. ", + "CompatibleArchitectures needs to be a list of 'x86_64' or 'arm64'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 9. Resource with id [LayerWithLicenseInfoList] is invalid. Property 'LicenseInfo' should be a string. Resource with id [LayerWithNoContentUri] is invalid. Missing required property 'ContentUri'. Resource with id [LayerWithRetentionPolicy] is invalid. 'RetentionPolicy' must be one of the following options: ['Retain', 'Delete']. Resource with id [LayerWithRetentionPolicyAsIntrinsic] is invalid. 'RetentionPolicy' does not accept intrinsic functions, please use one of the following options: ['Retain', 'Delete'] Resource with id [LayerWithRetentionPolicyListParam] is invalid. Could not resolve parameter for 'RetentionPolicy' or parameter is not a String. Resource with id [LayerWithRetentionPolicyParam] is invalid. 'RetentionPolicy' must be one of the following options: ['Retain', 'Delete']. Resource with id [LayerWithRuntimesString] is invalid. Type of property 'CompatibleRuntimes' is invalid. Resource with id [LayerWithStringArchitecture] is invalid. Type of property 'CompatibleArchitectures' is invalid. Resource with id [LayerWithWrongArchitecture5b58896c5a] is invalid. CompatibleArchitectures needs to be a list of 'x86_64' or 'arm64'" } diff --git a/tests/translator/output/error_mappings_is_null.json b/tests/translator/output/error_mappings_is_null.json index 100e81dc5..1a8edad43 100644 --- a/tests/translator/output/error_mappings_is_null.json +++ b/tests/translator/output/error_mappings_is_null.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "'Mappings' or 'Parameters' is either null or not a valid dictionary." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. 'Mappings' or 'Parameters' is either null or not a valid dictionary." } diff --git a/tests/translator/output/error_missing_basic_auth_in_mq.json b/tests/translator/output/error_missing_basic_auth_in_mq.json index 51e91a081..4567a08a2 100644 --- a/tests/translator/output/error_missing_basic_auth_in_mq.json +++ b/tests/translator/output/error_missing_basic_auth_in_mq.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "No BASIC_AUTH property specified in SourceAccessConfigurations." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. No BASIC_AUTH property specified in SourceAccessConfigurations." } diff --git a/tests/translator/output/error_missing_basic_auth_uri_in_mq.json b/tests/translator/output/error_missing_basic_auth_uri_in_mq.json index 937bb579c..f3fd67734 100644 --- a/tests/translator/output/error_missing_basic_auth_uri_in_mq.json +++ b/tests/translator/output/error_missing_basic_auth_uri_in_mq.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "No BASIC_AUTH URI property specified in SourceAccessConfigurations." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. No BASIC_AUTH URI property specified in SourceAccessConfigurations." } diff --git a/tests/translator/output/error_missing_broker.json b/tests/translator/output/error_missing_broker.json index 74320f2b1..8c925ca3d 100644 --- a/tests/translator/output/error_missing_broker.json +++ b/tests/translator/output/error_missing_broker.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunctionMyMQQueue] is invalid. ", + "Missing required property 'Broker'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunctionMyMQQueue] is invalid. Missing required property 'Broker'." } diff --git a/tests/translator/output/error_missing_kafka_bootstrap_server_for_self_managed_kafka.json b/tests/translator/output/error_missing_kafka_bootstrap_server_for_self_managed_kafka.json index 194a65436..8e07456b6 100644 --- a/tests/translator/output/error_missing_kafka_bootstrap_server_for_self_managed_kafka.json +++ b/tests/translator/output/error_missing_kafka_bootstrap_server_for_self_managed_kafka.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "No KafkaBootstrapServers provided for self managed kafka as an event source" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. No KafkaBootstrapServers provided for self managed kafka as an event source", "errors": [ { diff --git a/tests/translator/output/error_missing_queue.json b/tests/translator/output/error_missing_queue.json index e1b366ab0..cebbaab0f 100644 --- a/tests/translator/output/error_missing_queue.json +++ b/tests/translator/output/error_missing_queue.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [SQSFunctionMySqsQueue] is invalid. ", + "Missing required property 'Queue'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [SQSFunctionMySqsQueue] is invalid. Missing required property 'Queue'." } diff --git a/tests/translator/output/error_missing_sac_in_mq.json b/tests/translator/output/error_missing_sac_in_mq.json index 6181090f6..992a2fb3d 100644 --- a/tests/translator/output/error_missing_sac_in_mq.json +++ b/tests/translator/output/error_missing_sac_in_mq.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "No SourceAccessConfigurations for Amazon MQ event provided." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. No SourceAccessConfigurations for Amazon MQ event provided.", "errors": [ { diff --git a/tests/translator/output/error_missing_source_access_configurations_documentdb.json b/tests/translator/output/error_missing_source_access_configurations_documentdb.json index 34446d636..048b8ca3d 100644 --- a/tests/translator/output/error_missing_source_access_configurations_documentdb.json +++ b/tests/translator/output/error_missing_source_access_configurations_documentdb.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DocumentDBFunction] is invalid. ", + "Event with id [MyDocumentDBEvent] is invalid. ", + "No SourceAccessConfigurations for Amazon DocumentDB event provided." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DocumentDBFunction] is invalid. Event with id [MyDocumentDBEvent] is invalid. No SourceAccessConfigurations for Amazon DocumentDB event provided." } diff --git a/tests/translator/output/error_missing_source_access_configurations_for_self_managed_kafka.json b/tests/translator/output/error_missing_source_access_configurations_for_self_managed_kafka.json index 45508c42d..c823d885b 100644 --- a/tests/translator/output/error_missing_source_access_configurations_for_self_managed_kafka.json +++ b/tests/translator/output/error_missing_source_access_configurations_for_self_managed_kafka.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "No SourceAccessConfigurations for self managed kafka event provided." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. No SourceAccessConfigurations for self managed kafka event provided.", "errors": [ { diff --git a/tests/translator/output/error_missing_startingposition.json b/tests/translator/output/error_missing_startingposition.json index 397272ef8..64e51eaa4 100644 --- a/tests/translator/output/error_missing_startingposition.json +++ b/tests/translator/output/error_missing_startingposition.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KinesisFunctionMyKinesisStream] is invalid. ", + "Missing required property 'StartingPosition'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KinesisFunctionMyKinesisStream] is invalid. Missing required property 'StartingPosition'." } diff --git a/tests/translator/output/error_missing_stream.json b/tests/translator/output/error_missing_stream.json index 43386d129..bdd181094 100644 --- a/tests/translator/output/error_missing_stream.json +++ b/tests/translator/output/error_missing_stream.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DynamoDBFunctionMyDDBStream] is invalid. ", + "Missing required property 'Stream'." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DynamoDBFunctionMyDDBStream] is invalid. Missing required property 'Stream'." } diff --git a/tests/translator/output/error_missing_topics_for_self_managed_kafka.json b/tests/translator/output/error_missing_topics_for_self_managed_kafka.json index b339b3085..66f287c32 100644 --- a/tests/translator/output/error_missing_topics_for_self_managed_kafka.json +++ b/tests/translator/output/error_missing_topics_for_self_managed_kafka.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "No Topics provided for self managed kafka as an event source" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. No Topics provided for self managed kafka as an event source", "errors": [ { diff --git a/tests/translator/output/error_msk_invalid_sourceaccessconfigurations.json b/tests/translator/output/error_msk_invalid_sourceaccessconfigurations.json index 18a77d278..238b67fa5 100644 --- a/tests/translator/output/error_msk_invalid_sourceaccessconfigurations.json +++ b/tests/translator/output/error_msk_invalid_sourceaccessconfigurations.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyMskStreamProcessorMyMskEvent] is invalid. ", + "Type of property 'SourceAccessConfigurations' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyMskStreamProcessorMyMskEvent] is invalid. Type of property 'SourceAccessConfigurations' is invalid." } diff --git a/tests/translator/output/error_multiple_auth_mechanism_self_managed_kafka_config.json b/tests/translator/output/error_multiple_auth_mechanism_self_managed_kafka_config.json index 13b26fcab..c7d8776ff 100644 --- a/tests/translator/output/error_multiple_auth_mechanism_self_managed_kafka_config.json +++ b/tests/translator/output/error_multiple_auth_mechanism_self_managed_kafka_config.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "Multiple auth mechanism properties specified in SourceAccessConfigurations for self managed kafka event." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. Multiple auth mechanism properties specified in SourceAccessConfigurations for self managed kafka event.", "errors": [ { diff --git a/tests/translator/output/error_multiple_basic_auth_documentdb.json b/tests/translator/output/error_multiple_basic_auth_documentdb.json index 945f380db..a8225895c 100644 --- a/tests/translator/output/error_multiple_basic_auth_documentdb.json +++ b/tests/translator/output/error_multiple_basic_auth_documentdb.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DocumentDBFunction] is invalid. ", + "Event with id [MyDocumentDBEvent] is invalid. ", + "Multiple BASIC_AUTH properties specified in SourceAccessConfigurations." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DocumentDBFunction] is invalid. Event with id [MyDocumentDBEvent] is invalid. Multiple BASIC_AUTH properties specified in SourceAccessConfigurations." } diff --git a/tests/translator/output/error_multiple_basic_auth_in_mq.json b/tests/translator/output/error_multiple_basic_auth_in_mq.json index 060971507..cbc2781d0 100644 --- a/tests/translator/output/error_multiple_basic_auth_in_mq.json +++ b/tests/translator/output/error_multiple_basic_auth_in_mq.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MQFunction] is invalid. ", + "Event with id [MyMQQueue] is invalid. ", + "Multiple BASIC_AUTH properties specified in SourceAccessConfigurations." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MQFunction] is invalid. Event with id [MyMQQueue] is invalid. Multiple BASIC_AUTH properties specified in SourceAccessConfigurations." } diff --git a/tests/translator/output/error_multiple_resource_errors.json b/tests/translator/output/error_multiple_resource_errors.json index c27314d97..26d373669 100644 --- a/tests/translator/output/error_multiple_resource_errors.json +++ b/tests/translator/output/error_multiple_resource_errors.json @@ -1,4 +1,19 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 5. ", + "Resource with id [BadCodeUriFunction] is invalid. ", + "'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. ", + "Resource with id [BadCodeUriTypeFunction] is invalid. ", + "'CodeUri' requires Bucket and Key properties to be specified. ", + "Resource with id [BadDefinitionUriApi] is invalid. ", + "'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. ", + "Resource with id [BadDefinitionUriTypeApi] is invalid. ", + "'DefinitionUri' requires Bucket and Key properties to be specified. ", + "Resource with id [ExternalS3Function] is invalid. ", + "Event with id [S3Event] is invalid. ", + "S3 events must reference an S3 bucket in the same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 5. Resource with id [BadCodeUriFunction] is invalid. 'CodeUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [BadCodeUriTypeFunction] is invalid. 'CodeUri' requires Bucket and Key properties to be specified. Resource with id [BadDefinitionUriApi] is invalid. 'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter. Resource with id [BadDefinitionUriTypeApi] is invalid. 'DefinitionUri' requires Bucket and Key properties to be specified. Resource with id [ExternalS3Function] is invalid. Event with id [S3Event] is invalid. S3 events must reference an S3 bucket in the same template.", "errors": [ { diff --git a/tests/translator/output/error_multiple_topics_for_self_managed_kafka.json b/tests/translator/output/error_multiple_topics_for_self_managed_kafka.json index 5548c0b16..391b47c33 100644 --- a/tests/translator/output/error_multiple_topics_for_self_managed_kafka.json +++ b/tests/translator/output/error_multiple_topics_for_self_managed_kafka.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [KafkaFunction] is invalid. ", + "Event with id [MyKafkaCluster] is invalid. ", + "Topics for self managed kafka only supports single configuration entry." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [KafkaFunction] is invalid. Event with id [MyKafkaCluster] is invalid. Topics for self managed kafka only supports single configuration entry.", "errors": [ { diff --git a/tests/translator/output/error_no_basic_auth_provided_documentdb.json b/tests/translator/output/error_no_basic_auth_provided_documentdb.json index 5937654ef..c4262bd72 100644 --- a/tests/translator/output/error_no_basic_auth_provided_documentdb.json +++ b/tests/translator/output/error_no_basic_auth_provided_documentdb.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DocumentDBFunction] is invalid. ", + "Event with id [MyDocumentDBEvent] is invalid. ", + "Invalid property Type specified in SourceAccessConfigurations. ", + "The supported values are: ['BASIC_AUTH']." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DocumentDBFunction] is invalid. Event with id [MyDocumentDBEvent] is invalid. Invalid property Type specified in SourceAccessConfigurations. The supported values are: ['BASIC_AUTH']." } diff --git a/tests/translator/output/error_no_basic_auth_uri_provided_documentdb.json b/tests/translator/output/error_no_basic_auth_uri_provided_documentdb.json index 110806e3a..9babd1e4f 100644 --- a/tests/translator/output/error_no_basic_auth_uri_provided_documentdb.json +++ b/tests/translator/output/error_no_basic_auth_uri_provided_documentdb.json @@ -1,3 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [DocumentDBFunction] is invalid. ", + "Event with id [MyDocumentDBEvent] is invalid. ", + "No BASIC_AUTH URI property specified in SourceAccessConfigurations." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [DocumentDBFunction] is invalid. Event with id [MyDocumentDBEvent] is invalid. No BASIC_AUTH URI property specified in SourceAccessConfigurations." } diff --git a/tests/translator/output/error_null_application_id.json b/tests/translator/output/error_null_application_id.json index 70494b69c..4b04b16b4 100644 --- a/tests/translator/output/error_null_application_id.json +++ b/tests/translator/output/error_null_application_id.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Application] is invalid. ", + "Property 'ApplicationId' is required." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Application] is invalid. Property 'ApplicationId' is required." } diff --git a/tests/translator/output/error_null_method_definition.json b/tests/translator/output/error_null_method_definition.json index f1ec7f329..bebba08fe 100644 --- a/tests/translator/output/error_null_method_definition.json +++ b/tests/translator/output/error_null_method_definition.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "Definition of method 'get' for path '/' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. Definition of method 'get' for path '/' should be a map." } diff --git a/tests/translator/output/error_reserved_sam_tag.json b/tests/translator/output/error_reserved_sam_tag.json index cd4ab4c66..66f12c94f 100644 --- a/tests/translator/output/error_reserved_sam_tag.json +++ b/tests/translator/output/error_reserved_sam_tag.json @@ -1,4 +1,14 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [AlexaSkillFunc] is invalid. ", + "lambda:createdBy is a reserved Tag key name and cannot be set on your resource. ", + "Please change the tag key in the input. ", + "Resource with id [SomeApplication] is invalid. ", + "lambda:createdBy is a reserved Tag key name and cannot be set on your resource. ", + "Please change the tag key in the input." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [AlexaSkillFunc] is invalid. lambda:createdBy is a reserved Tag key name and cannot be set on your resource. Please change the tag key in the input. Resource with id [SomeApplication] is invalid. lambda:createdBy is a reserved Tag key name and cannot be set on your resource. Please change the tag key in the input.", "errors": [ { diff --git a/tests/translator/output/error_resource_not_dict.json b/tests/translator/output/error_resource_not_dict.json index 6da5b6269..28608b6e1 100644 --- a/tests/translator/output/error_resource_not_dict.json +++ b/tests/translator/output/error_resource_not_dict.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "All 'Resources' must be Objects. ", + "If you're using YAML, this may be an indentation issue." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. All 'Resources' must be Objects. If you're using YAML, this may be an indentation issue.", "errors": [ { diff --git a/tests/translator/output/error_resource_policy_not_dict.json b/tests/translator/output/error_resource_policy_not_dict.json index 7f86db9c5..4e0c6419c 100644 --- a/tests/translator/output/error_resource_policy_not_dict.json +++ b/tests/translator/output/error_resource_policy_not_dict.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "ResourcePolicy must be a map (ResourcePolicyStatement)." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. ResourcePolicy must be a map (ResourcePolicyStatement)." } diff --git a/tests/translator/output/error_resource_policy_not_dict_empty_api.json b/tests/translator/output/error_resource_policy_not_dict_empty_api.json index 7f86db9c5..4e0c6419c 100644 --- a/tests/translator/output/error_resource_policy_not_dict_empty_api.json +++ b/tests/translator/output/error_resource_policy_not_dict_empty_api.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "ResourcePolicy must be a map (ResourcePolicyStatement)." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. ResourcePolicy must be a map (ResourcePolicyStatement)." } diff --git a/tests/translator/output/error_resource_properties_not_dict.json b/tests/translator/output/error_resource_properties_not_dict.json index e7f3997dc..b16871355 100644 --- a/tests/translator/output/error_resource_properties_not_dict.json +++ b/tests/translator/output/error_resource_properties_not_dict.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Attribute 'Properties' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Attribute 'Properties' should be a map.", "errors": [ { diff --git a/tests/translator/output/error_s3_bucket_invalid_properties.json b/tests/translator/output/error_s3_bucket_invalid_properties.json index 347d58c28..417b5d1c1 100644 --- a/tests/translator/output/error_s3_bucket_invalid_properties.json +++ b/tests/translator/output/error_s3_bucket_invalid_properties.json @@ -1,3 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [Bucket] is invalid. ", + "Properties should be a map. ", + "Resource with id [Bucket2] is invalid. ", + "Property 'Tags' should be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [Bucket] is invalid. Properties should be a map. Resource with id [Bucket2] is invalid. Property 'Tags' should be a list." } diff --git a/tests/translator/output/error_s3_lambda_configuration_invalid_type.json b/tests/translator/output/error_s3_lambda_configuration_invalid_type.json index 34c13f9dc..f3b7a9c36 100644 --- a/tests/translator/output/error_s3_lambda_configuration_invalid_type.json +++ b/tests/translator/output/error_s3_lambda_configuration_invalid_type.json @@ -1,3 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 2. ", + "Resource with id [AnotherBucket] is invalid. ", + "Property 'NotificationConfiguration' should be a map. ", + "Resource with id [RandomBucket] is invalid. ", + "Invalid type for LambdaConfigurations. ", + "Must be a list." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 2. Resource with id [AnotherBucket] is invalid. Property 'NotificationConfiguration' should be a map. Resource with id [RandomBucket] is invalid. Invalid type for LambdaConfigurations. Must be a list." } diff --git a/tests/translator/output/error_s3_not_in_template.json b/tests/translator/output/error_s3_not_in_template.json index 95fc000b4..5851d0026 100644 --- a/tests/translator/output/error_s3_not_in_template.json +++ b/tests/translator/output/error_s3_not_in_template.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Event with id [ImageBucket] is invalid. ", + "S3 events must reference an S3 bucket in the same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Event with id [ImageBucket] is invalid. S3 events must reference an S3 bucket in the same template.", "errors": [ { diff --git a/tests/translator/output/error_schema_validation_wrong_property.json b/tests/translator/output/error_schema_validation_wrong_property.json index dfd06f4ac..214f529c9 100644 --- a/tests/translator/output/error_schema_validation_wrong_property.json +++ b/tests/translator/output/error_schema_validation_wrong_property.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyConnector] is invalid. ", + "property Desitation not defined for resource of type AWS::Serverless::Connector" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyConnector] is invalid. property Desitation not defined for resource of type AWS::Serverless::Connector" } diff --git a/tests/translator/output/error_schema_validation_wrong_type.json b/tests/translator/output/error_schema_validation_wrong_type.json index d2ef275b3..b89e81cbc 100644 --- a/tests/translator/output/error_schema_validation_wrong_type.json +++ b/tests/translator/output/error_schema_validation_wrong_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyConnector] is invalid. ", + "'Id' is missing or not a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyConnector] is invalid. 'Id' is missing or not a string." } diff --git a/tests/translator/output/error_sns_intrinsics.json b/tests/translator/output/error_sns_intrinsics.json index 12d0efba1..b24f42db8 100644 --- a/tests/translator/output/error_sns_intrinsics.json +++ b/tests/translator/output/error_sns_intrinsics.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [SaveNotificationFunction] is invalid. ", + "Event with id [NotificationTopic] is invalid. ", + "No QueueARN or QueueURL provided." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [SaveNotificationFunction] is invalid. Event with id [NotificationTopic] is invalid. No QueueARN or QueueURL provided.", "errors": [ { diff --git a/tests/translator/output/error_sns_not_in_template.json b/tests/translator/output/error_sns_not_in_template.json index f00d6113b..b808e5f7e 100644 --- a/tests/translator/output/error_sns_not_in_template.json +++ b/tests/translator/output/error_sns_not_in_template.json @@ -1,4 +1,11 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Function] is invalid. ", + "Event with id [NotificationTopic] is invalid. ", + "SNS events must reference an SNS topic in the same template." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Function] is invalid. Event with id [NotificationTopic] is invalid. SNS events must reference an SNS topic in the same template.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_definition_string.json b/tests/translator/output/error_state_machine_definition_string.json index 2c524bdc1..d753a3aa7 100644 --- a/tests/translator/output/error_state_machine_definition_string.json +++ b/tests/translator/output/error_state_machine_definition_string.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [StateMachine] is invalid. ", + "Property 'Definition' should be a map." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [StateMachine] is invalid. Property 'Definition' should be a map." } diff --git a/tests/translator/output/error_state_machine_invalid_s3_object.json b/tests/translator/output/error_state_machine_invalid_s3_object.json index af082cde1..e5ba3ec43 100644 --- a/tests/translator/output/error_state_machine_invalid_s3_object.json +++ b/tests/translator/output/error_state_machine_invalid_s3_object.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [StateMachine] is invalid. ", + "'DefinitionUri' requires Bucket and Key properties to be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [StateMachine] is invalid. 'DefinitionUri' requires Bucket and Key properties to be specified.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_invalid_s3_string.json b/tests/translator/output/error_state_machine_invalid_s3_string.json index c3b40fc01..e2e3230f9 100644 --- a/tests/translator/output/error_state_machine_invalid_s3_string.json +++ b/tests/translator/output/error_state_machine_invalid_s3_string.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [StateMachine] is invalid. ", + "'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [StateMachine] is invalid. 'DefinitionUri' is not a valid S3 Uri of the form 's3://bucket/key' with optional versionId query parameter.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_schedulev2.json b/tests/translator/output/error_state_machine_schedulev2.json index 355ecf5b5..647bc515a 100644 --- a/tests/translator/output/error_state_machine_schedulev2.json +++ b/tests/translator/output/error_state_machine_schedulev2.json @@ -1,3 +1,12 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 4. ", + "Event with id [ScheduledStateMachine2ScheduleIntrinsics] is invalid. ", + "QueueLogicalId must be a string Event with id [ScheduledStateMachine3ScheduleBothProvided] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig Event with id [ScheduledStateMachine4ScheduleInvalidType] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS' Event with id [ScheduledStateMachineScheduleMissingDLQProperty] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 4. Event with id [ScheduledStateMachine2ScheduleIntrinsics] is invalid. QueueLogicalId must be a string Event with id [ScheduledStateMachine3ScheduleBothProvided] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig Event with id [ScheduledStateMachine4ScheduleInvalidType] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS' Event with id [ScheduledStateMachineScheduleMissingDLQProperty] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig" } diff --git a/tests/translator/output/error_state_machine_with_api_auth_none.json b/tests/translator/output/error_state_machine_with_api_auth_none.json index e53ff9538..ef8794525 100644 --- a/tests/translator/output/error_state_machine_with_api_auth_none.json +++ b/tests/translator/output/error_state_machine_with_api_auth_none.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [WithLambdaTokenAuth] is invalid. ", + "Unable to set Authorizer on API method [post] for path [/startWithLambdaToken] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [WithLambdaTokenAuth] is invalid. Unable to set Authorizer on API method [post] for path [/startWithLambdaToken] because 'NONE' is only a valid value when a DefaultAuthorizer on the API is specified.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_with_api_intrinsics.json b/tests/translator/output/error_state_machine_with_api_intrinsics.json index 7cfa6b2d6..60f1d7c4b 100644 --- a/tests/translator/output/error_state_machine_with_api_intrinsics.json +++ b/tests/translator/output/error_state_machine_with_api_intrinsics.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [PostPostEcho] is invalid. ", + "Type of property 'UnescapeMappingTemplate' is invalid." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [PostPostEcho] is invalid. Type of property 'UnescapeMappingTemplate' is invalid." } diff --git a/tests/translator/output/error_state_machine_with_cwe_both_dlq_property_provided.json b/tests/translator/output/error_state_machine_with_cwe_both_dlq_property_provided.json index 9e8df0ba2..8e4717e24 100644 --- a/tests/translator/output/error_state_machine_with_cwe_both_dlq_property_provided.json +++ b/tests/translator/output/error_state_machine_with_cwe_both_dlq_property_provided.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineCWEvent] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineCWEvent] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig" } diff --git a/tests/translator/output/error_state_machine_with_cwe_invalid_dlq_type.json b/tests/translator/output/error_state_machine_with_cwe_invalid_dlq_type.json index 220c818c1..10d6a723b 100644 --- a/tests/translator/output/error_state_machine_with_cwe_invalid_dlq_type.json +++ b/tests/translator/output/error_state_machine_with_cwe_invalid_dlq_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineCWEvent] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineCWEvent] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" } diff --git a/tests/translator/output/error_state_machine_with_cwe_missing_dlq_property.json b/tests/translator/output/error_state_machine_with_cwe_missing_dlq_property.json index 2f0cf0b1d..33b7a8dca 100644 --- a/tests/translator/output/error_state_machine_with_cwe_missing_dlq_property.json +++ b/tests/translator/output/error_state_machine_with_cwe_missing_dlq_property.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineCWEvent] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineCWEvent] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig" } diff --git a/tests/translator/output/error_state_machine_with_eb_dlq_generated_intrinsic_function.json b/tests/translator/output/error_state_machine_with_eb_dlq_generated_intrinsic_function.json index d1cd900cd..2aa88d3be 100644 --- a/tests/translator/output/error_state_machine_with_eb_dlq_generated_intrinsic_function.json +++ b/tests/translator/output/error_state_machine_with_eb_dlq_generated_intrinsic_function.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineCWEvent] is invalid. ", + "QueueLogicalId must be a string" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineCWEvent] is invalid. QueueLogicalId must be a string", "errors": [ { diff --git a/tests/translator/output/error_state_machine_with_invalid_default_authorizer.json b/tests/translator/output/error_state_machine_with_invalid_default_authorizer.json index 77b8a53e7..e95f6fc91 100644 --- a/tests/translator/output/error_state_machine_with_invalid_default_authorizer.json +++ b/tests/translator/output/error_state_machine_with_invalid_default_authorizer.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [MyApi] is invalid. ", + "DefaultAuthorizer is not a string." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [MyApi] is invalid. DefaultAuthorizer is not a string." } diff --git a/tests/translator/output/error_state_machine_with_invalid_schedule_event.json b/tests/translator/output/error_state_machine_with_invalid_schedule_event.json index f2d49c52d..aa3e7a9e3 100644 --- a/tests/translator/output/error_state_machine_with_invalid_schedule_event.json +++ b/tests/translator/output/error_state_machine_with_invalid_schedule_event.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [Schedule1] is invalid. ", + "State and Enabled Properties cannot both be specified." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [Schedule1] is invalid. State and Enabled Properties cannot both be specified.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_with_no_api_authorizers.json b/tests/translator/output/error_state_machine_with_no_api_authorizers.json index 8f46cf757..2c882729c 100644 --- a/tests/translator/output/error_state_machine_with_no_api_authorizers.json +++ b/tests/translator/output/error_state_machine_with_no_api_authorizers.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [WithLambdaTokenAuth] is invalid. ", + "Unable to set Authorizer [MyUndefinedAuthorizer] on API method [post] for path [/startWithLambdaToken] because the related API does not define any Authorizers." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [WithLambdaTokenAuth] is invalid. Unable to set Authorizer [MyUndefinedAuthorizer] on API method [post] for path [/startWithLambdaToken] because the related API does not define any Authorizers.", "errors": [ { diff --git a/tests/translator/output/error_state_machine_with_schedule_both_dlq_property_provided.json b/tests/translator/output/error_state_machine_with_schedule_both_dlq_property_provided.json index 3d4947cad..91b73c60e 100644 --- a/tests/translator/output/error_state_machine_with_schedule_both_dlq_property_provided.json +++ b/tests/translator/output/error_state_machine_with_schedule_both_dlq_property_provided.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineScheduleEvent] is invalid. ", + "You can either define 'Arn' or 'Type' property of DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineScheduleEvent] is invalid. You can either define 'Arn' or 'Type' property of DeadLetterConfig" } diff --git a/tests/translator/output/error_state_machine_with_schedule_dlq_generated_intrinsic_function.json b/tests/translator/output/error_state_machine_with_schedule_dlq_generated_intrinsic_function.json index 247eecb7a..8eabe7096 100644 --- a/tests/translator/output/error_state_machine_with_schedule_dlq_generated_intrinsic_function.json +++ b/tests/translator/output/error_state_machine_with_schedule_dlq_generated_intrinsic_function.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineScheduleEvent] is invalid. ", + "QueueLogicalId must be a string" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineScheduleEvent] is invalid. QueueLogicalId must be a string", "errors": [ { diff --git a/tests/translator/output/error_state_machine_with_schedule_invalid_dlq_type.json b/tests/translator/output/error_state_machine_with_schedule_invalid_dlq_type.json index 568d6ea44..00bfccc19 100644 --- a/tests/translator/output/error_state_machine_with_schedule_invalid_dlq_type.json +++ b/tests/translator/output/error_state_machine_with_schedule_invalid_dlq_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineScheduleEvent] is invalid. ", + "The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineScheduleEvent] is invalid. The only valid value for 'Type' property of DeadLetterConfig is 'SQS'" } diff --git a/tests/translator/output/error_state_machine_with_schedule_missing_dlq_property.json b/tests/translator/output/error_state_machine_with_schedule_missing_dlq_property.json index f6f55cf33..771c57fce 100644 --- a/tests/translator/output/error_state_machine_with_schedule_missing_dlq_property.json +++ b/tests/translator/output/error_state_machine_with_schedule_missing_dlq_property.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [StateMachineScheduleEvent] is invalid. ", + "No 'Arn' or 'Type' property provided for DeadLetterConfig" + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [StateMachineScheduleEvent] is invalid. No 'Arn' or 'Type' property provided for DeadLetterConfig" } diff --git a/tests/translator/output/error_state_machine_with_undefined_api_authorizer.json b/tests/translator/output/error_state_machine_with_undefined_api_authorizer.json index af7a0bb79..505f13160 100644 --- a/tests/translator/output/error_state_machine_with_undefined_api_authorizer.json +++ b/tests/translator/output/error_state_machine_with_undefined_api_authorizer.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Event with id [WithLambdaTokenAuth] is invalid. ", + "Unable to set Authorizer [MyUndefinedAuthorizer] on API method [post] for path [/startWithLambdaToken] because it wasn't defined in the API's Authorizers." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Event with id [WithLambdaTokenAuth] is invalid. Unable to set Authorizer [MyUndefinedAuthorizer] on API method [post] for path [/startWithLambdaToken] because it wasn't defined in the API's Authorizers." } diff --git a/tests/translator/output/error_swagger_security_definitions_not_dict.json b/tests/translator/output/error_swagger_security_definitions_not_dict.json index 3690dab15..942ab6d27 100644 --- a/tests/translator/output/error_swagger_security_definitions_not_dict.json +++ b/tests/translator/output/error_swagger_security_definitions_not_dict.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "securityDefinitions must be a dictionary." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. securityDefinitions must be a dictionary." } diff --git a/tests/translator/output/error_swagger_security_not_dict.json b/tests/translator/output/error_swagger_security_not_dict.json index 11d14da3b..8c2499b7f 100644 --- a/tests/translator/output/error_swagger_security_not_dict.json +++ b/tests/translator/output/error_swagger_security_not_dict.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "CustomAuthorizer in Security for path /path method put is not a valid dictionary." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. CustomAuthorizer in Security for path /path method put is not a valid dictionary." } diff --git a/tests/translator/output/error_swagger_security_not_dict_with_api_key_required.json b/tests/translator/output/error_swagger_security_not_dict_with_api_key_required.json index 604004a0e..3cce10ec2 100644 --- a/tests/translator/output/error_swagger_security_not_dict_with_api_key_required.json +++ b/tests/translator/output/error_swagger_security_not_dict_with_api_key_required.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Structure of the SAM template is invalid. ", + "[] in Security for path /path method put is not a valid dictionary." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Structure of the SAM template is invalid. [] in Security for path /path method put is not a valid dictionary." } diff --git a/tests/translator/output/error_table_invalid_attributetype.json b/tests/translator/output/error_table_invalid_attributetype.json index 2884e03aa..89d59a3e7 100644 --- a/tests/translator/output/error_table_invalid_attributetype.json +++ b/tests/translator/output/error_table_invalid_attributetype.json @@ -1,4 +1,10 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Table] is invalid. ", + "Invalid 'Type' \"bogus\"." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Table] is invalid. Invalid 'Type' \"bogus\".", "errors": [ { diff --git a/tests/translator/output/error_table_primary_key_missing_name.json b/tests/translator/output/error_table_primary_key_missing_name.json index 54fc7275a..58e74441c 100644 --- a/tests/translator/output/error_table_primary_key_missing_name.json +++ b/tests/translator/output/error_table_primary_key_missing_name.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Table] is invalid. ", + "Property 'PrimaryKey.Name' is required." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Table] is invalid. Property 'PrimaryKey.Name' is required." } diff --git a/tests/translator/output/error_table_primary_key_missing_type.json b/tests/translator/output/error_table_primary_key_missing_type.json index 0adbac932..7535c183c 100644 --- a/tests/translator/output/error_table_primary_key_missing_type.json +++ b/tests/translator/output/error_table_primary_key_missing_type.json @@ -1,3 +1,9 @@ { + "_autoGeneratedBreakdownErrorMessage": [ + "Invalid Serverless Application Specification document. ", + "Number of errors found: 1. ", + "Resource with id [Table] is invalid. ", + "Property 'PrimaryKey.Type' is required." + ], "errorMessage": "Invalid Serverless Application Specification document. Number of errors found: 1. Resource with id [Table] is invalid. Property 'PrimaryKey.Type' is required." }