apicurio-studio icon indicating copy to clipboard operation
apicurio-studio copied to clipboard

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

Open ablaas-ald opened this issue 6 years ago • 6 comments
trafficstars

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

ablaas-ald avatar Apr 09 '19 12:04 ablaas-ald

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.

InfoSec812 avatar Nov 22 '19 14:11 InfoSec812

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

theonewolf avatar Feb 09 '20 01:02 theonewolf

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

EricWittmann avatar Feb 10 '20 14:02 EricWittmann

This is really required ! +1

midhunadarvin avatar Jan 12 '21 09:01 midhunadarvin

This would be really good.

mahgo avatar Mar 28 '23 00:03 mahgo

Would love to have this. This really helps to add quite useful bit of contract information while designing the API.

siddharthgoel88 avatar Jan 16 '24 11:01 siddharthgoel88