Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update json-schema-ref-parser dependency #30

Closed
RomanHotsiy opened this issue Jan 15, 2016 · 8 comments
Closed

Update json-schema-ref-parser dependency #30

RomanHotsiy opened this issue Jan 15, 2016 · 8 comments

Comments

@RomanHotsiy
Copy link

Currently swagger-parser uses [email protected].
Could you please update it to use the latest version?

@JamesMessinger
Copy link
Member

I'm hoping to get to this this weekend. I've been waiting to finish this PR first. As of this commit, it's mostly done. Just need to update the documentation, and find out why some tests are failing in a few browsers

@malko
Copy link

malko commented Feb 3, 2016

👍

@stvnmntjy
Copy link

+1.

2.2.0 seems to fix a bug (according to my testing) in 1.4.1 re: consistency when resolving non-local json references. in 1.4.1, there’s non-deterministic (non-unique) results over my large sample parsing test (1000 iterations of bundle() yielding different definitions).

just to give you an idea of the test…

var jsonSchemaRefParser = require('json-schema-ref-parser');
var _ = require('lodash');
var async = require('async');

var results = [];

async.timesSeries(1000, function (n, next) {
        'use strict';
        jsonSchemaRefParser.bundle(__dirname + '/api/index.yaml')
            .then(function (api) {
                results.push(JSON.stringify(api.definitions));
                next();
            });
    }, function (err) {
    'use strict';
    var length = results.length;
    console.log('length === 1000? ' + (length === 1000));

    var uniqArray = _.uniq(results);
    var uniqLength = uniqArray.length;
    console.log('unique length === 1? ' + (uniqLength === 1));
    console.log(uniqArray);
});

@RomanHotsiy
Copy link
Author

@BigstickCarpet it blocks me. Could I help you with this?

@JamesMessinger
Copy link
Member

I just stabilized JSON Schema $Ref Parser v3.0.0. So tomorrow I'll start getting Swagger Parser updated

@RomanHotsiy
Copy link
Author

Awesome! Thanks for quick reply :)

@JamesMessinger
Copy link
Member

Swagger Parser v4.0 beta is now available.
You can install the beta using npm install swagger-parser@beta.

@RomanHotsiy
Copy link
Author

Thanks, now it's fine. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants