From 4125f3515e3ff3ec5d95b415bbb9e012e127bc9a Mon Sep 17 00:00:00 2001 From: Charles Horn Date: Mon, 3 Aug 2015 17:02:43 +1200 Subject: [PATCH] add custom schema validation info to readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 1022781..8fe02a0 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,15 @@ expect(subject).to validate( ) ``` +Your Swagger.json can be validated against additional custom schemata, for example to enforce organisation API documentation standards, by using the following syntax: + +```ruby +it 'additionally conforms to a custom schema' do + expect(subject).to conform_to(".json") +end +``` +We have included an example [here] (data/custom_schemata/westfield_api_standards.json). The file path to this custom schema is stored in `Apivore::CustomSchemaValidator::WF_SCHEMA`, if you wish to use it. + Run the tests as part of your normal rspec test suite, e.g., `rake spec:requests` ## Useful Resources