mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30:09 +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
|
|
@ -138,10 +138,15 @@ OpenAPI_af_event_exposure_data_t *OpenAPI_af_event_exposure_data_parseFromJSON(c
|
|||
}
|
||||
localEnum = OpenAPI_af_event_FromString(af_events_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_af_event_FromString(af_events_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"af_events\" is not supported. Ignoring it ...",
|
||||
af_events_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(af_eventsList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(af_eventsList, (void *)localEnum);
|
||||
}
|
||||
if (af_eventsList->count == 0) {
|
||||
ogs_error("OpenAPI_af_event_exposure_data_parseFromJSON() failed: Expected af_eventsList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
|
||||
af_ids = cJSON_GetObjectItemCaseSensitive(af_event_exposure_dataJSON, "afIds");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue