Commit b7a36f9f authored by Yann Garcia's avatar Yann Garcia

Move ProblemDetails in LibMec

parent 002520df
......@@ -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;
}
......
......@@ -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(
)
)
)
......
......@@ -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
......
......@@ -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;
......
This diff is collapsed.
......@@ -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
// )))))) {
......
......@@ -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
......@@ -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'";
}
//
//
//
......
......@@ -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,
......
......@@ -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.
*/
......
......@@ -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"
}
......@@ -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,
......
......@@ -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
......
......@@ -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
//
//
......
......@@ -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"
}
......@@ -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
......@@ -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"
}
......@@ -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"