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_flow_info_t *OpenAPI_flow_info_create(
|
||||
int flow_id,
|
||||
OpenAPI_list_t *flow_descriptions
|
||||
)
|
||||
)
|
||||
{
|
||||
OpenAPI_flow_info_t *flow_info_local_var = OpenAPI_malloc(sizeof(OpenAPI_flow_info_t));
|
||||
if (!flow_info_local_var) {
|
||||
|
|
@ -48,19 +48,19 @@ cJSON *OpenAPI_flow_info_convertToJSON(OpenAPI_flow_info_t *flow_info)
|
|||
}
|
||||
|
||||
if (flow_info->flow_descriptions) {
|
||||
cJSON *flow_descriptions = cJSON_AddArrayToObject(item, "flowDescriptions");
|
||||
if (flow_descriptions == NULL) {
|
||||
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *flow_descriptions = cJSON_AddArrayToObject(item, "flowDescriptions");
|
||||
if (flow_descriptions == NULL) {
|
||||
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_lnode_t *flow_descriptions_node;
|
||||
OpenAPI_list_for_each(flow_info->flow_descriptions, flow_descriptions_node) {
|
||||
if (cJSON_AddStringToObject(flow_descriptions, "", (char*)flow_descriptions_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
OpenAPI_lnode_t *flow_descriptions_node;
|
||||
OpenAPI_list_for_each(flow_info->flow_descriptions, flow_descriptions_node) {
|
||||
if (cJSON_AddStringToObject(flow_descriptions, "", (char*)flow_descriptions_node->data) == NULL) {
|
||||
ogs_error("OpenAPI_flow_info_convertToJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -76,7 +76,7 @@ OpenAPI_flow_info_t *OpenAPI_flow_info_parseFromJSON(cJSON *flow_infoJSON)
|
|||
goto end;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!cJSON_IsNumber(flow_id)) {
|
||||
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_id]");
|
||||
goto end;
|
||||
|
|
@ -85,27 +85,27 @@ OpenAPI_flow_info_t *OpenAPI_flow_info_parseFromJSON(cJSON *flow_infoJSON)
|
|||
cJSON *flow_descriptions = cJSON_GetObjectItemCaseSensitive(flow_infoJSON, "flowDescriptions");
|
||||
|
||||
OpenAPI_list_t *flow_descriptionsList;
|
||||
if (flow_descriptions) {
|
||||
cJSON *flow_descriptions_local;
|
||||
if (!cJSON_IsArray(flow_descriptions)) {
|
||||
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
flow_descriptionsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(flow_descriptions_local, flow_descriptions) {
|
||||
if (!cJSON_IsString(flow_descriptions_local)) {
|
||||
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(flow_descriptionsList, ogs_strdup_or_assert(flow_descriptions_local->valuestring));
|
||||
}
|
||||
if (flow_descriptions) {
|
||||
cJSON *flow_descriptions_local;
|
||||
if (!cJSON_IsArray(flow_descriptions)) {
|
||||
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
flow_descriptionsList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(flow_descriptions_local, flow_descriptions) {
|
||||
if (!cJSON_IsString(flow_descriptions_local)) {
|
||||
ogs_error("OpenAPI_flow_info_parseFromJSON() failed [flow_descriptions]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(flow_descriptionsList , ogs_strdup_or_assert(flow_descriptions_local->valuestring));
|
||||
}
|
||||
}
|
||||
|
||||
flow_info_local_var = OpenAPI_flow_info_create (
|
||||
flow_id->valuedouble,
|
||||
flow_descriptions ? flow_descriptionsList : NULL
|
||||
);
|
||||
);
|
||||
|
||||
return flow_info_local_var;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue