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

Release 5.0 #859

Merged
merged 269 commits into from
Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
cb01ca3
chore: Bump @types/lodash from 4.14.141 to 4.14.142 (#655)
dependabot-preview[bot] Oct 8, 2019
da56b5c
fix: make macos binary (#651)
XVincentX Oct 9, 2019
9a98e1e
chore: remove @oclif/test leftovers (#666)
P0lip Oct 10, 2019
6e4bff6
chore: Bump @stoplight/json-ref-resolver from 2.2.0 to 2.3.0 (#664)
nulltoken Oct 10, 2019
0e25ae4
docs(changelog): release 4.2 (#668)
P0lip Oct 10, 2019
016c286
chore(tests): raise tests execution timeout to 10s (#667)
nulltoken Oct 10, 2019
59d3531
chore(karma): improve fixtures generation (#653)
P0lip Oct 10, 2019
779aea9
chore: Bump typescript from 3.6.3 to 3.6.4 (#661)
dependabot-preview[bot] Oct 10, 2019
f97c942
chore: add .editorconfig file (#649)
nulltoken Oct 10, 2019
b43ea8f
refactor: ref resolvers in separate pkg (#659)
karol-maciaszek Oct 10, 2019
43a2e5e
chore: Bump @stoplight/json-ref-resolver from 2.3.0 to 2.3.1 (#669)
dependabot-preview[bot] Oct 10, 2019
79dea9a
chore: drop support for Node 8 (#665)
P0lip Oct 11, 2019
463ae12
fix(rule): workaround 'model-description' rule name collision
nulltoken Oct 12, 2019
3943dfe
Merge pull request #675 from nulltoken/ntk/model_description
Oct 12, 2019
ef3646c
chore: Bump @stoplight/json-ref-resolver from 2.3.1 to 2.4.1 (#672)
dependabot-preview[bot] Oct 12, 2019
5ab2b71
feat: implement unused-definition and unused-components-schema rules …
nulltoken Oct 14, 2019
41a8e28
chore: Bump nanoid from 2.1.2 to 2.1.3 (#674)
dependabot-preview[bot] Oct 15, 2019
f8cad6b
chore: Bump @stoplight/json-ref-resolver from 2.4.1 to 3.0.1 (#682)
P0lip Oct 15, 2019
9446d94
chore: minor JSONSchema typings tweak (#676)
P0lip Oct 15, 2019
4c444ce
chore: Bump husky from 3.0.8 to 3.0.9 (#684)
dependabot-preview[bot] Oct 15, 2019
712deed
chore: Bump @types/jest from 24.0.18 to 24.0.19 (#683)
dependabot-preview[bot] Oct 15, 2019
d4074bc
chore: typecheck the tests before build (#660)
nulltoken Oct 16, 2019
5f056b2
Fix typo (#691)
danielgtaylor Oct 18, 2019
71986e6
fix: refine xor function error message (#696)
nulltoken Oct 21, 2019
648100e
docs: recommended was missing in functions!
Oct 22, 2019
81491ba
feat: Add rule to check for undefined tags
Oct 20, 2019
d71e3eb
fix: Update linter tests for new tag-defined rule
Oct 20, 2019
229ab3a
Update expected results from test.harness tests
Oct 24, 2019
f5eb93c
Add doc for tag-defined rule
Oct 24, 2019
846e8d1
Merge pull request #704 from mkistler/tag-defined
Oct 24, 2019
92f06c4
Merge branch 'develop' into feat/remove-when
Oct 24, 2019
8c1aedd
Merge pull request #614 from stoplightio/feat/remove-when
Oct 24, 2019
687e8b6
breaking: bump default fail severity to warn (#706)
Oct 24, 2019
7e5e6e6
chore: Bump nanoid from 2.1.3 to 2.1.6 (#707)
dependabot-preview[bot] Oct 25, 2019
3e4270a
chore: Bump recast from 0.18.3 to 0.18.5 (#687)
dependabot-preview[bot] Oct 25, 2019
0cd8847
chore: Bump karma from 4.3.0 to 4.4.1 (#698)
dependabot-preview[bot] Oct 25, 2019
07db158
chore: Bump proxy-agent from 3.1.0 to 3.1.1 (#699)
dependabot-preview[bot] Oct 25, 2019
5830114
chore: Bump @types/node from 12.7.11 to 12.11.7 (#708)
dependabot-preview[bot] Oct 25, 2019
efcc0b2
chore: Bump rollup from 1.23.1 to 1.25.2 (#702)
dependabot-preview[bot] Oct 25, 2019
6500a0d
chore: Bump nock from 11.4.0 to 11.6.0 (#709)
dependabot-preview[bot] Oct 25, 2019
475dd2d
feat: static assets (#671)
P0lip Oct 25, 2019
863aa88
feat: casing function
P0lip Oct 28, 2019
76cc460
docs: minor additions to CONTRIBUTING.md. (#710)
Oct 28, 2019
a333c5d
chore: Bump fetch-mock from 7.5.1 to 7.7.0 (#713)
dependabot-preview[bot] Oct 28, 2019
f4272a0
chore: Bump rollup from 1.25.2 to 1.26.0 (#714)
dependabot-preview[bot] Oct 28, 2019
41f74f0
Merge branch 'develop' into feat/casing
Oct 28, 2019
bf69b5e
chore: remove addRules and addFunctions (#711)
P0lip Oct 29, 2019
a572939
chore: Bump rollup-plugin-typescript2 from 0.24.3 to 0.25.1 (#716)
dependabot-preview[bot] Oct 29, 2019
7ee7435
chore: Bump @types/jest from 24.0.19 to 24.0.20
dependabot-preview[bot] Oct 29, 2019
1c6aaf7
Merge branch 'develop' into feat/casing
P0lip Oct 29, 2019
8aa5cd4
chore: new @types/jest typings
P0lip Oct 29, 2019
aee0fa6
Merge pull request #715 from stoplightio/dependabot/npm_and_yarn/type…
P0lip Oct 29, 2019
1e5ee1c
Merge branch 'develop' into feat/casing
P0lip Oct 29, 2019
161cc70
chore: Bump @types/node from 12.11.7 to 12.12.1 (#720)
dependabot-preview[bot] Oct 30, 2019
71952cf
chore: Bump @stoplight/json from 3.1.2 to 3.2.0 (#721)
dependabot-preview[bot] Oct 30, 2019
cd44da6
chore: Bump @types/jest from 24.0.20 to 24.0.21 (#722)
dependabot-preview[bot] Oct 30, 2019
4c35a11
chore: Bump @types/node from 12.12.1 to 12.12.3 (#724)
dependabot-preview[bot] Oct 31, 2019
ad4908f
feat: rules are recommended by default (#719)
P0lip Oct 31, 2019
3c274b3
chore: Bump rollup from 1.26.0 to 1.26.2 (#729)
dependabot-preview[bot] Nov 3, 2019
bdf2c37
chore: Bump nock from 11.6.0 to 11.7.0 (#728)
dependabot-preview[bot] Nov 3, 2019
fd286ed
chore: Bump @types/node from 12.12.3 to 12.12.5 (#731)
dependabot-preview[bot] Nov 4, 2019
185ace7
chore: Bump @stoplight/json from 3.2.0 to 3.2.1 (#736)
dependabot-preview[bot] Nov 4, 2019
723f39e
feat: support digits
P0lip Nov 4, 2019
6d3fa7f
Merge branch 'develop' into feat/casing
P0lip Nov 4, 2019
2051c3e
chore: Bump fetch-mock from 7.7.0 to 7.7.2 (#733)
dependabot-preview[bot] Nov 5, 2019
f7d03d1
chore: Bump @stoplight/types from 11.1.1 to 11.2.0 (#732)
dependabot-preview[bot] Nov 5, 2019
ccb9d13
chore: Bump rollup from 1.26.2 to 1.26.3 (#734)
dependabot-preview[bot] Nov 5, 2019
2fd49cc
chore: Bump @types/node-fetch from 2.5.2 to 2.5.3 (#735)
dependabot-preview[bot] Nov 6, 2019
85c68c7
chore: Bump tslint from 5.20.0 to 5.20.1 (#741)
dependabot-preview[bot] Nov 6, 2019
f3f3f2d
chore: Bump rollup-plugin-typescript2 from 0.25.1 to 0.25.2 (#745)
dependabot-preview[bot] Nov 6, 2019
386869e
chore: Bump @types/node from 12.12.5 to 12.12.6 (#746)
dependabot-preview[bot] Nov 6, 2019
45a2a59
chore: Bump @types/jest from 24.0.21 to 24.0.22 (#742)
dependabot-preview[bot] Nov 6, 2019
48f10c8
chore: Bump fetch-mock from 7.7.2 to 7.7.3 (#743)
dependabot-preview[bot] Nov 6, 2019
a8fd549
chore: Bump ajv-oai from 1.1.1 to 1.1.2 (#744)
dependabot-preview[bot] Nov 6, 2019
b4bd11f
fix: unixify glob patterns (#740)
P0lip Nov 6, 2019
3cccd2d
Merge branch 'develop' into feat/casing
P0lip Nov 6, 2019
dbc3b5e
feat: disallowDigits option
P0lip Nov 6, 2019
a714874
chore(deps): upgrade to typescript 3.7.2 (#739)
nulltoken Nov 6, 2019
a195989
test: stub fast-glob more properly + extra test (#749)
P0lip Nov 7, 2019
878e09d
docs: update docs/reference/functions.md
P0lip Nov 8, 2019
42c0ad6
docs: move available types to the top
P0lip Nov 8, 2019
ddcdb60
Merge branch 'develop' into feat/casing
P0lip Nov 8, 2019
6983e65
fix: move typescript-json-schema to dev deps (#752)
marbemac Nov 10, 2019
35e85b4
fix(cli): do not return duplicate results (#681)
P0lip Nov 10, 2019
2a01d45
chore: Bump ts-node from 8.4.1 to 8.5.0 (#753)
dependabot-preview[bot] Nov 11, 2019
7ade7e1
chore: Bump rollup from 1.26.4 to 1.26.5 (#756)
dependabot-preview[bot] Nov 11, 2019
150bfcf
Apply suggestions from code review
Nov 12, 2019
ba473f8
Merge branch 'develop' into feat/casing
Nov 12, 2019
502bd1b
Merge pull request #712 from stoplightio/feat/casing
Nov 12, 2019
4464c8a
chore: Bump @types/jest from 24.0.22 to 24.0.23 (#759)
dependabot-preview[bot] Nov 13, 2019
b1a205c
chore: Bump rollup from 1.26.5 to 1.27.0 (#761)
dependabot-preview[bot] Nov 13, 2019
fb147a1
chore: Bump @stoplight/types from 11.2.0 to 11.3.0 (#762)
dependabot-preview[bot] Nov 14, 2019
e02a475
chore: Bump @types/lodash from 4.14.146 to 4.14.147 (#764)
dependabot-preview[bot] Nov 14, 2019
fa9ef25
chore: Bump lint-staged from 9.4.2 to 9.4.3 (#763)
dependabot-preview[bot] Nov 14, 2019
fd66482
chore: test-harness
P0lip Nov 13, 2019
283553e
chore: improve spawning
P0lip Nov 14, 2019
5d9e3e3
chore: support assets
P0lip Nov 14, 2019
418c66d
docs: include {spectral}
P0lip Nov 14, 2019
0208ef1
chore: inline rulesets
P0lip Nov 14, 2019
e5f0cab
chore: minor cleanup
P0lip Nov 14, 2019
851e2aa
markdown error in core functions docs
Nov 15, 2019
95247d4
chore: Bump @stoplight/json-ref-resolver from 3.0.1 to 3.0.2 (#769)
dependabot-preview[bot] Nov 15, 2019
77826f6
chore: Bump ts-node from 8.5.0 to 8.5.2 (#770)
dependabot-preview[bot] Nov 15, 2019
fe6129a
chore: Bump @types/fetch-mock from 7.3.1 to 7.3.2 (#768)
dependabot-preview[bot] Nov 15, 2019
cb21f02
chore: introduce yarn 'clean' script (#774)
nulltoken Nov 17, 2019
535891f
Offset.Earth Badge
Nov 18, 2019
fc31752
chore: Bump @types/node from 12.12.7 to 12.12.8 (#776)
dependabot-preview[bot] Nov 18, 2019
29612f9
chore: Bump rollup from 1.27.0 to 1.27.1 (#782)
dependabot-preview[bot] Nov 18, 2019
b7200be
Merge pull request #767 from stoplightio/fix-functions-md
Nov 18, 2019
f2a6698
Merge branch 'develop' into chore/test-harness
Nov 18, 2019
caad331
chore: Bump husky from 3.0.9 to 3.1.0 (#777)
dependabot-preview[bot] Nov 18, 2019
0b5141d
chore: Bump nanoid from 2.1.6 to 2.1.7 (#779)
dependabot-preview[bot] Nov 18, 2019
6725bd8
chore: Bump @stoplight/json-ref-resolver from 3.0.2 to 3.0.3 (#780)
dependabot-preview[bot] Nov 18, 2019
00018b6
chore: Bump @types/lodash from 4.14.147 to 4.14.148 (#781)
dependabot-preview[bot] Nov 18, 2019
8962d7b
Merge branch 'develop' into offset-earth
P0lip Nov 18, 2019
daf966c
chore: Bump @types/lodash from 4.14.148 to 4.14.149 (#785)
dependabot-preview[bot] Nov 19, 2019
66163ed
chore: Bump rollup from 1.27.1 to 1.27.2 (#786)
dependabot-preview[bot] Nov 19, 2019
066b293
chore: Bump @types/node from 12.12.8 to 12.12.9 (#787)
dependabot-preview[bot] Nov 19, 2019
45b1cdf
Merge branch 'develop' into offset-earth
Nov 19, 2019
4bab0f1
Merge pull request #775 from stoplightio/offset-earth
Nov 19, 2019
676cb6a
docs: describe custom resolver usage (#790)
P0lip Nov 20, 2019
e327fcc
chore: extract a result sorting function (#737)
nulltoken Nov 20, 2019
efb7634
fix: inheritance of rule with implicit severity and a few extra tests…
P0lip Nov 20, 2019
1a88252
Merge branch 'develop' into chore/test-harness
Nov 20, 2019
1eaf8ff
Renamed ref-resolvers to json-ref-readers (#793)
karol-maciaszek Nov 20, 2019
cef873a
bug: swap stoplight/path for node path
Nov 20, 2019
a978738
bug: linux binary name missing platform
Nov 20, 2019
6e26ca0
stoplight/path is back and debugging
Nov 20, 2019
99b8a27
Merge pull request #766 from stoplightio/chore/test-harness
Nov 20, 2019
dcccdbc
add automerge
Nov 20, 2019
f71e4f6
Merge develop into fix-binary
github-actions[bot] Nov 20, 2019
d565c46
chore: Bump @types/node from 12.12.9 to 12.12.11 (#791)
dependabot-preview[bot] Nov 20, 2019
0d5b855
Merge branch 'develop' into fix-binary
Nov 20, 2019
f9b91a1
Merge pull request #792 from stoplightio/fix-binary
Nov 20, 2019
e94279c
revert: install.sh download urls
P0lip Nov 20, 2019
53436b1
chore: Bump tslint-config-stoplight from 1.3.0 to 1.4.0 (#765)
dependabot-preview[bot] Nov 20, 2019
ad75710
chore: Bump chalk from 2.4.2 to 3.0.0 (#755)
dependabot-preview[bot] Nov 20, 2019
e9affa0
feat(cli): accept stdin (#758)
P0lip Nov 20, 2019
6d20ac9
chore: Bump strip-ansi from 5.2.0 to 6.0.0 (#754)
dependabot-preview[bot] Nov 20, 2019
515f979
chore(test-harness): rename {spectral} to {bin}
P0lip Nov 20, 2019
b0a3284
chore: Bump yargs from 14.2.0 to 15.0.2 (#784)
dependabot-preview[bot] Nov 20, 2019
44b1850
docs(test-harness): update readme
P0lip Nov 20, 2019
bad7d25
Merge branch 'develop' into chore/test-harness-post-merge
Nov 21, 2019
6a674d5
Merge branch 'develop' into fix/build-install-sh-develop
Nov 21, 2019
0713221
Merge pull request #795 from stoplightio/fix/build-install-sh-develop
github-actions[bot] Nov 21, 2019
6b4e4db
Merge branch 'develop' into chore/test-harness-post-merge
P0lip Nov 21, 2019
1766ec4
Merge pull request #796 from stoplightio/chore/test-harness-post-merge
github-actions[bot] Nov 21, 2019
a249ad4
chore: Bump rollup from 1.27.2 to 1.27.3
dependabot-preview[bot] Nov 21, 2019
3f9dd0e
Merge pull request #800 from stoplightio/dependabot/npm_and_yarn/roll…
github-actions[bot] Nov 21, 2019
6c6d6e3
feat: arrayish given (#799)
P0lip Nov 22, 2019
190d848
feat(cli): implement HTML reporter
P0lip Nov 25, 2019
92b7232
chore: Bump rollup from 1.27.3 to 1.27.5
dependabot-preview[bot] Nov 25, 2019
90daf39
chore: Bump @types/node-fetch from 2.5.3 to 2.5.4
dependabot-preview[bot] Nov 25, 2019
6139f72
Merge pull request #809 from stoplightio/dependabot/npm_and_yarn/roll…
github-actions[bot] Nov 25, 2019
35042b3
Merge develop into dependabot/npm_and_yarn/types/node-fetch-2.5.4
github-actions[bot] Nov 25, 2019
f61ade6
chore: Bump ts-jest from 24.1.0 to 24.2.0
dependabot-preview[bot] Nov 25, 2019
2f04f82
docs: shed more light on custom functions
P0lip Nov 25, 2019
7c48740
Merge branch 'develop' into feat/html-formatter
Nov 25, 2019
f4d03ea
Merge pull request #805 from stoplightio/dependabot/npm_and_yarn/ts-j…
github-actions[bot] Nov 25, 2019
97e3514
Merge develop into dependabot/npm_and_yarn/types/node-fetch-2.5.4
github-actions[bot] Nov 25, 2019
637788e
Merge branch 'develop' into feat/html-formatter
Nov 25, 2019
1b2fd6c
docs: list placeholders
P0lip Nov 25, 2019
f6e3d01
Merge branch 'develop' into docs/custom-functions
Nov 25, 2019
89faf54
Merge pull request #813 from stoplightio/docs/custom-functions
github-actions[bot] Nov 25, 2019
b2f917c
chore: Bump jsonpath-plus from 1.1.0 to 2.0.0 (#808)
dependabot-preview[bot] Nov 25, 2019
a346c26
Merge branch 'develop' into feat/html-formatter
P0lip Nov 25, 2019
13251b4
fix: normalize line endings
P0lip Nov 25, 2019
eea66d4
docs: update API usage
P0lip Nov 26, 2019
6a52a63
Merge pull request #807 from stoplightio/feat/html-formatter
github-actions[bot] Nov 26, 2019
e7a2301
Merge branch 'develop' into docs/api-usage
XVincentX Nov 26, 2019
79efc11
Merge pull request #814 from stoplightio/docs/api-usage
github-actions[bot] Nov 26, 2019
0ccca69
chore: Bump @stoplight/json-ref-resolver from 3.0.3 to 3.0.5
dependabot-preview[bot] Nov 26, 2019
39b8288
Merge pull request #816 from stoplightio/dependabot/npm_and_yarn/stop…
github-actions[bot] Nov 26, 2019
74898ef
feat(cli): implement --resolver flag (#797)
P0lip Nov 27, 2019
0273eb1
chore: Bump lint-staged from 9.4.3 to 9.5.0
dependabot-preview[bot] Nov 27, 2019
fc15f16
Merge pull request #818 from stoplightio/dependabot/npm_and_yarn/lint…
github-actions[bot] Nov 27, 2019
586b195
Merge branch 'develop' into dependabot/npm_and_yarn/types/node-fetch-…
P0lip Nov 27, 2019
2152d06
Merge pull request #812 from stoplightio/dependabot/npm_and_yarn/type…
github-actions[bot] Nov 27, 2019
1dbe98c
chore: Bump @types/node from 12.12.11 to 12.12.14 (#819)
dependabot-preview[bot] Nov 29, 2019
4e83003
chore: Bump ts-node from 8.5.2 to 8.5.4
dependabot-preview[bot] Nov 29, 2019
11fe638
Merge pull request #821 from stoplightio/dependabot/npm_and_yarn/ts-n…
github-actions[bot] Nov 29, 2019
49cb722
fix: print falsy value in error messages (#824)
P0lip Dec 1, 2019
32ca14d
chore: Bump fast-glob from 3.1.0 to 3.1.1
dependabot-preview[bot] Dec 2, 2019
4cebc00
Merge pull request #826 from stoplightio/dependabot/npm_and_yarn/fast…
github-actions[bot] Dec 2, 2019
84a8238
feat: drop oas2 and oas3 rulesets (#773)
nulltoken Dec 2, 2019
7580e7f
feat: implement text and teamcity formatters (#825)
memelet Dec 3, 2019
6360534
chore: Bump rollup-plugin-typescript2 from 0.25.2 to 0.25.3
dependabot-preview[bot] Dec 4, 2019
5c636ae
Merge pull request #830 from stoplightio/dependabot/npm_and_yarn/roll…
github-actions[bot] Dec 4, 2019
60b6db7
chore: Bump typescript from 3.7.2 to 3.7.3
dependabot-preview[bot] Dec 4, 2019
26ea8e8
Merge pull request #833 from stoplightio/dependabot/npm_and_yarn/type…
github-actions[bot] Dec 4, 2019
67faa2a
fix: preserve order of properties (#835)
P0lip Dec 4, 2019
676a996
chore: Bump typescript-json-schema from 0.40.0 to 0.41.0
dependabot-preview[bot] Dec 6, 2019
52cf6b3
Merge pull request #838 from stoplightio/dependabot/npm_and_yarn/type…
github-actions[bot] Dec 6, 2019
ae1c9b5
chore: Bump pkg from 4.4.0 to 4.4.1
dependabot-preview[bot] Dec 9, 2019
93b173e
Merge pull request #841 from stoplightio/dependabot/npm_and_yarn/pkg-…
github-actions[bot] Dec 9, 2019
4d14fa0
fix: improve error source detection (#685)
P0lip Dec 10, 2019
a86a163
feat: report invalid YAML mapping keys (#840)
P0lip Dec 10, 2019
9f17f02
fix: absolute paths
P0lip Dec 6, 2019
fbf9679
test: update paths in tests
P0lip Dec 6, 2019
a797ff0
refactor: move getClosestJsonPath
P0lip Dec 10, 2019
96e142f
chore: Bump rollup-plugin-terser from 5.1.2 to 5.1.3
dependabot-preview[bot] Dec 11, 2019
c9017a5
Merge pull request #848 from stoplightio/dependabot/npm_and_yarn/roll…
github-actions[bot] Dec 11, 2019
ee8b7d9
feat: generate scoped path
P0lip Dec 11, 2019
4ccc94c
Merge branch 'develop' into fix/path-result
P0lip Dec 11, 2019
c8bd512
fix: use non-secure version of nanoid (#850)
P0lip Dec 11, 2019
a5c7f1c
Merge branch 'develop' into fix/path-result
P0lip Dec 12, 2019
fa39945
feat: missingPropertyPath
P0lip Dec 12, 2019
867e8e2
chore: Bump rollup from 1.27.5 to 1.27.13
dependabot-preview[bot] Dec 15, 2019
c5c8480
Merge pull request #855 from stoplightio/dependabot/npm_and_yarn/roll…
github-actions[bot] Dec 15, 2019
e6f040a
feat: dedupe results by unique fingerprint
marbemac Dec 16, 2019
35053b5
test: fix them
marbemac Dec 16, 2019
b780e7f
docs: document computeFingerprint option
marbemac Dec 16, 2019
eda58fd
chore: Bump dependency-graph from 0.8.0 to 0.8.1
dependabot-preview[bot] Dec 16, 2019
685aca5
Merge pull request #832 from stoplightio/dependabot/npm_and_yarn/depe…
github-actions[bot] Dec 16, 2019
a7aa2e6
chore: Bump nanoid from 2.1.7 to 2.1.8
dependabot-preview[bot] Dec 16, 2019
bfff5a6
Merge pull request #857 from stoplightio/dependabot/npm_and_yarn/nano…
github-actions[bot] Dec 16, 2019
c645d18
feat: report unrecognized formats (#798)
P0lip Dec 16, 2019
8e54f26
chore: Bump pkg from 4.4.1 to 4.4.2
dependabot-preview[bot] Dec 17, 2019
bb4030b
Merge pull request #858 from stoplightio/dependabot/npm_and_yarn/pkg-…
github-actions[bot] Dec 17, 2019
1629825
build: disable auto-merge for dependabot
P0lip Dec 18, 2019
fce63fd
Merge branch 'develop' into build/automerge-dependabot
P0lip Dec 18, 2019
4884305
Merge pull request #861 from stoplightio/build/automerge-dependabot
Dec 18, 2019
375697a
chore: Bump @types/jest from 24.0.23 to 24.0.24
dependabot-preview[bot] Dec 18, 2019
9af43fe
Merge pull request #863 from stoplightio/dependabot/npm_and_yarn/type…
github-actions[bot] Dec 18, 2019
f93c84f
revert: parts of fa3994
P0lip Dec 18, 2019
7d82f0d
Merge branch 'develop' into fix/path-result
P0lip Dec 18, 2019
f6ee8ba
style: new line
P0lip Dec 18, 2019
a4f0759
build: improve Dependabot integration (#862)
P0lip Dec 18, 2019
8f14d4c
Merge branch 'develop' into fix/path-result
P0lip Dec 19, 2019
70e5491
Merge branch 'fix/path-result' into fix/improve-results
marbemac Dec 19, 2019
22301f4
Merge pull request #839 from stoplightio/fix/path-result
github-actions[bot] Dec 19, 2019
df2db68
chore: consolidate deduplicateResults
marbemac Dec 19, 2019
26faff0
Merge branch 'develop' into fix/improve-results
P0lip Dec 19, 2019
e3ffa7a
chore: move sortResults and update tests
P0lip Dec 19, 2019
3f2c731
Update src/utils/prepareResults.ts
P0lip Dec 20, 2019
334bf49
chore: PR feedback
P0lip Dec 20, 2019
952ccfe
Merge pull request #856 from stoplightio/fix/improve-results
github-actions[bot] Dec 20, 2019
5db4259
feat: switch default from warn to error
Dec 20, 2019
5567079
Merge branch 'develop' into error-for-errors
Dec 21, 2019
827b713
Merge pull request #869 from stoplightio/error-for-errors
Dec 22, 2019
6060f8f
test: warn -> error (#873)
P0lip Dec 23, 2019
49f98ea
chore(deps-dev): bump rollup from 1.27.13 to 1.27.14 (#874)
dependabot-preview[bot] Dec 23, 2019
a0a72d0
chore(deps-dev): bump typescript from 3.7.3 to 3.7.4 (#871)
dependabot-preview[bot] Dec 23, 2019
8b3f28d
chore(deps-dev): bump xml2js from 0.4.22 to 0.4.23 (#872)
dependabot-preview[bot] Dec 23, 2019
3824df4
feat: consistent paths in messages (#867)
P0lip Dec 23, 2019
023b2d3
docs: 5.0 migration guide
P0lip Dec 23, 2019
ee196e2
Merge remote-tracking branch 'origin/master' into release/5.0
P0lip Dec 23, 2019
2f5a9ff
docs: 5.0 changelog
P0lip Dec 17, 2019
69ae23b
build: perist binaries to workspace
P0lip Dec 24, 2019
7c5a9c0
fix: proper sources for ref resolving errors
P0lip Dec 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version: 2.1

orbs:
stoplight: stoplight/[email protected]

commands:
cached-dependencies:
steps:
Expand Down Expand Up @@ -64,12 +67,6 @@ jobs:
steps:
- install-and-test

test-node-8:
docker:
- image: circleci/node:8-browsers
steps:
- install-and-test

release:
docker:
- image: circleci/node:10
Expand All @@ -88,11 +85,12 @@ jobs:
else
npm publish
fi
- run: yarn build.binary
- run: npx pkg . --targets linux,macos --out-path ./binaries
- persist_to_workspace:
root: ./
paths:
- binaries

upload_artifacts:
docker:
- image: circleci/golang:1-stretch
Expand All @@ -109,10 +107,9 @@ jobs:
workflows:
commit:
jobs:
- test-node-latest
# - test-node-latest TODO bring it back when circle supports node-13
- test-node-12
- test-node-10
- test-node-8
release:
jobs:
- release:
Expand All @@ -129,3 +126,11 @@ workflows:
only: /^v.*/
requires:
- release
- stoplight/analyze:
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
requires:
- release
35 changes: 35 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
version: 1
update_configs:
- package_manager: "javascript"
directory: "/"
update_schedule: "live"
version_requirement_updates: increase_versions

commit_message:
prefix: "fix"
include_scope: true

allowed_updates:
- match:
dependency_name: "@stoplight/*" # match all Stoplight deps, regardless of type
update_type: "all"
- match:
dependency_type: "production"
update_type: "all"
- match:
dependency_type: "development"
update_type: "security"

- package_manager: "javascript"
directory: "/"
update_schedule: "weekly" # we do not need to check for devDependencies updates on a daily basis
version_requirement_updates: increase_versions

commit_message:
prefix: "chore"
include_scope: true

allowed_updates:
- match:
dependency_type: "development"
update_type: "all"
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8

[*.{ts,js,yaml,scenario,md}]
indent_style = space
indent_size = 2

[*.{ts,js}]
trim_trailing_whitespace = true
insert_final_newline = true
1 change: 1 addition & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: automerge
if: github.actor != 'dependabot-preview[bot]' && github.actor != 'dependabot[bot]'
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
16 changes: 16 additions & 0 deletions .github/workflows/markdown-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Markdown Links

on:
pull_request:
branches:
- master
- develop

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- uses: gaurav-nelson/github-action-markdown-link-check@master
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/binaries
/rulesets
/src/__tests__/__fixtures__/oas-functions.json
/__karma__/__fixtures__/
/test-harness/tmp/

# testing
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.15.3
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.0.0] - 2019-12-24

### Features
- Alphabetical rule function now supports numeric keys [#730](https://github.com/stoplightio/spectral/issues/730)
- Non-JSON-ish YAML mapping keys are reported [#726](https://github.com/stoplightio/spectral/issues/726)
- CLI: new formatter - text [#822](https://github.com/stoplightio/spectral/issues/822)
- CLI: new formatter - teamcity [#823](https://github.com/stoplightio/spectral/issues/823)
- CLI: new formatter - HTML [#389](https://github.com/stoplightio/spectral/issues/389)
- CLI: custom resolver can be provided leveraging --resolver flag [#717](https://github.com/stoplightio/spectral/issues/717)
- CLI: input can be provided via STDIN [#757](https://github.com/stoplightio/spectral/issues/757)
- Implement ignoreUnsupportedFormats to make it easier to detect unrecognized formats [#678](https://github.com/stoplightio/spectral/issues/678)
- Rule's Given can be an array now [#799](https://github.com/stoplightio/spectral/pull/799)
- Casing built-in function is added [#564](https://github.com/stoplightio/spectral/issues/564)
- New oas rule - `operation-tag-defined` [#704](https://github.com/stoplightio/spectral/pull/704)

### Changed
- BREAKING: The oas2 and oas3 rulesets have been merged into a single oas ruleset [#773](https://github.com/stoplightio/spectral/pull/773)
- BREAKING: Deprecated Spectral#addRules and Spectral#addFunctions have been removed [#561](https://github.com/stoplightio/spectral/issues/561)
- BREAKING: Some oas rules, such as `example-value-or-externalValue` and `openapi-tags`, are now included in the recommended rulset [#725](https://github.com/stoplightio/spectral/issues/725) [#706](https://github.com/stoplightio/spectral/pull/706)
- BREAKING: The `model-description` and `operation-summary-formatted` rules have been removed [#725](https://github.com/stoplightio/spectral/issues/725)
- BREAKING: The `when` rule property has been removed [#585](https://github.com/stoplightio/spectral/issues/585)
- BREAKING: Rules are set to recommended by default [#719](https://github.com/stoplightio/spectral/pull/719)
- Improved error source detection [#685](https://github.com/stoplightio/spectral/pull/685)
- Error paths point at unresolved document [#839](https://github.com/stoplightio/spectral/pull/839)
- Validation messages contain more consistent error paths [#867](https://github.com/stoplightio/spectral/pull/867)
- CLI: Default `--fail-severity` is now `error`, so getting a `warn`, `info` or a `hint` will not return a exit status code [#706](https://github.com/stoplightio/spectral/pull/706)
- Rulesets no longer require a `rules` property [#652](https://github.com/stoplightio/spectral/pull/652)

### Fixed
- Circular remote references with JSON pointers are resolved correctly [json-ref-resolver#141](https://github.com/stoplightio/json-ref-resolver/pull/141)
- Local root JSON pointers are resolved correctly [json-ref-resolver#146](https://github.com/stoplightio/json-ref-resolver/pull/146)
- Invalid JSON pointers are reported as errors now [json-ref-resolver#140](https://github.com/stoplightio/json-ref-resolver/pull/140) and [json-ref-resolver#147](https://github.com/stoplightio/json-ref-resolver/pull/147)
- Unixify glob patterns under Windows [#679](https://github.com/stoplightio/spectral/issues/679)
- Improved duplicate keys detection [#751](https://github.com/stoplightio/spectral/issues/751)
- Spectral should be usable in browsers with no crypto module available [#846](https://github.com/stoplightio/spectral/pull/846)
- Falsy values are printed in validation messages [#824](https://github.com/stoplightio/spectral/pull/824)
- Validation results are no longer duplicate [#680](https://github.com/stoplightio/spectral/issues/680), [#737](https://github.com/stoplightio/spectral/pull/737) and [#856](https://github.com/stoplightio/spectral/pull/856)

## [4.2.0] - 2019-10-08

### Features
Expand Down
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ Yarn is a package manager for your code, similar to npm. While you can use npm t
5. Build Spectral: `yarn build`
6. Run Spectral from your local installation: `node dist/cli/index.js lint [openapi_spec_file]`
7. Create a new branch for your work: `git checkout -b [name_of_your_new_branch]`
8. Make changes, add tests, and then run the tests: `yarn test.prod`
8. Make changes, add tests, and then run the tests: `yarn test.prod` and `yarn test.harness`
9. Update the documentation if appropriate. For example, if you added a new rule to an OpenAPI ruleset,
add a description of the rule in `docs/reference/openapi-rules.md`.

Now, you are ready to commit & push your changes, and make a pull request to the Spectral repo! 😃

Expand All @@ -33,7 +35,7 @@ If this is your first Pull Request on GitHub, here's some [help](https://egghead

## To run tests

We run tests in the two envirnoments that Spectral supports - the browser, and node.js. Browser tests are run in a headless Chrome browser via the Karma test runner, while node.js tests are run via the Jest test runner.
We run tests in the two environments that Spectral supports - the browser, and node.js. Browser tests are run in a headless Chrome browser via the Karma test runner, while node.js tests are run via the Jest test runner.

Tests should usually be written for both environments, but there are valid cases when you need to write separate tests for each test runner. To do so, just create a file with `*.karma.test.ts` suffix or `*.jest.test.ts`. A good example of Jest only tests are the tests covering Spectral's CLI functionality - something that obviously is not relevant to the browser context.

Expand Down Expand Up @@ -61,6 +63,12 @@ Running a specific test:
yarn test src/cli/commands/__tests__/lint.test.ts
```

Running the harness tests (these must pass or the PR merge will be blocked):

```bash
yarn test.harness
```

## Creating an issue

We want to keep issues in this repo focused on bug reports and feature requests.
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
![Spectral logo](img/spectral-banner.png)

[![Test Coverage](https://api.codeclimate.com/v1/badges/1aa53502913a428f40ac/test_coverage)](https://codeclimate.com/github/stoplightio/spectral/test_coverage)
[![Maintainability](https://api.codeclimate.com/v1/badges/1aa53502913a428f40ac/maintainability)](https://codeclimate.com/github/stoplightio/spectral/maintainability)
[![Build Status](https://dev.azure.com/vncz/vncz/_apis/build/status/stoplightio.spectral?branchName=develop)](https://dev.azure.com/vncz/vncz/_build/latest?definitionId=4&branchName=develop)
[![Buy us a tree](https://img.shields.io/badge/Buy%20us%20a%20tree-%F0%9F%8C%B3-lightgreen)](https://offset.earth/stoplightinc)
[![CircleCI](https://circleci.com/gh/stoplightio/spectral.svg?style=svg)](https://circleci.com/gh/stoplightio/spectral)

A flexible JSON linter with out of the box support for OpenAPI v2 and v3.
Expand Down Expand Up @@ -79,6 +77,7 @@ If you are using Spectral in your project and want to be listed in the examples
- [Mike Ralphson](https://github.com/MikeRalphson) for kicking off the Spectral CLI and his work on Speccy
- [Jamund Ferguson](https://github.com/xjamundx) for JUnit formatter
- [Sindre Sorhus](https://github.com/sindresorhus) for Stylish formatter
- Julian Laval for HTML formatter

## Support

Expand Down
60 changes: 41 additions & 19 deletions docs/getting-started/rulesets.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ rules:
function: truthy
```

Spectral has a built-in set of functions such as `truthy` or `pattern`, which you can reference in your rules.
The example above adds a single rule that checks that tags objects have a description property defined.
Since v5.0, each rule is recommended by default. Prior to that the default was to be not recommended. It is best to be explicit and set `recommended: true` or `recommended: false` if a ruleset is likely to be used across multiple versions.

Running `spectral lint` on the following object with the ruleset above will result in an error being reported, since the tag does not have a description:

Expand Down Expand Up @@ -76,9 +78,8 @@ Specifying the format is optional, so you can completely ignore this if all the

```yaml
rules:
api-servers:
oas3-api-servers:
description: "OpenAPI `servers` must be present and non-empty array."
recommended: true
formats: ["oas3"]
given: "$"
then:
Expand All @@ -99,7 +100,7 @@ Alternatively, formats can be specified at the ruleset level:
```yaml
formats: ["oas3"]
rules:
api-servers:
oas3-api-servers:
description: "OpenAPI `servers` must be present and non-empty array."
recommended: true
given: "$"
Expand All @@ -118,9 +119,15 @@ Now all the rules in this ruleset will only be applied if the specified format i

Custom formats can be registered via the [JS API](../guides/javascript.md), but the CLI is limited to using the predefined ones.

## Given

The `given` keyword is, besides `then`, the only required property on each rule definition.
It can be any valid JSONPath expression or an array of JSONPath expressions.
[JSONPath Online Evaluator](http://jsonpath.com/) is a helpful tool to determine what `given` path you want.

## Severity

The `severity` keyword is optional and can be `error`, `warn`, `info`, or `hint`.
The `severity` keyword is optional and can be `error`, `warn`, `info`, or `hint`. The default value is `warn`.

## Then

Expand Down Expand Up @@ -155,12 +162,10 @@ responses:

## Extending rules

Rulesets can extend other rulesets. For example, Spectral comes with two built in rulesets - one for OpenAPI v2 (`spectral:oas2`), and one for OpenAPI v3 (`spectral:oas3`).

Use the `extends` property in your ruleset file to build upon or customize other rulesets.
Rulesets can extend other rulesets using the `extends` property. This can be used to build upon or customize other rulesets.

```yaml
extends: spectral:oas2
extends: spectral:oas
rules:
my-rule-name:
description: Tags must have a description.
Expand All @@ -185,45 +190,62 @@ extends:
Sometimes you might want to apply specific rules from another ruleset. Use the `extends` property, and pass `off` as the second argument in order to add the rules from another ruleset, but disable them all by default. This allows you to pick and choose which rules you would like to enable.

```yaml
extends: [[spectral:oas2, off]]
extends: [[spectral:oas, off]]
rules:
# This rule is defined in the spectral:oas2 ruleset. We're passing `true` to turn it on and inherit the severity defined in the spectral:oas2 ruleset.
# This rule is defined in the spectral:oas ruleset. We're passing `true` to turn it on and inherit the severity defined in the spectral:oas ruleset.
operation-operationId-unique: true
```

The example above will run the single rule that we enabled, since we passed `off` to disable all rules by default when extending the `spectral:oas2` ruleset.
The example above will run the single rule that we enabled, since we passed `off` to disable all rules by default when extending the `spectral:oas` ruleset.

## Disabling rules

This example shows the opposite of the "Enabling Specific rules" example. Sometimes you might want to enable all rules by default, and disable a few.

```yaml
extends: [[spectral:oas2, all]]
extends: [[spectral:oas, all]]
rules:
operation-operationId-unique: false
```

The example above will run all of the rules defined in the `spectral:oas2` ruleset (rather than the default behavior that runs only the recommended ones), with one exceptions - we turned `operation-operationId-unique` off.
The example above will run all of the rules defined in the `spectral:oas` ruleset (rather than the default behavior that runs only the recommended ones), with one exceptions - we turned `operation-operationId-unique` off.

The current recommended rules are marked with the property `recommended: true` in their respective rulesets:
- [Rules relevant to OpenAPI v2 and v3](../reference/openapi-rules.md)

- [Rules relevant to both OpenAPI v2 and v3](https://github.com/stoplightio/spectral/tree/master/src/rulesets/oas/index.json)
- [Rules specific to only OpenAPI v2](https://github.com/stoplightio/spectral/tree/master/src/rulesets/oas2/index.json)
- [Rules specific to only OpenAPI v3](https://github.com/stoplightio/spectral/tree/master/src/rulesets/oas3/index.json)

## Changing rule severity

```yaml
extends: spectral:oas2
extends: spectral:oas
rules:
operation-2xx-response: warn
```

The example above will run the recommended rules from the `spectral:oas2` ruleset, but report `operation-2xx-response` as a warning rather than as an error (as is the default behavior in the `spectral:oas2` ruleset).
The example above will run the recommended rules from the `spectral:oas` ruleset, but report `operation-2xx-response` as a warning rather than as an error (as is the default behavior in the `spectral:oas` ruleset).

Available severity levels are `error`, `warn`, `info`, `hint`, and `off`.

## Enriching rule messages

To help you create meaningful error messages, Spectral comes with a couple of placeholders that are evaluated at runtime.

- {{error}} - the error returned by function
- {{description}} - the description set on the rule
- {{path}} - the whole error path
- {{property}} - the last segment of error path
- {{value}} - the linted value

### Examples

```yaml
message: "{{error}}" # will output the message generated by then.function

message: "The value of '{{property}}' property must equal 'foo'"

message: "{{value}} is greater than 0"

message: "{{path}} cannot point at remote reference"
```
## Creating custom functions

Learn more about [custom functions](../guides/custom-functions.md).
Loading