Skip to content

Commit

Permalink
Merge pull request #508 from wking/error-on-null-type
Browse files Browse the repository at this point in the history
browser/swagger-client.js: Throw errors for null types
  • Loading branch information
fehguy committed Jul 23, 2015
2 parents 71d5a1e + ba77ae2 commit 1daf5bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions browser/swagger-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,9 @@ Resolver.prototype.resolveAllOf = function(spec, obj, depth) {
var name;
for(var key in obj) {
var item = obj[key];
if(item === null) {
throw new TypeError("Swagger 2.0 does not support null types (" + obj + "). See https://github.com/swagger-api/swagger-spec/issues/229.")
}
if(item && typeof item.allOf !== 'undefined') {
var allOf = item.allOf;
if(_.isArray(allOf)) {
Expand Down

0 comments on commit 1daf5bf

Please sign in to comment.