Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support projections in rest.li schema validation
RB=743441 BUG=INP-8188 G=si-dev R=kbalasub,kjin,aponniah,kvidhani A=kbalasub,kvidhani
- Loading branch information
Jun Chen
committed
Jun 14, 2016
1 parent
1eb31fa
commit d8689a8
Showing
14 changed files
with
843 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,4 +73,4 @@ | |
} ] | ||
} | ||
} | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
.../com.linkedin.restli.examples.greetings.client.autoValidationWithProjection.restspec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"annotations" : { | ||
"createOnly" : { | ||
"value" : [ "stringB", "intB", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo2", "MapWithTyperefs/*/id" ] | ||
}, | ||
"readOnly" : { | ||
"value" : [ "stringA", "intA", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo1", "ArrayWithInlineRecord/*/bar1", "validationDemoNext/stringB", "validationDemoNext/UnionFieldWithInlineRecord" ] | ||
} | ||
}, | ||
"name" : "autoValidationWithProjection", | ||
"namespace" : "com.linkedin.restli.examples.greetings.client", | ||
"path" : "/autoValidationWithProjection", | ||
"schema" : "com.linkedin.restli.examples.greetings.api.ValidationDemo", | ||
"doc" : "A simplied resource for testing Rest.li data automatic validation with automatic projection.\n\ngenerated from: com.linkedin.restli.examples.greetings.server.AutomaticValidationWithProjectionResource", | ||
"collection" : { | ||
"identifier" : { | ||
"name" : "autoValidationWithProjectionId", | ||
"type" : "int" | ||
}, | ||
"supports" : [ "batch_create", "batch_get", "create", "get", "get_all" ], | ||
"methods" : [ { | ||
"annotations" : { | ||
"returnEntity" : { } | ||
}, | ||
"method" : "create" | ||
}, { | ||
"method" : "get" | ||
}, { | ||
"annotations" : { | ||
"returnEntity" : { } | ||
}, | ||
"method" : "batch_create" | ||
}, { | ||
"method" : "batch_get" | ||
}, { | ||
"method" : "get_all" | ||
} ], | ||
"finders" : [ { | ||
"name" : "searchWithProjection" | ||
} ], | ||
"entity" : { | ||
"path" : "/autoValidationWithProjection/{autoValidationWithProjectionId}" | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...i-int-test-api/src/main/pegasus/com/linkedin/restli/examples/greetings/api/IncludeMe.pdsc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"type": "record", | ||
"name": "IncludeMe", | ||
"namespace" : "com.linkedin.restli.examples.greetings.api", | ||
"fields": [ | ||
{ | ||
"name" : "includedA", | ||
"type" : "string", | ||
"optional": true, | ||
"validate": { | ||
"strlen": { | ||
"min": 1, | ||
"max": 10 | ||
} | ||
} | ||
}, | ||
{ | ||
"name" : "includedB", | ||
"type" : "string", | ||
"optional": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,4 +97,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.