UKHomeOffice-attic / lev-api-docs

Contract and documentation for the lev-api
GNU General Public License v2.0
1 stars 5 forks source link

Documentation/Schema does not indicate max lengths of properties #20

Open adamconder opened 8 years ago

adamconder commented 8 years ago

It would be good if the schema in https://github.com/UKHomeOffice/lev-api-docs/blob/master/lev-api.md could indicate the max length / regex pattern for string values on the response.

timgent commented 8 years ago

Our schema is using the JSON Schema standard, but so far as I can see that doesn't allow specification of max length or regex patterns. Can I ask whey they would be required?

adamconder commented 8 years ago

@timgent our QA is looking to gather test data which we will be using for unit tests within our application as well as Contract/E2E testing. We want to ensure we can handle responses from GRO gracefully.

timgent commented 8 years ago

Ok. Turns out json schema does support all these things I just hadn't quite seen it, though regex patterns for strings seems maybe a bit much? We'd end up putting the entire character set in there to be allowed in any order!

timgent commented 8 years ago

Will look to do a PR for this one too, but will wait for the others to be merged first

adamconder commented 8 years ago

That sounds great! I agree the regex for the whole character set is too much.