Skip to content

Commit

Permalink
Added media type property to StringSchema to reflect json schema defi…
Browse files Browse the repository at this point in the history
…nition
  • Loading branch information
sukhrajm committed Sep 2, 2016
1 parent 73a4fa1 commit 8aae855
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public class StringSchema extends ValueTypeSchema {
@JsonProperty
private String pattern;

/**
* The will be the media type
*/
@JsonProperty
private String mediaType;

@Override
public StringSchema asStringSchema() {
return this;
Expand All @@ -43,6 +49,10 @@ public String getPattern() {
return pattern;
}

public String getMediaType() {
return mediaType;
}

@Override
public JsonFormatTypes getType() {
return JsonFormatTypes.STRING;
Expand All @@ -65,6 +75,10 @@ public void setPattern(String pattern) {
this.pattern = pattern;
}

public void setMediaType(String mediaType) {
this.mediaType = mediaType;
}

@Override
public boolean equals(Object obj)
{
Expand Down

0 comments on commit 8aae855

Please sign in to comment.