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

Disabling reference-components-regex #28

Merged
merged 1 commit into from
Apr 3, 2018
Merged

Conversation

philsturgeon
Copy link
Contributor

@philsturgeon philsturgeon commented Mar 20, 2018

The resolver is rewriting $refs, so it turns './schemas/parameters.yml#/Page' into '#/paths/~1v1~1conversations/get/parameters/1' and sometimes puts that value into x-miro instead.

We'll track fixing this in #43, but for the sake of fixing things for multiple users we gotta disable this rule.

Some other random changes snuck in, please don't complain about the boyscouting.

Fixes #23

@@ -688,7 +688,9 @@ function checkPathItem(pathItem, path, openapi, options) {
op.should.not.have.property('produces');
op.should.not.have.property('schemes');
op.should.have.property('responses');
op.responses.should.not.be.empty();
if (!(typeof op.responses === 'object' && Object.keys(op.responses).length > 0)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but an empty responses was causing unclear errors.

post:
summary: b
parameters:
- $ref: './parameters.yaml#/foo'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be considered valid, but supposedly is not.

@philsturgeon philsturgeon force-pushed the feature/regex branch 2 times, most recently from 84709e5 to 8bd2756 Compare April 2, 2018 21:18
done();
});

it('is valid with ./', done => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is coming up as true.

}
};

it('should error if missing ./', done => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is failing, as missing a ./ is showing up as valid... this seems to be the opposite of the complaints.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.3%) to 64.992% when pulling 29ecc8f on feature/regex into 4d72e24 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.3%) to 64.992% when pulling 29ecc8f on feature/regex into 4d72e24 on master.

@coveralls
Copy link

coveralls commented Apr 3, 2018

Coverage Status

Coverage increased (+1.2%) to 64.992% when pulling 1fcd638 on feature/regex into 31456aa on master.

@philsturgeon philsturgeon changed the title Trying to solve the mystery of #23 Disabling reference-components-regex Apr 3, 2018
Copy link

@igor-brishkoski igor-brishkoski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good otherwise.

lib/linter.js Outdated
});
if (target) {
if (split) {
// console.log('====\ntarget', target);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code if not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refresh!

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

Successfully merging this pull request may close these issues.

Component responses resolving external files in an odd fashion
3 participants