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

Define custom type formats #1360

Closed
grosch opened this issue Jun 9, 2017 · 1 comment
Closed

Define custom type formats #1360

grosch opened this issue Jun 9, 2017 · 1 comment

Comments

@grosch
Copy link

grosch commented Jun 9, 2017

Is there any way to specify a custom type? A large number of my parameters are a UUID and I'm not seeing anything explicit for that. I'd like to somehow define a UUID format for string where it also knows a default example value for a UUID.

I'd like to do something like:

CustomType:
  uuid:
    parentType: string
    examples: 
      application/json: "71b4702f-ed9f-48f6-b77f-d4dda03ea01b"
@hkosova
Copy link
Contributor

hkosova commented Jun 9, 2017

Some tools support format: uuid:

type: string
format: uuid

format is an open-valued property so you can specify any format provided that the tools support that. See also OAI/OpenAPI-Specification#607 (comment).

@webron webron closed this as completed Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants