From b7a36f9fe1014b1ed7dfd47c50e55ba13d960587 Mon Sep 17 00:00:00 2001 From: Yann Garcia Date: Tue, 9 Jun 2020 16:05:38 +0200 Subject: [PATCH] Move ProblemDetails in LibMec --- ccsrc/Protocols/Json/json_codec.cc | 31 +++---- ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn | 28 ++++--- .../AtsMec_AppEnablementAPI_TestCases.ttcn | 30 +++++-- ...AtsMec_RadioNodeLocationAPI_TestCases.ttcn | 2 + ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn | 82 ++++++++++--------- .../AtsMec_UEidentityAPI_TestCases.ttcn | 36 ++++---- ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn | 29 ------- ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn | 19 ----- .../ttcn/AppEnablementAPI_Templates.ttcn | 46 +++++++---- .../ttcn/AppEnablementAPI_TypesAndValues.ttcn | 19 ----- .../AppLCM/ttcn/AppLCM_TypesAndValues.ttcn | 20 ----- .../ttcn/BwManagementAPI_Templates.ttcn | 28 ------- .../ttcn/BwManagementAPI_TypesAndValues.ttcn | 19 ----- ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn | 29 ------- .../Grant/ttcn/Grant_TypesAndValues.ttcn | 20 ----- .../MeoPkgm/ttcn/MeoPkgm_Templates.ttcn | 31 +------ .../MeoPkgm/ttcn/MeoPkgm_TypesAndValues.ttcn | 20 ----- .../ttcn/MepmPkgm_TypesAndValues.ttcn | 20 ----- .../RnisAPI/ttcn/RnisAPI_Templates.ttcn | 28 ------- .../RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn | 19 ----- .../ttcn/UEAppInterfaceAPI_Templates.ttcn | 14 ---- .../UEAppInterfaceAPI_TypesAndValues.ttcn | 19 ----- .../ttcn/UEidentityAPI_Templates.ttcn | 28 ------- .../ttcn/UEidentityAPI_TypesAndValues.ttcn | 19 ----- ttcn/LibMec/ttcn/LibMec_Templates.ttcn | 40 +++++++++ ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn | 27 ++++++ .../LibItsHttp_JsonMessageBodyTypes.ttcn | 12 +-- .../LibItsHttp_JsonTemplates.ttcn | 67 +++------------ 28 files changed, 226 insertions(+), 556 deletions(-) create mode 100644 ttcn/LibMec/ttcn/LibMec_Templates.ttcn create mode 100644 ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 606668c..23fde2b 100644 --- a/ccsrc/Protocols/Json/json_codec.cc +++ b/ccsrc/Protocols/Json/json_codec.cc @@ -35,23 +35,23 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serviceInfo)) { const AppEnablementAPI__TypesAndValues::ServiceInfo& service_info = msg.serviceInfo(); service_info.encode(AppEnablementAPI__TypesAndValues::ServiceInfo_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"ServiceInfo\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = /*char2oct(CHARSTRING("{\"ServiceInfo\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_appTerminationNotificationSubscription)) { const AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription& app = msg.appTerminationNotificationSubscription(); app.encode(AppEnablementAPI__TypesAndValues::AppTerminationNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = /*char2oct(CHARSTRING("{\"AppTerminationNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_dnsRule)) { const AppEnablementAPI__TypesAndValues::DnsRule& dns_rule = msg.dnsRule(); dns_rule.encode(AppEnablementAPI__TypesAndValues::DnsRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"DnsRule\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = /*char2oct(CHARSTRING("{\"DnsRule\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_serAvailabilityNotificationSubscription)) { const AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription& ser = msg.serAvailabilityNotificationSubscription(); ser.encode(AppEnablementAPI__TypesAndValues::SerAvailabilityNotificationSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_trafficRule)) { const AppEnablementAPI__TypesAndValues::TrafficRule& traffic_rule = msg.trafficRule(); traffic_rule.encode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, encoding_buffer, TTCN_EncDec::CT_JSON); - data = char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}")); + data = /*char2oct(CHARSTRING("{\"SerAvailabilityNotificationSubscription\": ")) + */OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data())/* + char2oct(CHARSTRING("}"))*/; } else { loggers::get_instance().error("json_codec::encode: Not supported"); } @@ -75,6 +75,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy loggers::get_instance().warning("json_codec::decode: Failed to access p_params item (decode_str)"); return -1; // TODO Use p_data instead of return -1 } + loggers::get_instance().log("json_codec::decode: it->second='%c' / '%s'", it->second.c_str()[0], it->second.c_str()); } // Remove data structure name (if present) ... @@ -89,7 +90,7 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy // ..and create the decoding buffer TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); TTCN_EncDec::clear_error(); - loggers::get_instance().log("json_codec::decode: decoding_buffer=%c/%s", str[0], str.c_str()); + loggers::get_instance().log("json_codec::decode: decoding_buffer='%c' / '%s'", str[0], str.c_str()); TTCN_Buffer decoding_buffer(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); if (it->second.find("\"userList\"") != std::string::npos) { // Be careful to the order @@ -321,23 +322,15 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str())); bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON); msg.bwInfo() = bw_info; - } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, ProblemDetails in different modules - - -// UEidentityAPI__TypesAndValues::ProblemDetails problem_details; -// problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); -// msg.problemDetails__ue__identity() = problem_details; - - RnisAPI__TypesAndValues::ProblemDetails problem_details; - problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); - msg.problemDetails__rnis() = problem_details; - - + } else if (it->second.find("\"detail\"") != std::string::npos) { + LibMec__TypesAndValues::ProblemDetails problem_details; + problem_details.decode(LibMec__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON); + msg.problemDetails() = problem_details; } else { loggers::get_instance().warning("json_codec::decode: Unsupported variant"); return -1; } - + loggers::get_instance().log_msg("<<< json_codec::decode: ", (const Base_Type&)msg); return 0; } diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn index 622c05e..904f01c 100644 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -28,6 +28,8 @@ import from Ams_Pixits all; // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; @@ -133,12 +135,12 @@ mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ams_problem_details( - mw_problem_details( - -, - -, - 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, + -, + 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -276,7 +278,7 @@ mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( mw_problem_details( -, -, 400 ) @@ -925,7 +927,7 @@ mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( mw_problem_details( -, -, 400 ) @@ -1073,7 +1075,7 @@ mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( mw_problem_details( -, -, 400 ) @@ -1190,7 +1192,7 @@ mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( mw_problem_details( -, -, 404 ) @@ -1299,7 +1301,7 @@ mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( ) ) ) @@ -1432,7 +1434,7 @@ mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( ) ) ) @@ -1494,7 +1496,7 @@ mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_ams_problem_details( + mw_body_json_problem_details( ) ) ) diff --git a/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn index 402abb3..b05ae24 100644 --- a/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_AppEnablementAPI_TestCases.ttcn @@ -28,6 +28,8 @@ module AtsMec_AppEnablementAPI_TestCases { import from AppEnablementAPI_Pixits all; // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; @@ -179,7 +181,17 @@ module AtsMec_AppEnablementAPI_TestCases { m_http_message_body_json( m_body_json_service_info( m_service_info( - PX_SERVICE_NAME + PX_SERVICE_NAME, + -, -, -, -, -, + m_transport_info( + "transportId1", + "TC_MEC_SRV_APPSAQ_002_OK", + REST_HTTP, + "HTTP", + "2.0", + m_end_point_uris({"/meMp1/service/MyEntryPoint"}), + m_security_info + ) ) ) ) @@ -194,11 +206,11 @@ module AtsMec_AppEnablementAPI_TestCases { [] httpPort.receive( mw_http_response( mw_http_response_201_created( - mw_http_message_body_json( - mw_body_json_service_info( - mw_service_info( - PX_SERVICE_NAME //serName - )))))) -> value v_response { + mw_http_message_body_json( + mw_body_json_service_info( + mw_service_info( + PX_SERVICE_NAME //serName + )))))) -> value v_response { tc_ac.stop; if (f_check_headers(valueof(v_response.response.header)) == true) { @@ -218,7 +230,7 @@ module AtsMec_AppEnablementAPI_TestCases { ; to the MEC_APP_Subscriber entity */ - log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo and set notofocation ***"); + log("*** " & testcasename() & ": PASS: IUT successfully responds with a ServiceInfo and set notification ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: Header 'Location' was not present in the response headers ***"); @@ -383,7 +395,7 @@ module AtsMec_AppEnablementAPI_TestCases { httpPort.send( m_http_request( m_http_request_get( - "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), + "/" & PICS_ROOT_API & PX_MEC_SVC_MGMT_APPS_URI & "/" & oct2char(unichar2oct(PX_APP_INSTANCE_ID, "UTF-8")) & "/services/" & oct2char(unichar2oct(PX_SERVICE_ID, "UTF-8")), v_headers ) ) @@ -2839,7 +2851,7 @@ module AtsMec_AppEnablementAPI_TestCases { // Postamble f_cf_01_http_down(); - } // End of testcase TC_MEC_SRV_APPSAQ_004_NF + } // End of testcase TC_MEC_SRV_TRAF_003_NF /** * @desc Check that the IUT responds with an error when a request sent by a MEC Application doesn't comply with a required condition diff --git a/ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn index ed76dff..e91c965 100644 --- a/ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_RadioNodeLocationAPI_TestCases.ttcn @@ -30,6 +30,8 @@ module AtsMec_RadioNodeLocationAPI_TestCases { import from LocationAPI_Pixits all; // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; diff --git a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn index 612d144..a95e1eb 100644 --- a/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_RnisAPI_TestCases.ttcn @@ -31,6 +31,8 @@ module AtsMec_RnisAPI_TestCases { import from RnisAPI_Pixits all; // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; @@ -234,10 +236,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -308,10 +310,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a cell subscription ***"); @@ -596,10 +598,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -654,10 +656,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -712,10 +714,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -770,10 +772,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -828,10 +830,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -886,10 +888,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -944,10 +946,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); @@ -1002,10 +1004,10 @@ module AtsMec_RnisAPI_TestCases { mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_rni_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with HTTP error 400 Bad Request ***"); diff --git a/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn b/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn index fe7bcd5..de98752 100644 --- a/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_UEidentityAPI_TestCases.ttcn @@ -27,6 +27,8 @@ module AtsMec_UEidentityAPI_TestCases { import from UEidentityAPI_Pixits all; // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; import from LibMec_Functions all; import from LibMec_Pics all; import from LibMec_Pixits all; @@ -130,10 +132,10 @@ module AtsMec_UEidentityAPI_TestCases { mw_http_response( mw_http_response_400_bad_request( mw_http_message_body_json( - mw_body_json_ue_identity_problem_details( - mw_problem_details( - -, -, 400 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 400 Bad Request ***"); @@ -188,10 +190,10 @@ module AtsMec_UEidentityAPI_TestCases { mw_http_response( mw_http_response_404_not_found( mw_http_message_body_json( - mw_body_json_ue_identity_problem_details( - mw_problem_details( - -, -, 404 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 404 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***"); @@ -343,10 +345,10 @@ module AtsMec_UEidentityAPI_TestCases { mw_http_response( mw_http_response_400_bad_request/*( mw_http_message_body_json( - mw_body_json_ue_identity_problem_details( - mw_problem_details( - -, -, 400 - ))))*/)) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 400 + ))))*/)) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***"); @@ -413,10 +415,10 @@ module AtsMec_UEidentityAPI_TestCases { mw_http_response( mw_http_response_412_precondition_failed( mw_http_message_body_json( - mw_body_json_ue_identity_problem_details( - mw_problem_details( - -, -, 412 - )))))) { + mw_body_json_problem_details( + mw_problem_details( + -, -, 412 + )))))) { tc_ac.stop; log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***"); @@ -566,7 +568,7 @@ module AtsMec_UEidentityAPI_TestCases { // mw_http_response( // mw_http_response_400_bad_request( // mw_http_message_body_json( -// mw_body_json_ue_identity_problem_details( +// mw_body_json_problem_details( // mw_problem_details( // -, -, 400 // )))))) { diff --git a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn index a4ed7da..c83a486 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_Templates.ttcn @@ -263,34 +263,5 @@ module Ams_Templates { - template (value) ProblemDetails m_problem_details( - in JSON.String p_type, - in JSON.String p_title, - in UInt32 p_status, - in JSON.String p_detail, - in JSON.String p_instance - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template m_problem_details - - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details - - } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn index 70d5600..32966cb 100644 --- a/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn +++ b/ttcn/LibMec/Ams/ttcn/Ams_TypesAndValues.ttcn @@ -162,25 +162,6 @@ type record AdjacentAppInfoSubscription { */ type UInt32 NanoSeconds; -/** -* @desc Problem Details for HTTP APIs -* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type -* @member title A short, human-readable summary of the problem type -* @member status The HTTP status code for this occurrence of the problem -* @member detail A human-readable explanation specific to this occurrence of the problem -* @member instance A URI reference that identifies the specific occurrence of the problem -* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object -*/ -type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance -} with { - variant (type_) "name as 'type'"; -} - // // // diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn index 4325f1f..2a9e9fb 100644 --- a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_Templates.ttcn @@ -14,19 +14,37 @@ module AppEnablementAPI_Templates { import from AppEnablementAPI_TypesAndValues all; import from AppEnablementAPI_Pixits all; - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details + template (value) SecurityInfo m_security_info( + in GrantTypesList p_grantTypes := { OAUTH2_CLIENT_CREDENTIALS }, + in TokenEndpoint p_tokenEndpoint := "/mecSerMgmtApi/security/MyTokenEndPoint" + ) := { + oAuth2Info := { + grantTypes := p_grantTypes, + tokenEndpoint := p_tokenEndpoint + } + } // End of template m_security_info + + template (present) SecurityInfo mw_security_info( + template (present) GrantTypesList p_grantTypes := ?, + template (present) TokenEndpoint p_tokenEndpoint := ? + ) := { + oAuth2Info := { + grantTypes := p_grantTypes, + tokenEndpoint := p_tokenEndpoint + } + } // End of template mw_security_info + + template (value) TransportInfo_Endpoint m_end_point_uris( + in template (value) EndPointInfo_UriList p_uris + ) := { + uris := p_uris + } // End of template m_end_point_uris + + template (present) TransportInfo_Endpoint mw_end_point_uris( + template (present) EndPointInfo_UriList p_uris := ? + ) := { + uris := p_uris + } // End of template mw_end_point_uris template (omit) ServiceInfo m_service_info( in SerName p_serName, @@ -135,7 +153,7 @@ module AppEnablementAPI_Templates { in TransportInfo_Protocol p_protocol, in TransportInfo_Version p_version, in template (value) TransportInfo_Endpoint p_endpoint, - in SecurityInfo p_security + in template (value) SecurityInfo p_security ) := { id := p_id, name := p_name, diff --git a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn index a0b56f6..6d9bf2f 100644 --- a/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/AppEna/ttcn/AppEnablementAPI_TypesAndValues.ttcn @@ -316,25 +316,6 @@ module AppEnablementAPI_TypesAndValues { } type record of Subscription_ Subscriptions; - /** - * @desc Problem Details for HTTP APIs - * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type - * @member title A short, human-readable summary of the problem type - * @member status The HTTP status code for this occurrence of the problem - * @member detail A human-readable explanation specific to this occurrence of the problem - * @member instance A URI reference that identifies the specific occurrence of the problem - * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object - */ - type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance - } with { - variant (type_) "name as 'type'"; - } - /** * @desc List of supported OAuth 2.0 grant types. */ diff --git a/ttcn/LibMec/AppLCM/ttcn/AppLCM_TypesAndValues.ttcn b/ttcn/LibMec/AppLCM/ttcn/AppLCM_TypesAndValues.ttcn index 9261f16..e971017 100644 --- a/ttcn/LibMec/AppLCM/ttcn/AppLCM_TypesAndValues.ttcn +++ b/ttcn/LibMec/AppLCM/ttcn/AppLCM_TypesAndValues.ttcn @@ -123,26 +123,6 @@ type record Notification { String subscriptionId } -/** -* @desc Problem Details for HTTP APIs -* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type -* @member title A short, human-readable summary of the problem type -* @member status The HTTP status code for this occurrence of the problem -* @member detail A human-readable explanation specific to this occurrence of the problem -* @member instance A URI reference that identifies the specific occurrence of the problem -* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object -*/ -type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance -} with { - variant (type_) "name as 'type'"; -} - - } with { encode "JSON" } diff --git a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_Templates.ttcn b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_Templates.ttcn index bf5fa3b..2dfac4a 100644 --- a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_Templates.ttcn +++ b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_Templates.ttcn @@ -10,34 +10,6 @@ module BwManagementAPI_Templates { import from BwManagementAPI_TypesAndValues all; import from BwManagementAPI_Pixits all; - template (value) ProblemDetails m_problem_details( - in JSON.String p_type, - in JSON.String p_title, - in UInt32 p_status, - in JSON.String p_detail, - in JSON.String p_instance - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template m_problem_details - - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details - template (value) BwInfo m_bw_info( in AppInsId p_appInsId := PX_APP_INSTANCE_ID, in RequestType p_requestType, diff --git a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn index 63da82e..f3322e1 100644 --- a/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/BwManagementAPI/ttcn/BwManagementAPI_TypesAndValues.ttcn @@ -6,25 +6,6 @@ module BwManagementAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; - /** - * @desc Problem Details for HTTP APIs - * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type - * @member title A short, human-readable summary of the problem type - * @member status The HTTP status code for this occurrence of the problem - * @member detail A human-readable explanation specific to this occurrence of the problem - * @member instance A URI reference that identifies the specific occurrence of the problem - * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object - */ - type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance - } with { - variant (type_) "name as 'type'"; - } - /** * @desc Information of bandwidth resource * @member diff --git a/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn index da89f69..ef33e04 100644 --- a/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn +++ b/ttcn/LibMec/Grant/ttcn/Grant_Templates.ttcn @@ -201,35 +201,6 @@ module Grant_Templates { // // // -// template (value) ProblemDetails m_problem_details( -// in JSON.String p_type, -// in JSON.String p_title, -// in UInt32 p_status, -// in JSON.String p_detail, -// in JSON.String p_instance -// ) := { -// type_ := p_type, -// title := p_title, -// status := p_status, -// detail := p_detail, -// instance := p_instance -// } // End of template m_problem_details -// -// template (present) ProblemDetails mw_problem_details( -// template (present) JSON.String p_type := ?, -// template (present) JSON.String p_title := ?, -// template (present) UInt32 p_status := ?, -// template (present) JSON.String p_detail := ?, -// template (present) JSON.String p_instance := ? -// ) := { -// type_ := p_type, -// title := p_title, -// status := p_status, -// detail := p_detail, -// instance := p_instance -// } // End of template mw_problem_details -// -// diff --git a/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn b/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn index 6d88b80..6a97e4c 100644 --- a/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn +++ b/ttcn/LibMec/Grant/ttcn/Grant_TypesAndValues.ttcn @@ -57,26 +57,6 @@ import from LibCommon_BasicTypesAndValues all; */ type UInt32 NanoSeconds; -/** -* @desc Problem Details for HTTP APIs -* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type -* @member title A short, human-readable summary of the problem type -* @member status The HTTP status code for this occurrence of the problem -* @member detail A human-readable explanation specific to this occurrence of the problem -* @member instance A URI reference that identifies the specific occurrence of the problem -* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object -*/ -type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance -} with { - variant (type_) "name as 'type'"; -} - - } with { encode "JSON" } diff --git a/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_Templates.ttcn b/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_Templates.ttcn index fcbff08..cbb1ef0 100644 --- a/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_Templates.ttcn +++ b/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_Templates.ttcn @@ -318,34 +318,5 @@ module MeoPkgm_Templates { // // // -// template (value) ProblemDetails m_problem_details( -// in JSON.String p_type, -// in JSON.String p_title, -// in UInt32 p_status, -// in JSON.String p_detail, -// in JSON.String p_instance -// ) := { -// type_ := p_type, -// title := p_title, -// status := p_status, -// detail := p_detail, -// instance := p_instance -// } // End of template m_problem_details -// -// template (present) ProblemDetails mw_problem_details( -// template (present) JSON.String p_type := ?, -// template (present) JSON.String p_title := ?, -// template (present) UInt32 p_status := ?, -// template (present) JSON.String p_detail := ?, -// template (present) JSON.String p_instance := ? -// ) := { -// type_ := p_type, -// title := p_title, -// status := p_status, -// detail := p_detail, -// instance := p_instance -// } // End of template mw_problem_details - - - + } // End of module LocationAPI_Templates diff --git a/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_TypesAndValues.ttcn b/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_TypesAndValues.ttcn index b60e8f6..d9f72fc 100644 --- a/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_TypesAndValues.ttcn +++ b/ttcn/LibMec/MeoPkgm/ttcn/MeoPkgm_TypesAndValues.ttcn @@ -233,26 +233,6 @@ type record AppPkgNotification { */ type UInt32 NanoSeconds; -/** -* @desc Problem Details for HTTP APIs -* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type -* @member title A short, human-readable summary of the problem type -* @member status The HTTP status code for this occurrence of the problem -* @member detail A human-readable explanation specific to this occurrence of the problem -* @member instance A URI reference that identifies the specific occurrence of the problem -* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object -*/ -type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance -} with { - variant (type_) "name as 'type'"; -} - - } with { encode "JSON" } diff --git a/ttcn/LibMec/MepmPkgm/ttcn/MepmPkgm_TypesAndValues.ttcn b/ttcn/LibMec/MepmPkgm/ttcn/MepmPkgm_TypesAndValues.ttcn index 4d6c6bb..4df06a8 100644 --- a/ttcn/LibMec/MepmPkgm/ttcn/MepmPkgm_TypesAndValues.ttcn +++ b/ttcn/LibMec/MepmPkgm/ttcn/MepmPkgm_TypesAndValues.ttcn @@ -234,26 +234,6 @@ type record AppPkgNotification { */ type UInt32 NanoSeconds; -/** -* @desc Problem Details for HTTP APIs -* @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type -* @member title A short, human-readable summary of the problem type -* @member status The HTTP status code for this occurrence of the problem -* @member detail A human-readable explanation specific to this occurrence of the problem -* @member instance A URI reference that identifies the specific occurrence of the problem -* @see IETF RFC 7807 Clause 3. The Problem Details JSON Object -*/ -type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance -} with { - variant (type_) "name as 'type'"; -} - - } with { encode "JSON" } diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn index bc24d43..0342330 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_Templates.ttcn @@ -9,34 +9,6 @@ module RnisAPI_Templates { // LibMec/RnisAPI import from RnisAPI_TypesAndValues all; - template (value) ProblemDetails m_problem_details( - in JSON.String p_type, - in JSON.String p_title, - in UInt32 p_status, - in JSON.String p_detail, - in JSON.String p_instance - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template m_problem_details - - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details - group subscriptions { template (omit) SubscriptionLinkList m_subscriptions_list( diff --git a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn index 6220ea0..fa70cf7 100644 --- a/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/RnisAPI/ttcn/RnisAPI_TypesAndValues.ttcn @@ -10,25 +10,6 @@ module RnisAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; - /** - * @desc Problem Details for HTTP APIs - * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type - * @member title A short, human-readable summary of the problem type - * @member status The HTTP status code for this occurrence of the problem - * @member detail A human-readable explanation specific to this occurrence of the problem - * @member instance A URI reference that identifies the specific occurrence of the problem - * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object - */ - type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance - } with { - variant (type_) "name as 'type'"; - } - /** * @desc This type represents the information on Mobile Network(s), which a MEC application instance is associated to. * @member timeStamp diff --git a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn index f94dab4..30963cb 100644 --- a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn +++ b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_Templates.ttcn @@ -13,20 +13,6 @@ module UEAppInterfaceAPI_Templates { // LibMec/AppEna import from UEAppInterfaceAPI_TypesAndValues all; - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details - template (value) ApplicationList m_application_list( in template (value) AppInfo p_app_info, in template (value) VendorSpecificExt p_vendor_specific_ext diff --git a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn index abbfd34..97e050a 100644 --- a/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEAppInterfaceAPI/ttcn/UEAppInterfaceAPI_TypesAndValues.ttcn @@ -10,25 +10,6 @@ module UEAppInterfaceAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; - /** - * @desc Problem Details for HTTP APIs - * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type - * @member title A short, human-readable summary of the problem type - * @member status The HTTP status code for this occurrence of the problem - * @member detail A human-readable explanation specific to this occurrence of the problem - * @member instance A URI reference that identifies the specific occurrence of the problem - * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object - */ - type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance - } with { - variant (type_) "name as 'type'"; - } - /** * @desc Information on available applications. */ diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn index e35023e..c460ef1 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_Templates.ttcn @@ -9,34 +9,6 @@ module UEidentityAPI_Templates { // LibMec/UEidentityAPI import from UEidentityAPI_TypesAndValues all; - template (value) ProblemDetails m_problem_details( - in JSON.String p_type, - in JSON.String p_title, - in UInt32 p_status, - in JSON.String p_detail, - in JSON.String p_instance - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template m_problem_details - - template (present) ProblemDetails mw_problem_details( - template (present) JSON.String p_type := ?, - template (present) JSON.String p_title := ?, - template (present) UInt32 p_status := ?, - template (present) JSON.String p_detail := ?, - template (present) JSON.String p_instance := ? - ) := { - type_ := p_type, - title := p_title, - status := p_status, - detail := p_detail, - instance := p_instance - } // End of template mw_problem_details - template (value) UeIdentityTagInfo m_ue_identity_tag_info( in template (value) UeIdentityTags p_ueIdentityTags ) := { diff --git a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn index 03a2aab..dae40f1 100644 --- a/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn +++ b/ttcn/LibMec/UEidentityAPI/ttcn/UEidentityAPI_TypesAndValues.ttcn @@ -16,25 +16,6 @@ module UEidentityAPI_TypesAndValues { // LibCommon import from LibCommon_BasicTypesAndValues all; - /** - * @desc Problem Details for HTTP APIs - * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type - * @member title A short, human-readable summary of the problem type - * @member status The HTTP status code for this occurrence of the problem - * @member detail A human-readable explanation specific to this occurrence of the problem - * @member instance A URI reference that identifies the specific occurrence of the problem - * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object - */ - type record ProblemDetails { - JSON.String type_, - JSON.String title, - UInt32 status, - JSON.String detail, - JSON.String instance - } with { - variant (type_) "name as 'type'"; - } - /** * @desc Information of UE identity tag used in UE Identity feature * @member ueIdentityTags 1 to N tags presented by a ME Application instance to a ME Platform diff --git a/ttcn/LibMec/ttcn/LibMec_Templates.ttcn b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn new file mode 100644 index 0000000..7e7fed5 --- /dev/null +++ b/ttcn/LibMec/ttcn/LibMec_Templates.ttcn @@ -0,0 +1,40 @@ +module LibMec_Templates { + + // JSON + import from JSON all; + + // LibCommon + import from LibCommon_BasicTypesAndValues all; + + // LibMec + import from LibMec_TypesAndValues all; + + template (omit) ProblemDetails m_problem_details( + in template (omit) JSON.String p_type := omit, + in template (omit) JSON.String p_title := omit, + in template (omit) UInt32 p_status := omit, + in template (value) JSON.String p_detail, + in template (omit) JSON.String p_instance := omit + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template m_problem_details + + template ProblemDetails mw_problem_details( + template JSON.String p_type := *, + template JSON.String p_title := *, + template UInt32 p_status := *, + template JSON.String p_detail := *, + template JSON.String p_instance := * + ) := { + type_ := p_type, + title := p_title, + status := p_status, + detail := p_detail, + instance := p_instance + } // End of template mw_problem_details + +} // End of module LibMec_Templates diff --git a/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn new file mode 100644 index 0000000..876701d --- /dev/null +++ b/ttcn/LibMec/ttcn/LibMec_TypesAndValues.ttcn @@ -0,0 +1,27 @@ +module LibMec_TypesAndValues { + + // JSON + import from JSON all; + + /** + * @desc Problem Details for HTTP APIs + * @member type_ A URI reference according to IETF RFC 3986 that identifies the problem type + * @member title A short, human-readable summary of the problem type + * @member status The HTTP status code for this occurrence of the problem + * @member detail A human-readable explanation specific to this occurrence of the problem + * @member instance A URI reference that identifies the specific occurrence of the problem + * @see IETF RFC 7807 Clause 3. The Problem Details JSON Object + */ + type record ProblemDetails { + JSON.String type_ optional, + JSON.String title optional, + UInt32 status optional, + JSON.String detail, + JSON.String instance optional + } with { + variant (type_) "name as 'type'"; + } + +} with { + encode "JSON" +} // End of module LibMec_TypesAndValues diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn index 77cc899..186b991 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonMessageBodyTypes.ttcn @@ -1,5 +1,7 @@ module LibItsHttp_JsonMessageBodyTypes { - + + // LibMec + import from LibMec_TypesAndValues all; // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; // LibMec/UEidentityAPI @@ -43,7 +45,7 @@ module LibItsHttp_JsonMessageBodyTypes { TerminalDistance terminalDistance, DistanceNotificationSubscription distanceNotificationSubscription, PeriodicNotificationSubscription periodicNotificationSubscription, - UEidentityAPI_TypesAndValues.ProblemDetails problemDetails_ue_identity, + LibMec_TypesAndValues.ProblemDetails problemDetails, UeIdentityTagInfo ueIdentityTagInfo, RnisAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList, CellChangeSubscription cellChangeSubscription, @@ -58,15 +60,11 @@ module LibItsHttp_JsonMessageBodyTypes { CaReConfSubscription caReConfSubscription, S1BearerSubscription s1BearerSubscription, L2Meas l2Meas, - RnisAPI_TypesAndValues.ProblemDetails problemDetails_rnis, BwInfo bwInfo, - BwManagementAPI_TypesAndValues.ProblemDetails problemDetails_bw_management, TransportInfoList transportInfoList, TrafficRuleList trafficRuleList, TrafficRule trafficRule, - AppEnablementAPI_TypesAndValues.ProblemDetails problemDetails_svc_mgmt, AppMobilityServiceInfo appMobilityServiceInfo, - Ams_TypesAndValues.ProblemDetails problemDetails_ams, Ams_TypesAndValues.RegistrationRequest registrationRequest_ams, Ams_TypesAndValues.MobilityProcedureSubscription subscriptionLinkList_ams, Ams_TypesAndValues.AdjacentAppInfoSubscription adjacentAppInfoSubscription_ams, @@ -113,7 +111,6 @@ module LibItsHttp_JsonMessageBodyTypes { AppContext appContext, AppInfo appInfo, Ams_TypesAndValues.RegistrationRequestWithError registrationRequestWithError_ams, - UEAppInterfaceAPI_TypesAndValues.ProblemDetails problemDetails_ue_app_ctxt, ServiceInfoList serviceInfoList, ServiceInfo serviceInfo, AppEnablementAPI_TypesAndValues.SubscriptionLinkList subscriptionLinkList_app_ens, @@ -123,7 +120,6 @@ module LibItsHttp_JsonMessageBodyTypes { SerAvailabilityNotificationSubscription serAvailabilityNotificationSubscription, TimingCaps timingCaps, CurrentTime currentTime, - AppEnablementAPI_TypesAndValues.ProblemDetails problemDetails_app_enablement, universal charstring raw } with { variant "" diff --git a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn index 7dd0c73..dc5881d 100644 --- a/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn +++ b/ttcn/patch_lib_http/LibItsHttp_JsonTemplates.ttcn @@ -10,6 +10,9 @@ */ module LibItsHttp_JsonTemplates { + // LibMec + import from LibMec_TypesAndValues all; + import from LibMec_Templates all; // LibMec/LocationAPI import from LocationAPI_TypesAndValues all; import from LocationAPI_Templates all; @@ -328,17 +331,17 @@ group ams_api { } // End of template mw_body_json_app_mobility_service_info - template (value) JsonBody m_body_json_ams_problem_details( - in template (value) Ams_TypesAndValues.ProblemDetails p_problemDetails + template (value) JsonBody m_body_json_problem_details( + in template (value) LibMec_TypesAndValues.ProblemDetails p_problemDetails ) := { - problemDetails_ams := p_problemDetails - } // End of template m_body_json_ue_identity_problem_details + problemDetails := p_problemDetails + } // End of template m_body_json_problem_details - template (present) JsonBody mw_body_json_ams_problem_details( - template (present) Ams_TypesAndValues.ProblemDetails p_problemDetails := ? + template (present) JsonBody mw_body_json_problem_details( + template (present) LibMec_TypesAndValues.ProblemDetails p_problemDetails := ? ) := { - problemDetails_ams := p_problemDetails - } // End of template mw_body_json_ue_identity_problem_details + problemDetails := p_problemDetails + } // End of template mw_body_json_problem_details template (present) JsonBody mw_body_json_ams_registration_request( @@ -531,18 +534,6 @@ group ams_api { ueIdentityTagInfo := p_ueIdentityTagInfo } // End of template mw_body_json_ue_identity_tag_info - template (value) JsonBody m_body_json_ue_identity_problem_details( - in template (value) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails_ue_identity := p_problemDetails - } // End of template m_body_json_ue_identity_problem_details - - template (present) JsonBody mw_body_json_ue_identity_problem_details( - template (present) UEidentityAPI_TypesAndValues.ProblemDetails p_problemDetails := ? - ) := { - problemDetails_ue_identity := p_problemDetails - } // End of template mw_body_json_ue_identity_problem_details - } // End of group ue_identity_api group rnis_subscriptions { @@ -703,18 +694,6 @@ group ams_api { l2Meas := p_l2Meas } // End of template mw_body_json_l2_meas_subscription - template (value) JsonBody m_body_json_rni_problem_details( - in template (value) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails_rnis := p_problemDetails - } // End of template m_body_json_rni_problem_details - - template (present) JsonBody mw_body_json_rni_problem_details( - template (present) RnisAPI_TypesAndValues.ProblemDetails p_problemDetails := ? - ) := { - problemDetails_rnis := p_problemDetails - } // End of template mw_body_json_rni_problem_details - } // End of group rnis_subscriptions group rnis_notifications { @@ -883,18 +862,6 @@ group ams_api { trafficRuleList := p_trafficRuleList } // End of template mw_body_json_traffic_rule_list - template (value) JsonBody m_body_json_app_enablement_problem_details( - in template (value) AppEnablementAPI_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails_svc_mgmt := p_problemDetails - } // End of template m_body_json_app_enablement_problem_details - - template (present) JsonBody mw_body_json_app_enablement_problem_details( - template (present) AppEnablementAPI_TypesAndValues.ProblemDetails p_problemDetails := ? - ) := { - problemDetails_svc_mgmt := p_problemDetails - } // End of template mw_body_json_app_enablement_problem_details - } // End of group app_enablement_api group ue_app_ctx { @@ -923,18 +890,6 @@ group ams_api { appInfo := p_appInfo } // End of template mw_body_json_app_info - template (value) JsonBody m_body_json_ue_app_ctx_problem_details( - in template (value) UEAppInterfaceAPI_TypesAndValues.ProblemDetails p_problemDetails - ) := { - problemDetails_ue_app_ctxt := p_problemDetails - } // End of template m_body_json_ue_app_ctx_problem_details - - template (present) JsonBody mw_body_json_ue_app_ctx_problem_details( - template (present) UEAppInterfaceAPI_TypesAndValues.ProblemDetails p_problemDetails := ? - ) := { - problemDetails_ue_app_ctxt := p_problemDetails - } // End of template mw_body_json_ue_app_ctx_problem_details - } // End of group ue_app_ctx } // End of module LibItsHttp_JsonTemplates -- GitLab