The following case conventions for names and strings are used in the 5GC SBI service APIs.
1)
UPPER_WITH_UNDERSCORE
All letters of a string are capital letters. Digits are allowed. Word boundaries are represented by the underscore "_" character. No other characters are allowed.
Example 1:
DATA_MANAGEMENT
CELL_CHANGE
2)
lower_with_underscore
All letters of a string are lowercase letters. Digits are allowed. Word boundaries are represented by the underscore "_" character. No other characters are allowed.
Example 2:
data_management;
cell_change.
3)
UPPER-WITH-HYPHEN
All letters of a string are capital letters. Digits are allowed. Word boundaries are represented by the hyphen "-" character. No other characters are allowed.
Example 3:
DATA-MANAGEMENT
CELL-CHANGE
4)
lower-with-hyphen
All letters of a string are lowercase letters. Digits are allowed. Word boundaries are represented by the hyphen "-" character. No other characters are allowed.
Example 4:
data-management;
cell-change.
5)
UpperCamel
A string is formed by concatenating words. Each word starts with a letter or a digit. The first letter of each word shall be an uppercase letter; all other characters in the word shall be lowercase letters or digits.
Abbreviations follow the same scheme (i.e. first letter uppercase, all other letters lowercase).
Example 5:
DataManagement.
CellChange
5QiPriorityLevel
Amf3GppAccessRegistration
6)
lowerCamel
A string is formed by concatenating words.Each word starts with a letter or a digit. The first letter of the first word shall be a lowercase letter; the first letter of the rest of the words shall be an uppercase letter. All other characters in the words shall be lowercase letters or digits.
Abbreviations follow the same scheme.
Example 6:
An API shall take the name of the corresponding service (e.g. Nudm_SubscriberDataManagement). When used in URIs the name shall be converted to lower-with-hyphen and may use an abbreviated form (e.g. nudm-sdm).
All path segments of a resource URI which represent a string constant shall use lower-with-hyphen (this implies that a path cannot end with "/").
Example 1:
subscriber-data
b)
If a resource represents a collection of entities and the last path segment of the resource URI is a string constant, that last path segment shall be plural.
Example 2:
…/prefix/api/v1/users
c)
For resources where the last path segment of the resource URI is a string constant, that last path segment shall be a noun or a composite noun.
Example 3:
…/prefix/api/v1/users
Example 4:
…/prefix/api/v1/user-session
d)
For custom operations, the last path segment of the URI via which the operation is invoked shall be a verb, or shall start with a verb.
Example 5:
…/app-instances/{appInstanceId}/instantiate
Example 6:
…/sessions/terminate-all
e)
All path segments of a URI which are variable names shall use lowerCamel, and shall be surrounded by curly brackets.
Example 7:
…/subscriber-data/{supi}
f)
Once a variable is replaced at runtime by an actual string, the string shall follow the rules for a path segment defined in RFC 3986. RFC 3986 disallows certain characters from use in a path segment. Each actual 5GC SBI service API specification shall define this restriction to be followed when generating values for path segment variables, or propose a suitable encoding (such as percent-encoding according to RFC 3986), to escape such characters if they can appear in input strings intended to be substituted for a path segment variable.
URI query parameter names in queries shall use lower-with-hyphen.
Example 1:
?nf-type=AMF
b)
Variables that represent actual parameter values in queries shall use lowerCamel and shall be surrounded by curly brackets.
Example 2:
?nf-id={chooseAValue}
c)
When a variable is replaced at runtime by an actual string, the convention defined in clause 5.1.3.2 item f) applies to that string.
The following syntax conventions apply when defining the names for attributes in the 5GC SBI service API data structures, carried in the content of http requests and responses.
a)
Names of attributes shall be represented using lowerCamel.
Example 1:
attributeName
b)
Names of arrays (i.e. those with cardinality 1..N or 0..N) shall be plural rather than singular.
Example 2:
users
c)
Each value of an enumeration type shall be represented using UPPER_WITH_UNDERSCORE.
Example 3:
PROHIBITTED_LISTED
d)
The names of data types shall be represented using UpperCamel.
Example 4:
ResourceHandle