openapi-enforcer
Advanced tools
Comparing version 1.1.10 to 1.1.11
@@ -85,3 +85,3 @@ # Operation | ||
**Returns:** An [EnforcerResult](../enforcer-result.md) that resolves to an object with properties `body` and `header`. If the `body` passed in was an object then the `body` result will also be an object, not a JSON string. | ||
**Returns:** An [EnforcerResult](../enforcer-result.md) that resolves to an object with properties `body`, `header`, and `schema`. If the `body` passed in was an object then the `body` result will also be an object, not a JSON string. | ||
@@ -124,2 +124,6 @@ **Example with Body and Headers** | ||
// body: 'hello', | ||
// schema: { | ||
// type: 'string', | ||
// maxLength: 10 | ||
// }, | ||
// headers: { | ||
@@ -143,2 +147,2 @@ // expires: '2000-01-01' | ||
}) | ||
``` | ||
``` |
12
index.js
@@ -21,8 +21,8 @@ /** | ||
const dataTypeFormats = require('./bin/data-type-formats'); | ||
const Exception = require('./bin/exception'); | ||
const dataTypeFormats = require('./src/data-type-formats'); | ||
const Exception = require('./src/exception'); | ||
const RefParser = require('json-schema-ref-parser'); | ||
const Result = require('./bin/result'); | ||
const Super = require('./bin/super'); | ||
const util = require('./bin/util'); | ||
const Result = require('./src/result'); | ||
const Super = require('./src/super'); | ||
const util = require('./src/util'); | ||
@@ -166,2 +166,2 @@ /** | ||
Enforcer.v3_0.Schema.defineDataTypeFormat('string', 'date', dataTypeFormats.date); | ||
Enforcer.v3_0.Schema.defineDataTypeFormat('string', 'date-time', dataTypeFormats.dateTime); | ||
Enforcer.v3_0.Schema.defineDataTypeFormat('string', 'date-time', dataTypeFormats.dateTime); |
{ | ||
"name": "openapi-enforcer", | ||
"version": "1.1.10", | ||
"version": "1.1.11", | ||
"description": "Library for validating, parsing, and formatting data against open api schemas.", | ||
@@ -39,6 +39,6 @@ "main": "index.js", | ||
"chai": "^4.2.0", | ||
"chokidar-cli": "^1.2.1", | ||
"chokidar-cli": "^1.2.2", | ||
"coveralls": "^3.0.2", | ||
"mocha": "^5.2.0", | ||
"nyc": "^13.1.0" | ||
"nyc": "^13.3.0" | ||
}, | ||
@@ -45,0 +45,0 @@ "dependencies": { |
@@ -19,4 +19,4 @@ /** | ||
const expect = require('chai').expect; | ||
const EnforcerRef = require('../bin/enforcer-ref'); | ||
const Super = require('../bin/super'); | ||
const EnforcerRef = require('../src/enforcer-ref'); | ||
const Super = require('../src/super'); | ||
@@ -660,2 +660,2 @@ describe('definition-validator', () => { | ||
return Enforcers; | ||
} | ||
} |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const assert = require('../bin/assert'); | ||
const assert = require('../src/assert'); | ||
const expect = require('chai').expect; | ||
@@ -52,2 +52,2 @@ const ExternalDocumentation = require('../').v2_0.ExternalDocumentation; | ||
}); | ||
}); |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const assert = require('../bin/assert'); | ||
const assert = require('../src/assert'); | ||
const expect = require('chai').expect; | ||
@@ -92,2 +92,2 @@ const Info = require('../').v2_0.Info; | ||
}); | ||
}); |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const assert = require('../bin/assert'); | ||
const assert = require('../src/assert'); | ||
const expect = require('chai').expect; | ||
@@ -409,2 +409,2 @@ const Enforcer = require('../'); | ||
}); | ||
}); |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const assert = require('../bin/assert'); | ||
const assert = require('../src/assert'); | ||
const expect = require('chai').expect; | ||
@@ -204,2 +204,2 @@ const Response2 = require('../').v2_0.Response; | ||
}); | ||
}); |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const assert = require('../bin/assert'); | ||
const assert = require('../src/assert'); | ||
const expect = require('chai').expect; | ||
@@ -63,2 +63,2 @@ const Tag = require('../').v2_0.Tag; | ||
}); | ||
}); |
@@ -18,3 +18,3 @@ /** | ||
'use strict'; | ||
const Exception = require('../bin/exception'); | ||
const Exception = require('../src/exception'); | ||
const expect = require('chai').expect; | ||
@@ -116,2 +116,2 @@ | ||
}); | ||
}); |
@@ -19,3 +19,3 @@ /** | ||
const expect = require('chai').expect; | ||
const util = require('../bin/util'); | ||
const util = require('../src/util'); | ||
@@ -49,2 +49,2 @@ describe('util', () => { | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
735665
15564