Apicurio-studio: Editor: Add support for free-form "format" values in data types (e.g. UUID)

Created on 9 Apr 2019  ·  4Comments  ·  Source: Apicurio/apicurio-studio

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 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.

(copied from: https://stackoverflow.com/questions/50204588/how-to-define-uuid-property-in-json-schema-and-open-api-oas)

Other references: https://github.com/json-schema-org/json-schema-spec/issues/542

enhancement editor

Most helpful comment

I just noticed this is missing as well. I can manually add UUID in the source, but the it would be nice to have it in the UI.

All 4 comments

I just noticed this is missing as well. I can manually add UUID in the source, but the it would be nice to have it in the UI.

This would definitely be helpful for all of my use cases as well. I'm building a fairly UUID-heavy API!

OK with multiple votes for this I'll do my best to bump it up the priority list.

This is really required ! +1

Was this page helpful?
0 / 5 - 0 ratings