mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-02 21:30:10 +00:00
Added N32 Interface to implement SEPP
This commit is contained in:
parent
a8790713d7
commit
e41afff7ac
63 changed files with 5503 additions and 290 deletions
30
lib/sbi/openapi/model/http_method_any_of.c
Normal file
30
lib/sbi/openapi/model/http_method_any_of.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "http_method_any_of.h"
|
||||
|
||||
char* OpenAPI_http_method_any_of_ToString(OpenAPI_http_method_any_of_e http_method_any_of)
|
||||
{
|
||||
const char *http_method_any_ofArray[] = { "NULL", "GET", "PUT", "POST", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE" };
|
||||
size_t sizeofArray = sizeof(http_method_any_ofArray) / sizeof(http_method_any_ofArray[0]);
|
||||
if (http_method_any_of < sizeofArray)
|
||||
return (char *)http_method_any_ofArray[http_method_any_of];
|
||||
else
|
||||
return (char *)"Unknown";
|
||||
}
|
||||
|
||||
OpenAPI_http_method_any_of_e OpenAPI_http_method_any_of_FromString(char* http_method_any_of)
|
||||
{
|
||||
int stringToReturn = 0;
|
||||
const char *http_method_any_ofArray[] = { "NULL", "GET", "PUT", "POST", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE" };
|
||||
size_t sizeofArray = sizeof(http_method_any_ofArray) / sizeof(http_method_any_ofArray[0]);
|
||||
while (stringToReturn < sizeofArray) {
|
||||
if (strcmp(http_method_any_of, http_method_any_ofArray[stringToReturn]) == 0) {
|
||||
return stringToReturn;
|
||||
}
|
||||
stringToReturn++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue