Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: APIDevTools/swagger-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.0
Choose a base ref
...
head repository: APIDevTools/swagger-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.0
Choose a head ref

Commits on Nov 6, 2017

  1. Copy the full SHA
    e22b97f View commit details
  2. bumped dependencies

    JamesMessinger committed Nov 6, 2017
    Copy the full SHA
    0258030 View commit details
  3. release v4.0.1

    JamesMessinger committed Nov 6, 2017
    Copy the full SHA
    00a8a54 View commit details

Commits on Nov 10, 2017

  1. changed the author URL

    JamesMessinger committed Nov 10, 2017
    Copy the full SHA
    60c9763 View commit details

Commits on Dec 11, 2017

  1. Copy the full SHA
    b8bbefd View commit details
  2. Copy the full SHA
    915ad49 View commit details
  3. Copy the full SHA
    7af68bd View commit details
  4. Copy the full SHA
    ae4b085 View commit details
  5. Copy the full SHA
    7030ba8 View commit details

Commits on Jan 11, 2018

  1. Copy the full SHA
    2e2a30e View commit details

Commits on Jan 17, 2018

  1. Copy the full SHA
    b7bf6ba View commit details
  2. updated dependencies

    JamesMessinger committed Jan 17, 2018
    Copy the full SHA
    ba5fda5 View commit details
  3. release v4.0.2

    JamesMessinger committed Jan 17, 2018
    Copy the full SHA
    14d0c5b View commit details

Commits on Jan 18, 2018

  1. Copy the full SHA
    9930126 View commit details

Commits on Mar 8, 2018

  1. Validate required object properties

    Fixes #44 (and more)
    marcelstoer committed Mar 8, 2018
    Copy the full SHA
    81472a3 View commit details

Commits on Mar 9, 2018

  1. Merge pull request #83 from marcelstoer/master

    Validate required object properties
    JamesMessinger authored Mar 9, 2018
    Copy the full SHA
    27f0546 View commit details
  2. whitespace changes

    JamesMessinger committed Mar 9, 2018
    Copy the full SHA
    fce91bb View commit details
  3. When validating required properties also consider schema ancestors

    Fixes #83 (it's build had actually failed)
    marcelstoer committed Mar 9, 2018
    Copy the full SHA
    e82fe95 View commit details

Commits on Mar 18, 2018

  1. updated dependencies

    JamesMessinger committed Mar 18, 2018
    Copy the full SHA
    2403ab2 View commit details
  2. Copy the full SHA
    9f778c5 View commit details
  3. Copy the full SHA
    086fc2b View commit details
  4. Copy the full SHA
    26d8804 View commit details

Commits on Mar 19, 2018

  1. Refactored the "real world" tests to make the error-handling logic mo…

    …re tolerant to problematic API definitions
    JamesMessinger committed Mar 19, 2018
    3
    Copy the full SHA
    764bd60 View commit details
  2. Copy the full SHA
    98c0746 View commit details

Commits on Apr 8, 2018

  1. Copy the full SHA
    9368f37 View commit details

Commits on Apr 9, 2018

  1. Copy the full SHA
    13137c6 View commit details
  2. Copy the full SHA
    08db4e3 View commit details
  3. updated dependencies

    JamesMessinger committed Apr 9, 2018
    Copy the full SHA
    f40a30a View commit details
  4. Copy the full SHA
    fc1b558 View commit details

Commits on Apr 10, 2018

  1. Copy the full SHA
    fad3d45 View commit details
  2. Copy the full SHA
    2bcbdad View commit details
  3. Copy the full SHA
    6ba7a1a View commit details
  4. Copy the full SHA
    88badf8 View commit details
  5. Copy the full SHA
    20f7cfc View commit details
  6. Merge branch 'master' of https://github.com/marcelstoer/swagger-parser

    …into marcelstoer-master
    
    # Conflicts:
    #	lib/validators/spec.js
    #	test/specs/real-world/real-world.spec.js
    JamesMessinger committed Apr 10, 2018
    Copy the full SHA
    f7b55d0 View commit details
  7. fixed a typo

    JamesMessinger committed Apr 10, 2018
    Copy the full SHA
    e92ad70 View commit details
  8. Copy the full SHA
    1b73447 View commit details
  9. Copy the full SHA
    72398ed View commit details
  10. some of the "real world" APIs fail validation on web browsers (other …

    …than Chrome) due to unsupported RegExp syntax
    JamesMessinger committed Apr 10, 2018
    Copy the full SHA
    e62c75f View commit details
  11. either run the Mocha (Node.js) tests OR the Karma (web browser) tests…

    … on each CI instance, not both
    JamesMessinger committed Apr 10, 2018
    Copy the full SHA
    bbf1c79 View commit details

Commits on Apr 11, 2018

  1. Copy the full SHA
    e87a254 View commit details
  2. Copy the full SHA
    5c5eea6 View commit details
  3. updated dependencies

    JamesMessinger committed Apr 11, 2018
    Copy the full SHA
    47d1baa View commit details
  4. release v4.1.0

    JamesMessinger committed Apr 11, 2018
    Copy the full SHA
    07575d7 View commit details
Showing with 9,552 additions and 10,858 deletions.
  1. 0 .gitignore
  2. +17 −3 .travis.yml
  3. +7 −0 CHANGELOG.md
  4. +4 −4 README.md
  5. +1 −1 bower.json
  6. +4,651 −3,956 dist/swagger-parser.js
  7. +235 −229 dist/swagger-parser.js.map
  8. +12 −18 dist/swagger-parser.min.js
  9. +1,162 −738 dist/swagger-parser.min.js.map
  10. +3 −3 karma.conf.js
  11. +45 −0 lib/validators/spec.js
  12. +2,867 −5,666 package-lock.json
  13. +21 −19 package.json
  14. +11 −4 test/.eslintrc.yml
  15. +1 −13 test/fixtures/globals.js
  16. +3 −3 test/fixtures/helper.js
  17. +3 −6 test/fixtures/mocha.js
  18. +109 −88 test/fixtures/path.js
  19. +1 −0 test/index.html
  20. +1 −0 test/mocha.opts
  21. 0 test/specs/invalid/newer-version.yaml
  22. 0 test/specs/invalid/not-swagger.yaml
  23. 0 test/specs/invalid/numeric-info-version.yaml
  24. 0 test/specs/invalid/numeric-version.yaml
  25. 0 test/specs/invalid/old-version.yaml
  26. +1 −1 test/specs/object-source/object-source.parsed.js
  27. +3 −3 test/specs/object-source/object-source.spec.js
  28. +156 −23 test/specs/real-world/real-world.spec.js
  29. +3 −3 test/specs/unknown/unknown.spec.js
  30. 0 test/specs/validate-schema/invalid/anyof.yaml
  31. 0 test/specs/validate-schema/invalid/file-body-param.yaml
  32. 0 test/specs/validate-schema/invalid/file-header-param.yaml
  33. 0 test/specs/validate-schema/invalid/invalid-param-location.yaml
  34. 0 test/specs/validate-schema/invalid/invalid-param-type.yaml
  35. 0 test/specs/validate-schema/invalid/invalid-response-code.yaml
  36. 0 test/specs/validate-schema/invalid/invalid-response-header-type.yaml
  37. 0 test/specs/validate-schema/invalid/invalid-response-type.yaml
  38. 0 test/specs/validate-schema/invalid/invalid-schema-type.yaml
  39. 0 test/specs/validate-schema/invalid/multi-header-param.yaml
  40. 0 test/specs/validate-schema/invalid/multi-path-param.yaml
  41. 0 test/specs/validate-schema/invalid/non-primitive-param-type.yaml
  42. 0 test/specs/validate-schema/invalid/non-primitive-response-header-type.yaml
  43. 0 test/specs/validate-schema/invalid/non-required-path-param.yaml
  44. 0 test/specs/validate-schema/invalid/oneof.yaml
  45. 0 test/specs/validate-schema/invalid/optional-path-param.yaml
  46. 0 test/specs/validate-schema/invalid/ref-to-invalid-path.yaml
  47. 0 test/specs/validate-schema/valid/allof.yaml
  48. 0 test/specs/validate-schema/valid/unknown-format.yaml
  49. 0 test/specs/validate-spec/invalid/array-body-no-items.yaml
  50. 0 test/specs/validate-spec/invalid/array-no-items.yaml
  51. 0 test/specs/validate-spec/invalid/array-response-header-no-items.yaml
  52. 0 test/specs/validate-spec/invalid/body-and-form-params.yaml
  53. 0 test/specs/validate-spec/invalid/duplicate-operation-params.yaml
  54. 0 test/specs/validate-spec/invalid/duplicate-path-params.yaml
  55. 0 test/specs/validate-spec/invalid/duplicate-path-placeholders.yaml
  56. 0 test/specs/validate-spec/invalid/file-invalid-consumes.yaml
  57. 0 test/specs/validate-spec/invalid/file-no-consumes.yaml
  58. 0 test/specs/validate-spec/invalid/invalid-response-code.yaml
  59. 0 test/specs/validate-spec/invalid/multiple-body-params.yaml
  60. 0 test/specs/validate-spec/invalid/multiple-operation-body-params.yaml
  61. 0 test/specs/validate-spec/invalid/multiple-path-body-params.yaml
  62. 0 test/specs/validate-spec/invalid/no-path-params.yaml
  63. 0 test/specs/validate-spec/invalid/path-param-no-placeholder.yaml
  64. 0 test/specs/validate-spec/invalid/path-placeholder-no-param.yaml
  65. +32 −0 test/specs/validate-spec/invalid/required-property-not-defined-definitions.yaml
  66. +30 −0 test/specs/validate-spec/invalid/required-property-not-defined-input.yaml
  67. +0 −1 test/specs/validate-spec/valid/.todo
  68. +59 −0 test/specs/validate-spec/valid/inherited-required-properties.yaml
  69. +17 −0 test/specs/validate-spec/validate-spec.spec.js
  70. +1 −1 www/css/style.min.css
  71. +1 −1 www/css/style.min.css.map
  72. +1 −1 www/index.html
  73. +4 −4 www/js/bundle.js
  74. +14 −14 www/js/bundle.js.map
  75. +5 −4 www/js/bundle.min.js
  76. +71 −51 www/js/bundle.min.js.map
Empty file modified .gitignore
100755 → 100644
Empty file.
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
# http://docs.travis-ci.com/user/languages/javascript-with-nodejs/

dist: trusty
sudo: false
sudo: required # TEMPORARY HACK (see https://github.com/travis-ci/travis-ci/issues/8836)
language: node_js

addons:
@@ -12,24 +12,38 @@ addons:
matrix:
include:
# Local Browsers
- node_js: 8
- node_js: 9
env: KARMA=true KARMA_COVERAGE=true

# Sauce Labs
- node_js: 8
- node_js: 9
env: KARMA=true KARMA_SAUCE=true

# Node
- node_js: 4
- node_js: 5
- node_js: 6
- node_js: 7
- node_js: 8
- node_js: 9

before_script:
# Setup a virtual display for browser testing
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

script:
# Always make sure the code passes linting rules
- npm run lint

# Run Karma (browser tests) or Mocha (Node.js tests).
- if [[ $KARMA ]]; then
npm run browserify -- --test;
npm run karma;
else
npm run istanbul;
fi

after_success:
# concatenate all code-coverage data into a single file
- ls -R1 coverage/*/lcov.info
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,13 @@ All notable changes will be documented in this file.
Swagger Parser adheres to [Semantic Versioning](http://semver.org/).


## [v4.1.0](https://github.com/BigstickCarpet/swagger-parser/tree/v4.1.0) (2018-04-11)

- [@marcelstoer](https://github.com/marcelstoer) submitted [PR #83](https://github.com/BigstickCarpet/swagger-parser/pull/83) and [PR #84](https://github.com/BigstickCarpet/swagger-parser/pull/84), both of which improve the [`validate()` method](https://github.com/BigstickCarpet/swagger-parser/blob/master/docs/swagger-parser.md#validateapi-options-callback). It will now detect when a JSON Schema in your API definition has `required` properties that don't exist.

[Full Changelog](https://github.com/BigstickCarpet/swagger-parser/compare/v4.0.0...v4.1.0)


## [v4.0.0](https://github.com/BigstickCarpet/swagger-parser/tree/v4.0.0) (2017-10-19)

#### Breaking Changes
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -9,10 +9,10 @@ Swagger Parser
============================
#### Swagger 2.0 parser and validator for Node and browsers

[![Build Status](https://api.travis-ci.org/BigstickCarpet/swagger-parser.svg)](https://travis-ci.org/BigstickCarpet/swagger-parser)
[![Build Status](https://api.travis-ci.org/BigstickCarpet/swagger-parser.svg?branch=master)](https://travis-ci.org/BigstickCarpet/swagger-parser)
[![Dependencies](https://david-dm.org/BigstickCarpet/swagger-parser.svg)](https://david-dm.org/BigstickCarpet/swagger-parser)
[![Coverage Status](https://coveralls.io/repos/BigstickCarpet/swagger-parser/badge.svg?branch=master&service=github)](https://coveralls.io/r/BigstickCarpet/swagger-parser)
[![Codacy Score](https://www.codacy.com/project/badge/6d686f916836433b9c013379fbe1052c)](https://www.codacy.com/public/jamesmessinger/swagger-parser)
[![Codacy Score](https://api.codacy.com/project/badge/Grade/6d686f916836433b9c013379fbe1052c)](https://www.codacy.com/public/jamesmessinger/swagger-parser)
[![Inline docs](http://inch-ci.org/github/BigstickCarpet/swagger-parser.svg?branch=master&style=shields)](http://inch-ci.org/github/BigstickCarpet/swagger-parser)
[![Tested on APIs.guru](https://api.apis.guru/badges/tested_on.svg)](https://apis.guru/browse-apis/)

@@ -31,8 +31,8 @@ Features
- [Resolves](docs/swagger-parser.md#resolveapi-options-callback) all `$ref` pointers, including external files and URLs
- Can [bundle](docs/swagger-parser.md#bundleapi-options-callback) all your Swagger files into a single file that only has _internal_ `$ref` pointers
- Can [dereference](docs/swagger-parser.md#dereferenceapi-options-callback) all `$ref` pointers, giving you a normal JavaScript object that's easy to work with
- **[Tested](http://bigstickcarpet.github.io/swagger-parser/test/index.html)** in Node.js and all modern web browsers on Mac, Windows, and Linux
- Tested on **[over 600 real-world APIs](https://apis.guru/browse-apis/)** from Google, Instagram, Spotify, etc.
- **[Tested](http://bigstickcarpet.com/swagger-parser/test/index.html)** in Node.js and all modern web browsers on Mac, Windows, and Linux
- Tested on **[over 1,000 real-world APIs](https://apis.guru/browse-apis/)** from Google, Instagram, Spotify, etc.
- Supports [circular references](docs/README.md#circular-refs), nested references, back-references, and cross-references
- Maintains object reference equality — `$ref` pointers to the same value always resolve to the same object instance

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"authors": [
{
"name": "James Messinger",
"homepage": "http://jamesmessinger.com"
"homepage": "http://bigstickcarpet.com"
}
],
"license": "MIT",
Loading
Oops, something went wrong.