Upgrade SBI(Service-based Interface)

* OpenAPI Generator version: 4.3.1 ==> 5.5.1
* Specification : r16.8.0 (20210629)
This commit is contained in:
Sukchan Lee 2021-07-07 17:32:55 +09:00
parent 2aaa8200c2
commit f278d58a69
1914 changed files with 91329 additions and 57361 deletions

View file

@ -7,10 +7,10 @@
OpenAPI_steering_mode_t *OpenAPI_steering_mode_create(
OpenAPI_steer_mode_value_e steer_mode_value,
OpenAPI_access_type_e active,
OpenAPI_access_type_e standby,
OpenAPI_access_type_rm_t *standby,
int _3g_load,
OpenAPI_access_type_e prio_acc
)
)
{
OpenAPI_steering_mode_t *steering_mode_local_var = OpenAPI_malloc(sizeof(OpenAPI_steering_mode_t));
if (!steering_mode_local_var) {
@ -31,6 +31,7 @@ void OpenAPI_steering_mode_free(OpenAPI_steering_mode_t *steering_mode)
return;
}
OpenAPI_lnode_t *node;
OpenAPI_access_type_rm_free(steering_mode->standby);
ogs_free(steering_mode);
}
@ -50,31 +51,37 @@ cJSON *OpenAPI_steering_mode_convertToJSON(OpenAPI_steering_mode_t *steering_mod
}
if (steering_mode->active) {
if (cJSON_AddStringToObject(item, "active", OpenAPI_access_type_ToString(steering_mode->active)) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [active]");
goto end;
}
if (cJSON_AddStringToObject(item, "active", OpenAPI_access_type_ToString(steering_mode->active)) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [active]");
goto end;
}
}
if (steering_mode->standby) {
if (cJSON_AddStringToObject(item, "standby", OpenAPI_access_type_ToString(steering_mode->standby)) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [standby]");
goto end;
}
cJSON *standby_local_JSON = OpenAPI_access_type_rm_convertToJSON(steering_mode->standby);
if (standby_local_JSON == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [standby]");
goto end;
}
cJSON_AddItemToObject(item, "standby", standby_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [standby]");
goto end;
}
}
if (steering_mode->_3g_load) {
if (cJSON_AddNumberToObject(item, "3gLoad", steering_mode->_3g_load) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [_3g_load]");
goto end;
}
if (cJSON_AddNumberToObject(item, "3gLoad", steering_mode->_3g_load) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [_3g_load]");
goto end;
}
}
if (steering_mode->prio_acc) {
if (cJSON_AddStringToObject(item, "prioAcc", OpenAPI_access_type_ToString(steering_mode->prio_acc)) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [prio_acc]");
goto end;
}
if (cJSON_AddStringToObject(item, "prioAcc", OpenAPI_access_type_ToString(steering_mode->prio_acc)) == NULL) {
ogs_error("OpenAPI_steering_mode_convertToJSON() failed [prio_acc]");
goto end;
}
}
end:
@ -91,7 +98,7 @@ OpenAPI_steering_mode_t *OpenAPI_steering_mode_parseFromJSON(cJSON *steering_mod
}
OpenAPI_steer_mode_value_e steer_mode_valueVariable;
if (!cJSON_IsString(steer_mode_value)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [steer_mode_value]");
goto end;
@ -101,52 +108,48 @@ OpenAPI_steering_mode_t *OpenAPI_steering_mode_parseFromJSON(cJSON *steering_mod
cJSON *active = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "active");
OpenAPI_access_type_e activeVariable;
if (active) {
if (!cJSON_IsString(active)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [active]");
goto end;
}
activeVariable = OpenAPI_access_type_FromString(active->valuestring);
if (active) {
if (!cJSON_IsString(active)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [active]");
goto end;
}
activeVariable = OpenAPI_access_type_FromString(active->valuestring);
}
cJSON *standby = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "standby");
OpenAPI_access_type_e standbyVariable;
if (standby) {
if (!cJSON_IsString(standby)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [standby]");
goto end;
}
standbyVariable = OpenAPI_access_type_FromString(standby->valuestring);
}
OpenAPI_access_type_rm_t *standby_local_nonprim = NULL;
if (standby) {
standby_local_nonprim = OpenAPI_access_type_rm_parseFromJSON(standby);
}
cJSON *_3g_load = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "3gLoad");
if (_3g_load) {
if (!cJSON_IsNumber(_3g_load)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [_3g_load]");
goto end;
}
if (_3g_load) {
if (!cJSON_IsNumber(_3g_load)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [_3g_load]");
goto end;
}
}
cJSON *prio_acc = cJSON_GetObjectItemCaseSensitive(steering_modeJSON, "prioAcc");
OpenAPI_access_type_e prio_accVariable;
if (prio_acc) {
if (!cJSON_IsString(prio_acc)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [prio_acc]");
goto end;
}
prio_accVariable = OpenAPI_access_type_FromString(prio_acc->valuestring);
if (prio_acc) {
if (!cJSON_IsString(prio_acc)) {
ogs_error("OpenAPI_steering_mode_parseFromJSON() failed [prio_acc]");
goto end;
}
prio_accVariable = OpenAPI_access_type_FromString(prio_acc->valuestring);
}
steering_mode_local_var = OpenAPI_steering_mode_create (
steer_mode_valueVariable,
active ? activeVariable : 0,
standby ? standbyVariable : 0,
standby ? standby_local_nonprim : NULL,
_3g_load ? _3g_load->valuedouble : 0,
prio_acc ? prio_accVariable : 0
);
);
return steering_mode_local_var;
end: