[SBI] Fixed openapitools MAP generation (#2103)

MAP was generated incorrectly because {{#items}}..{{#items}} was
missing.

Because of this, If scpInfo has scpPort, NRF crashes.
This commit is contained in:
Sukchan Lee 2023-02-26 10:01:08 +09:00
parent 1d8324af9f
commit ce668c556c
437 changed files with 111103 additions and 906 deletions

View file

@ -227,10 +227,10 @@ cJSON *OpenAPI_app_session_context_req_data_convertToJSON(OpenAPI_app_session_co
OpenAPI_media_component_convertToJSON(localKeyValue->value) :
cJSON_CreateNull();
if (itemLocal == NULL) {
ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [med_components]");
ogs_error("OpenAPI_app_session_context_req_data_convertToJSON() failed [inner]");
goto end;
}
cJSON_AddItemToObject(med_components, localKeyValue->key, itemLocal);
cJSON_AddItemToObject(localMapObject, localKeyValue->key, itemLocal);
}
}
}
@ -510,16 +510,16 @@ OpenAPI_app_session_context_req_data_t *OpenAPI_app_session_context_req_data_par
OpenAPI_map_t *localMapKeyPair = NULL;
cJSON_ArrayForEach(med_components_local_map, med_components) {
cJSON *localMapObject = med_components_local_map;
if (cJSON_IsObject(med_components_local_map)) {
if (cJSON_IsObject(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(
ogs_strdup(localMapObject->string), OpenAPI_media_component_parseFromJSON(localMapObject));
} else if (cJSON_IsNull(med_components_local_map)) {
} else if (cJSON_IsNull(localMapObject)) {
localMapKeyPair = OpenAPI_map_create(ogs_strdup(localMapObject->string), NULL);
} else {
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [med_components]");
ogs_error("OpenAPI_app_session_context_req_data_parseFromJSON() failed [inner]");
goto end;
}
OpenAPI_list_add(med_componentsList , localMapKeyPair);
OpenAPI_list_add(med_componentsList, localMapKeyPair);
}
}