mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +00:00
Upgrade SBI(Service-based Interface)
* OpenAPI Generator version: 4.3.1 ==> 5.5.1 * Specification : r16.8.0 (20210629)
This commit is contained in:
parent
2aaa8200c2
commit
f278d58a69
1914 changed files with 91329 additions and 57361 deletions
|
|
@ -7,7 +7,7 @@
|
|||
OpenAPI_area_t *OpenAPI_area_create(
|
||||
OpenAPI_list_t *tacs,
|
||||
char *area_code
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_area_t *area_local_var = OpenAPI_malloc(sizeof(OpenAPI_area_t));
|
||||
if (!area_local_var) {
|
||||
|
|
@ -44,26 +44,26 @@ cJSON *OpenAPI_area_convertToJSON(OpenAPI_area_t *area)
|
|||
|
||||
item = cJSON_CreateObject();
|
||||
if (area->tacs) {
|
||||
cJSON *tacs = cJSON_AddArrayToObject(item, "tacs");
|
||||
if (tacs == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *tacs = cJSON_AddArrayToObject(item, "tacs");
|
||||
if (tacs == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *tacs_node;
|
||||
OpenAPI_list_for_each(area->tacs, tacs_node) {
|
||||
if (cJSON_AddStringToObject(tacs, "", (char*)tacs_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *tacs_node;
|
||||
OpenAPI_list_for_each(area->tacs, tacs_node) {
|
||||
if (cJSON_AddStringToObject(tacs, "", (char*)tacs_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (area->area_code) {
|
||||
if (cJSON_AddStringToObject(item, "areaCode", area->area_code) == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [area_code]");
|
||||
goto end;
|
||||
}
|
||||
if (cJSON_AddStringToObject(item, "areaCode", area->area_code) == NULL) {
|
||||
ogs_error("OpenAPI_area_convertToJSON() failed [area_code]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -76,36 +76,36 @@ OpenAPI_area_t *OpenAPI_area_parseFromJSON(cJSON *areaJSON)
|
|||
cJSON *tacs = cJSON_GetObjectItemCaseSensitive(areaJSON, "tacs");
|
||||
|
||||
OpenAPI_list_t *tacsList;
|
||||
if (tacs) {
|
||||
cJSON *tacs_local;
|
||||
if (!cJSON_IsArray(tacs)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
tacsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(tacs_local, tacs) {
|
||||
if (!cJSON_IsString(tacs_local)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(tacsList, ogs_strdup_or_assert(tacs_local->valuestring));
|
||||
}
|
||||
if (tacs) {
|
||||
cJSON *tacs_local;
|
||||
if (!cJSON_IsArray(tacs)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
tacsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(tacs_local, tacs) {
|
||||
if (!cJSON_IsString(tacs_local)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [tacs]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(tacsList , ogs_strdup_or_assert(tacs_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *area_code = cJSON_GetObjectItemCaseSensitive(areaJSON, "areaCode");
|
||||
|
||||
if (area_code) {
|
||||
if (!cJSON_IsString(area_code)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [area_code]");
|
||||
goto end;
|
||||
}
|
||||
if (area_code) {
|
||||
if (!cJSON_IsString(area_code)) {
|
||||
ogs_error("OpenAPI_area_parseFromJSON() failed [area_code]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
area_local_var = OpenAPI_area_create (
|
||||
tacs ? tacsList : NULL,
|
||||
area_code ? ogs_strdup_or_assert(area_code->valuestring) : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return area_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue