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

add UUID type to raml spec #770

Merged
merged 2 commits into from
May 21, 2017
Merged

add UUID type to raml spec #770

merged 2 commits into from
May 21, 2017

Conversation

ajcamilo
Copy link
Contributor

When RAML spec builder tries to parse a POJO that has a property of type UUID, it tries to parse like a normal class.

But the output should be something like this:

types:
  UUID:
    type: string
    pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

(reference: raml-org/raml-spec#483 (comment))

This is what this PR resolves for the java.util.UUID.

@jknack jknack added this to the 1.1.2 milestone May 15, 2017
@@ -196,6 +204,10 @@ private static RamlType simpleParse(final Type type) {
enums.add(((Enum) value).name());
}
complex.values = enums;
} else if(UUID.class.isAssignableFrom(rawType)){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add space after if before closing {

@jknack jknack merged commit a4f4a61 into jooby-project:master May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants