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

@ -5,12 +5,12 @@
#include "interface_upf_info_item.h"
OpenAPI_interface_upf_info_item_t *OpenAPI_interface_upf_info_item_create(
OpenAPI_up_interface_type_t *interface_type,
OpenAPI_up_interface_type_e interface_type,
OpenAPI_list_t *ipv4_endpoint_addresses,
OpenAPI_list_t *ipv6_endpoint_addresses,
char *endpoint_fqdn,
char *network_instance
)
)
{
OpenAPI_interface_upf_info_item_t *interface_upf_info_item_local_var = OpenAPI_malloc(sizeof(OpenAPI_interface_upf_info_item_t));
if (!interface_upf_info_item_local_var) {
@ -31,7 +31,6 @@ void OpenAPI_interface_upf_info_item_free(OpenAPI_interface_upf_info_item_t *int
return;
}
OpenAPI_lnode_t *node;
OpenAPI_up_interface_type_free(interface_upf_info_item->interface_type);
OpenAPI_list_for_each(interface_upf_info_item->ipv4_endpoint_addresses, node) {
ogs_free(node->data);
}
@ -55,61 +54,55 @@ cJSON *OpenAPI_interface_upf_info_item_convertToJSON(OpenAPI_interface_upf_info_
}
item = cJSON_CreateObject();
cJSON *interface_type_local_JSON = OpenAPI_up_interface_type_convertToJSON(interface_upf_info_item->interface_type);
if (interface_type_local_JSON == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [interface_type]");
goto end;
}
cJSON_AddItemToObject(item, "interfaceType", interface_type_local_JSON);
if (item->child == NULL) {
if (cJSON_AddStringToObject(item, "interfaceType", OpenAPI_up_interface_type_ToString(interface_upf_info_item->interface_type)) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [interface_type]");
goto end;
}
if (interface_upf_info_item->ipv4_endpoint_addresses) {
cJSON *ipv4_endpoint_addresses = cJSON_AddArrayToObject(item, "ipv4EndpointAddresses");
if (ipv4_endpoint_addresses == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
cJSON *ipv4_endpoint_addresses = cJSON_AddArrayToObject(item, "ipv4EndpointAddresses");
if (ipv4_endpoint_addresses == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
OpenAPI_lnode_t *ipv4_endpoint_addresses_node;
OpenAPI_list_for_each(interface_upf_info_item->ipv4_endpoint_addresses, ipv4_endpoint_addresses_node) {
if (cJSON_AddStringToObject(ipv4_endpoint_addresses, "", (char*)ipv4_endpoint_addresses_node->data) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
}
OpenAPI_lnode_t *ipv4_endpoint_addresses_node;
OpenAPI_list_for_each(interface_upf_info_item->ipv4_endpoint_addresses, ipv4_endpoint_addresses_node) {
if (cJSON_AddStringToObject(ipv4_endpoint_addresses, "", (char*)ipv4_endpoint_addresses_node->data) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
}
}
if (interface_upf_info_item->ipv6_endpoint_addresses) {
cJSON *ipv6_endpoint_addresses = cJSON_AddArrayToObject(item, "ipv6EndpointAddresses");
if (ipv6_endpoint_addresses == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
cJSON *ipv6_endpoint_addresses = cJSON_AddArrayToObject(item, "ipv6EndpointAddresses");
if (ipv6_endpoint_addresses == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
OpenAPI_lnode_t *ipv6_endpoint_addresses_node;
OpenAPI_list_for_each(interface_upf_info_item->ipv6_endpoint_addresses, ipv6_endpoint_addresses_node) {
if (cJSON_AddStringToObject(ipv6_endpoint_addresses, "", (char*)ipv6_endpoint_addresses_node->data) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
}
OpenAPI_lnode_t *ipv6_endpoint_addresses_node;
OpenAPI_list_for_each(interface_upf_info_item->ipv6_endpoint_addresses, ipv6_endpoint_addresses_node) {
if (cJSON_AddStringToObject(ipv6_endpoint_addresses, "", (char*)ipv6_endpoint_addresses_node->data) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
}
}
if (interface_upf_info_item->endpoint_fqdn) {
if (cJSON_AddStringToObject(item, "endpointFqdn", interface_upf_info_item->endpoint_fqdn) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [endpoint_fqdn]");
goto end;
}
if (cJSON_AddStringToObject(item, "endpointFqdn", interface_upf_info_item->endpoint_fqdn) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [endpoint_fqdn]");
goto end;
}
}
if (interface_upf_info_item->network_instance) {
if (cJSON_AddStringToObject(item, "networkInstance", interface_upf_info_item->network_instance) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [network_instance]");
goto end;
}
if (cJSON_AddStringToObject(item, "networkInstance", interface_upf_info_item->network_instance) == NULL) {
ogs_error("OpenAPI_interface_upf_info_item_convertToJSON() failed [network_instance]");
goto end;
}
}
end:
@ -125,75 +118,79 @@ OpenAPI_interface_upf_info_item_t *OpenAPI_interface_upf_info_item_parseFromJSON
goto end;
}
OpenAPI_up_interface_type_t *interface_type_local_nonprim = NULL;
interface_type_local_nonprim = OpenAPI_up_interface_type_parseFromJSON(interface_type);
OpenAPI_up_interface_type_e interface_typeVariable;
if (!cJSON_IsString(interface_type)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [interface_type]");
goto end;
}
interface_typeVariable = OpenAPI_up_interface_type_FromString(interface_type->valuestring);
cJSON *ipv4_endpoint_addresses = cJSON_GetObjectItemCaseSensitive(interface_upf_info_itemJSON, "ipv4EndpointAddresses");
OpenAPI_list_t *ipv4_endpoint_addressesList;
if (ipv4_endpoint_addresses) {
cJSON *ipv4_endpoint_addresses_local;
if (!cJSON_IsArray(ipv4_endpoint_addresses)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
ipv4_endpoint_addressesList = OpenAPI_list_create();
cJSON_ArrayForEach(ipv4_endpoint_addresses_local, ipv4_endpoint_addresses) {
if (!cJSON_IsString(ipv4_endpoint_addresses_local)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
OpenAPI_list_add(ipv4_endpoint_addressesList, ogs_strdup_or_assert(ipv4_endpoint_addresses_local->valuestring));
}
if (ipv4_endpoint_addresses) {
cJSON *ipv4_endpoint_addresses_local;
if (!cJSON_IsArray(ipv4_endpoint_addresses)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
ipv4_endpoint_addressesList = OpenAPI_list_create();
cJSON_ArrayForEach(ipv4_endpoint_addresses_local, ipv4_endpoint_addresses) {
if (!cJSON_IsString(ipv4_endpoint_addresses_local)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv4_endpoint_addresses]");
goto end;
}
OpenAPI_list_add(ipv4_endpoint_addressesList , ogs_strdup_or_assert(ipv4_endpoint_addresses_local->valuestring));
}
}
cJSON *ipv6_endpoint_addresses = cJSON_GetObjectItemCaseSensitive(interface_upf_info_itemJSON, "ipv6EndpointAddresses");
OpenAPI_list_t *ipv6_endpoint_addressesList;
if (ipv6_endpoint_addresses) {
cJSON *ipv6_endpoint_addresses_local;
if (!cJSON_IsArray(ipv6_endpoint_addresses)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
ipv6_endpoint_addressesList = OpenAPI_list_create();
cJSON_ArrayForEach(ipv6_endpoint_addresses_local, ipv6_endpoint_addresses) {
if (!cJSON_IsString(ipv6_endpoint_addresses_local)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
OpenAPI_list_add(ipv6_endpoint_addressesList, ogs_strdup_or_assert(ipv6_endpoint_addresses_local->valuestring));
}
if (ipv6_endpoint_addresses) {
cJSON *ipv6_endpoint_addresses_local;
if (!cJSON_IsArray(ipv6_endpoint_addresses)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
ipv6_endpoint_addressesList = OpenAPI_list_create();
cJSON_ArrayForEach(ipv6_endpoint_addresses_local, ipv6_endpoint_addresses) {
if (!cJSON_IsString(ipv6_endpoint_addresses_local)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [ipv6_endpoint_addresses]");
goto end;
}
OpenAPI_list_add(ipv6_endpoint_addressesList , ogs_strdup_or_assert(ipv6_endpoint_addresses_local->valuestring));
}
}
cJSON *endpoint_fqdn = cJSON_GetObjectItemCaseSensitive(interface_upf_info_itemJSON, "endpointFqdn");
if (endpoint_fqdn) {
if (!cJSON_IsString(endpoint_fqdn)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [endpoint_fqdn]");
goto end;
}
if (endpoint_fqdn) {
if (!cJSON_IsString(endpoint_fqdn)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [endpoint_fqdn]");
goto end;
}
}
cJSON *network_instance = cJSON_GetObjectItemCaseSensitive(interface_upf_info_itemJSON, "networkInstance");
if (network_instance) {
if (!cJSON_IsString(network_instance)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [network_instance]");
goto end;
}
if (network_instance) {
if (!cJSON_IsString(network_instance)) {
ogs_error("OpenAPI_interface_upf_info_item_parseFromJSON() failed [network_instance]");
goto end;
}
}
interface_upf_info_item_local_var = OpenAPI_interface_upf_info_item_create (
interface_type_local_nonprim,
interface_typeVariable,
ipv4_endpoint_addresses ? ipv4_endpoint_addressesList : NULL,
ipv6_endpoint_addresses ? ipv6_endpoint_addressesList : NULL,
endpoint_fqdn ? ogs_strdup_or_assert(endpoint_fqdn->valuestring) : NULL,
network_instance ? ogs_strdup_or_assert(network_instance->valuestring) : NULL
);
);
return interface_upf_info_item_local_var;
end: