There’s no built-in type for UUID, but the OpenAPI Specification suggests using
type: string
format: uuid
From the Data Types section (emphasis mine):
Primitives have an optional modifier property:
format. OAS uses several known formats to define in fine detail the data type being used. However, to support documentation needs, theformatproperty is an open string-valued property, and can have any value. Formats such as"email","uuid", and so on, MAY be used even though undefined by this specification.
For example, Swagger Codegen maps format: uuid to System.Guid in C# or java.util.UUID in Java. Tools that don’t support format: uuid will handle it as just type: string.