mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 05:10:10 +00:00
* [SBI] Ignore unknown enum values and continue parsing (#2622) * [SBI] Reject empty enum lists (#2622) Enum lists that are empty due to ignoring unsupported enum values are also rejected. * Revert changing `generator.sh`
This commit is contained in:
parent
e3c2fd00d9
commit
3c6811a322
72 changed files with 978 additions and 366 deletions
|
|
@ -1186,10 +1186,15 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
|
|||
}
|
||||
localEnum = OpenAPI_rat_type_FromString(rat_restrictions_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_rat_type_FromString(rat_restrictions_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"rat_restrictions\" is not supported. Ignoring it ...",
|
||||
rat_restrictions_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
if (rat_restrictionsList->count == 0) {
|
||||
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed: Expected rat_restrictionsList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1244,10 +1249,15 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
|
|||
}
|
||||
localEnum = OpenAPI_core_network_type_FromString(core_network_type_restrictions_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_core_network_type_FromString(core_network_type_restrictions_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"core_network_type_restrictions\" is not supported. Ignoring it ...",
|
||||
core_network_type_restrictions_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(core_network_type_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(core_network_type_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
if (core_network_type_restrictionsList->count == 0) {
|
||||
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed: Expected core_network_type_restrictionsList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1348,10 +1358,15 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
|
|||
}
|
||||
localEnum = OpenAPI_sor_update_indicator_FromString(sor_update_indicator_list_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_sor_update_indicator_FromString(sor_update_indicator_list_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"sor_update_indicator_list\" is not supported. Ignoring it ...",
|
||||
sor_update_indicator_list_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(sor_update_indicator_listList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(sor_update_indicator_listList, (void *)localEnum);
|
||||
}
|
||||
if (sor_update_indicator_listList->count == 0) {
|
||||
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed: Expected sor_update_indicator_listList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1561,10 +1576,15 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
|
|||
}
|
||||
localEnum = OpenAPI_rat_type_FromString(primary_rat_restrictions_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_rat_type_FromString(primary_rat_restrictions_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"primary_rat_restrictions\" is not supported. Ignoring it ...",
|
||||
primary_rat_restrictions_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(primary_rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(primary_rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
if (primary_rat_restrictionsList->count == 0) {
|
||||
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed: Expected primary_rat_restrictionsList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1586,10 +1606,15 @@ OpenAPI_access_and_mobility_subscription_data_t *OpenAPI_access_and_mobility_sub
|
|||
}
|
||||
localEnum = OpenAPI_rat_type_FromString(secondary_rat_restrictions_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_rat_type_FromString(secondary_rat_restrictions_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"secondary_rat_restrictions\" is not supported. Ignoring it ...",
|
||||
secondary_rat_restrictions_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(secondary_rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(secondary_rat_restrictionsList, (void *)localEnum);
|
||||
}
|
||||
if (secondary_rat_restrictionsList->count == 0) {
|
||||
ogs_error("OpenAPI_access_and_mobility_subscription_data_parseFromJSON() failed: Expected secondary_rat_restrictionsList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue