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

@ -8,7 +8,7 @@ OpenAPI_unrelated_class_t *OpenAPI_unrelated_class_create(
OpenAPI_default_unrelated_class_t *default_unrelated_class,
OpenAPI_external_unrelated_class_t *external_unrelated_class,
OpenAPI_list_t *service_type_unrelated_classes
)
)
{
OpenAPI_unrelated_class_t *unrelated_class_local_var = OpenAPI_malloc(sizeof(OpenAPI_unrelated_class_t));
if (!unrelated_class_local_var) {
@ -58,37 +58,37 @@ cJSON *OpenAPI_unrelated_class_convertToJSON(OpenAPI_unrelated_class_t *unrelate
}
if (unrelated_class->external_unrelated_class) {
cJSON *external_unrelated_class_local_JSON = OpenAPI_external_unrelated_class_convertToJSON(unrelated_class->external_unrelated_class);
if (external_unrelated_class_local_JSON == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [external_unrelated_class]");
goto end;
}
cJSON_AddItemToObject(item, "externalUnrelatedClass", external_unrelated_class_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [external_unrelated_class]");
goto end;
}
cJSON *external_unrelated_class_local_JSON = OpenAPI_external_unrelated_class_convertToJSON(unrelated_class->external_unrelated_class);
if (external_unrelated_class_local_JSON == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [external_unrelated_class]");
goto end;
}
cJSON_AddItemToObject(item, "externalUnrelatedClass", external_unrelated_class_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [external_unrelated_class]");
goto end;
}
}
if (unrelated_class->service_type_unrelated_classes) {
cJSON *service_type_unrelated_classesList = cJSON_AddArrayToObject(item, "serviceTypeUnrelatedClasses");
if (service_type_unrelated_classesList == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [service_type_unrelated_classes]");
goto end;
}
cJSON *service_type_unrelated_classesList = cJSON_AddArrayToObject(item, "serviceTypeUnrelatedClasses");
if (service_type_unrelated_classesList == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [service_type_unrelated_classes]");
goto end;
}
OpenAPI_lnode_t *service_type_unrelated_classes_node;
if (unrelated_class->service_type_unrelated_classes) {
OpenAPI_list_for_each(unrelated_class->service_type_unrelated_classes, service_type_unrelated_classes_node) {
cJSON *itemLocal = OpenAPI_service_type_unrelated_class_convertToJSON(service_type_unrelated_classes_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [service_type_unrelated_classes]");
goto end;
}
cJSON_AddItemToArray(service_type_unrelated_classesList, itemLocal);
OpenAPI_lnode_t *service_type_unrelated_classes_node;
if (unrelated_class->service_type_unrelated_classes) {
OpenAPI_list_for_each(unrelated_class->service_type_unrelated_classes, service_type_unrelated_classes_node) {
cJSON *itemLocal = OpenAPI_service_type_unrelated_class_convertToJSON(service_type_unrelated_classes_node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_unrelated_class_convertToJSON() failed [service_type_unrelated_classes]");
goto end;
}
cJSON_AddItemToArray(service_type_unrelated_classesList, itemLocal);
}
}
}
end:
return item;
@ -104,44 +104,44 @@ OpenAPI_unrelated_class_t *OpenAPI_unrelated_class_parseFromJSON(cJSON *unrelate
}
OpenAPI_default_unrelated_class_t *default_unrelated_class_local_nonprim = NULL;
default_unrelated_class_local_nonprim = OpenAPI_default_unrelated_class_parseFromJSON(default_unrelated_class);
cJSON *external_unrelated_class = cJSON_GetObjectItemCaseSensitive(unrelated_classJSON, "externalUnrelatedClass");
OpenAPI_external_unrelated_class_t *external_unrelated_class_local_nonprim = NULL;
if (external_unrelated_class) {
external_unrelated_class_local_nonprim = OpenAPI_external_unrelated_class_parseFromJSON(external_unrelated_class);
}
if (external_unrelated_class) {
external_unrelated_class_local_nonprim = OpenAPI_external_unrelated_class_parseFromJSON(external_unrelated_class);
}
cJSON *service_type_unrelated_classes = cJSON_GetObjectItemCaseSensitive(unrelated_classJSON, "serviceTypeUnrelatedClasses");
OpenAPI_list_t *service_type_unrelated_classesList;
if (service_type_unrelated_classes) {
cJSON *service_type_unrelated_classes_local_nonprimitive;
if (!cJSON_IsArray(service_type_unrelated_classes)) {
if (service_type_unrelated_classes) {
cJSON *service_type_unrelated_classes_local_nonprimitive;
if (!cJSON_IsArray(service_type_unrelated_classes)){
ogs_error("OpenAPI_unrelated_class_parseFromJSON() failed [service_type_unrelated_classes]");
goto end;
}
service_type_unrelated_classesList = OpenAPI_list_create();
cJSON_ArrayForEach(service_type_unrelated_classes_local_nonprimitive, service_type_unrelated_classes ) {
if (!cJSON_IsObject(service_type_unrelated_classes_local_nonprimitive)) {
ogs_error("OpenAPI_unrelated_class_parseFromJSON() failed [service_type_unrelated_classes]");
goto end;
}
OpenAPI_service_type_unrelated_class_t *service_type_unrelated_classesItem = OpenAPI_service_type_unrelated_class_parseFromJSON(service_type_unrelated_classes_local_nonprimitive);
service_type_unrelated_classesList = OpenAPI_list_create();
cJSON_ArrayForEach(service_type_unrelated_classes_local_nonprimitive, service_type_unrelated_classes ) {
if (!cJSON_IsObject(service_type_unrelated_classes_local_nonprimitive)) {
ogs_error("OpenAPI_unrelated_class_parseFromJSON() failed [service_type_unrelated_classes]");
goto end;
}
OpenAPI_service_type_unrelated_class_t *service_type_unrelated_classesItem = OpenAPI_service_type_unrelated_class_parseFromJSON(service_type_unrelated_classes_local_nonprimitive);
OpenAPI_list_add(service_type_unrelated_classesList, service_type_unrelated_classesItem);
}
OpenAPI_list_add(service_type_unrelated_classesList, service_type_unrelated_classesItem);
}
}
unrelated_class_local_var = OpenAPI_unrelated_class_create (
default_unrelated_class_local_nonprim,
external_unrelated_class ? external_unrelated_class_local_nonprim : NULL,
service_type_unrelated_classes ? service_type_unrelated_classesList : NULL
);
);
return unrelated_class_local_var;
end: