OpenApiSpecVersionExtensions.ParseOpenApiSpecVersion method

Converts a string representation of an OpenAPI spec version to the corresponding enum value.

public static OpenApiSpecVersion ParseOpenApiSpecVersion(this string version)
parameter description
version The string representation of the OpenAPI spec version.

Return Value

The corresponding OpenApiSpecVersion enum value.

Exceptions

exception condition
ArgumentException Thrown when the provided version string is not recognized.

See Also