diff --git a/ccsrc/Protocols/Json/json_codec.cc b/ccsrc/Protocols/Json/json_codec.cc index 606668c665217cbc5f32dab430f8f7fa5db8b5ba..23fde2bce269f055d649b63a05d48c1b10f18ad3 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 622c05ee2adbe1eff9c434b60ed9fd8ca0fa305f..904f01c2950da0f7c01509a5112233de7802193f 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 402abb3a1fd0de298bd22db699fe45cbb7d3b7f5..b05ae242472ad4cb61395196135ca4708dd393f8 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 ed76dff703f45177447db242342f680e34ed7c6d..e91c965c234a64ab293a68790a49a4dbeb492949 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 612d1444d990ab641e147f206bf18ed11191d9f0..a95e1ebd22bf404d93ba0d2f22a7df9bbbe77e0e 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 fe7bcd5f882b1df7a4a903d6e7d439a5b2dcfab4..de98752bd2daadbd0d90c348cb6ee92433d57cb1 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 a4ed7daac7655c986d38a0b44522974af808e448..c83a486622653617669b906ba082d5caf6e56e9d 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 70d5600fbfc70f52d77ba4add7bbeb2415527ca3..32966cba598d4b195c258119cb79b53b2e22e156 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 4325f1f7fcd37fdbf58012d56a59133067819693..2a9e9fb7841151693a9a5f25dfdb6db33fad330c 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 a0b56f646718eaaa48ddde6bcb51280b4a6204b9..6d9bf2f7c7f9e1f358f3bdecfebba46c42905f52 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 9261f161d85d225cf512ec07880106c61435c927..e9710176bd4dd3b9f7a5b18fd2fafc22ace87dc8 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 bf5fa3be5a31a55ebfb538603fbae81cada4332b..2dfac4a26db8eaeb2aeccefd12800adfaf2f97e5 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 63da82eaa9f2d38f2e380e6e167d37fcd57cad94..f3322e13f89f4d00bd7f648acca8fe556e2a6688 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 da89f69760a93d3495c537978ff818138ed503e3..ef33e04246daa3c5a9a62aa42f924747ae3ebc9f 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 6d88b806c0671bdb74a7b65d7e8eb5ad0360d517..6a97e4cdda4a3561898b4deb7e0a78069b7289de 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 fcbff08601e60d199ad0fb7e032e212bd79802af..cbb1ef0370882f6ee9ef75d412b5c9cbca400bcb 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 b60e8f6cf0962bd1406e471c391c6c141370bce1..d9f72fc2aae371362d0b1f7328a8c6fcec69c3f5 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 4d6c6bbc8b6b70896156324f918033dc0f48523a..4df06a8ac1b5a18ea4930906e66b941c7e4654ea 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 bc24d43059454752f5fdca3afcada3a19c9a21c8..03423308f36c7e1b0ff6891f4a5933a6fb1d2ec1 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 6220ea06092ab7e712f9e21815ad0ef73c5e8a75..fa70cf7be9bb0a86ed3dc9ef42eb9a5f6479d0d2 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 f94dab4a8d1d25428ea65bbe7f4803ddd6029b51..30963cb582a77750e8370f651f24275cbfcf08ca 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 abbfd34433774887fc5822ccc0ac46fea4707f5d..97e050a2a7fa357c7d544acc1370750b050aff6f 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 e35023e43fd1c9024e14c03fc1705625d51a435c..c460ef1c5e228615634c50db22531e47c9bb4430 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 03a2aabd66a48eceb47172b701982b5d0f18e81b..dae40f1a2d3e03f7f8fce6d47be92ee36071e6b1 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 0000000000000000000000000000000000000000..7e7fed5327668fb9dafbdf4ca25ec996fef83ed1 --- /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 0000000000000000000000000000000000000000..876701d370e6633255a6e1dea5d1b3f92a62e5b6 --- /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 77cc899a55c5a28f5d7942cd96613458c6a2abc1..186b991ca31cd4cd87d8ff3d3f343970a4848337 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 7dd0c735cbd992ef811c3d4ca9667745647479cd..dc5881da1d8735dc212e52d6a6f92bf943d28d45 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