mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-03 05:40: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
|
|
@ -759,10 +759,15 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr
|
|||
}
|
||||
localEnum = OpenAPI_access_type_FromString(access_types_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_access_type_FromString(access_types_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"access_types\" is not supported. Ignoring it ...",
|
||||
access_types_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(access_typesList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(access_typesList, (void *)localEnum);
|
||||
}
|
||||
if (access_typesList->count == 0) {
|
||||
ogs_error("OpenAPI_policy_association_request_parseFromJSON() failed: Expected access_typesList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -827,10 +832,15 @@ OpenAPI_policy_association_request_t *OpenAPI_policy_association_request_parseFr
|
|||
}
|
||||
localEnum = OpenAPI_rat_type_FromString(rat_types_local->valuestring);
|
||||
if (!localEnum) {
|
||||
ogs_error("OpenAPI_rat_type_FromString(rat_types_local->valuestring) failed");
|
||||
goto end;
|
||||
ogs_info("Enum value \"%s\" for field \"rat_types\" is not supported. Ignoring it ...",
|
||||
rat_types_local->valuestring);
|
||||
} else {
|
||||
OpenAPI_list_add(rat_typesList, (void *)localEnum);
|
||||
}
|
||||
OpenAPI_list_add(rat_typesList, (void *)localEnum);
|
||||
}
|
||||
if (rat_typesList->count == 0) {
|
||||
ogs_error("OpenAPI_policy_association_request_parseFromJSON() failed: Expected rat_typesList to not be empty (after ignoring unsupported enum values).");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue