5G-MAG / rt-5gms-application-function

5G Media Streaming - Application Function
https://www.5g-mag.com/streaming
Other
11 stars 6 forks source link

Add string validation to OpenAPI code templates. #128

Closed davidjwbbc closed 1 week ago

davidjwbbc commented 8 months ago

Description

The current development branch for the rt-5gms-application-function contains openapi-generator templates that include some extra validation for number ranges.

One thing they do not currently validate are the values for string types which can have:

Design

The storage of string should be a char* unless the string has a format of byte or binary, in which case the storage shall be a void* for the data and a size_t representing the length. When byte is used as the format the string will be base64 decoded into the void* data block and the decoded length stored in the size_t.

The validation when checking a string type variable shall:

A tidy up function should also be included which will free any compiled regex structures that will be automatically registered as an atexit function.

rjb1000 commented 8 months ago

When any other value log a warning about not understanding the format and ignore format validation.

How about a reassuring warning such as:

davidjwbbc commented 1 week ago

Added in PR #164