How to define UUID property in JSON Schema and Open API (OAS)
问题 When using JSON Schema and Open API specification (OAS) to document a REST API, how do I define the UUID property? 回答1: 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, the format property is an open string-valued