Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ablaas-ald opened this issue Apr 9, 2019 · 6 comments
Assignees

Comments

@ablaas-ald
Copy link

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: json-schema-org/json-schema-spec#542

@EricWittmann EricWittmann changed the title New String Format > UUID Editor: Add support for free-form "format" values in data types (e.g. UUID) Apr 9, 2019
@InfoSec812
Copy link

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.

@theonewolf
Copy link

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

@EricWittmann
Copy link
Member

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

@midhunadarvin
Copy link

This is really required ! +1

@mahgo
Copy link

mahgo commented Mar 28, 2023

This would be really good.

@siddharthgoel88
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants