File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,24 @@ It's also possible to set it to `warn` or `info`.
69
69
70
70
The `extends` field is automatically added (or appended to) by the linter script to inject the iSP ruleset into your config.
71
71
72
+ # ## Local Development
73
+
74
+ 1. Install `node 13.14.0` locally.
75
+ 2. Run `npm run build` to compile the `isp-functions`.
76
+ 3. Run `node ./entrypoint.js <PATH_TO_OPENAPI_SPEC>` to run the linter.
77
+
78
+ The `build` command may need to be re-run to pick up changes made to some of the `isp-functions`.
79
+
80
+ # ### Tests
81
+
82
+ ` ` ` sh
83
+ # Compile the isp-functions
84
+ npm run build
85
+
86
+ # Run test
87
+ npm run test
88
+ ` ` `
89
+
72
90
# # License
73
91
74
92
Copyright © 2020 iStreamPlanet Co., LLC
Original file line number Diff line number Diff line change @@ -66,3 +66,29 @@ paths:
66
66
responses :
67
67
' 204 ' :
68
68
description : Response description
69
+ /foos/{fooId}/bars/{barId}/preview/watch :
70
+ get :
71
+ summary : Test operation
72
+ description : Test operation description
73
+ operationId : test-preview
74
+ tags :
75
+ - Test
76
+ parameters :
77
+ - name : fooId
78
+ in : path
79
+ required : true
80
+ description : some parameter
81
+ schema :
82
+ type : string
83
+ pattern : /[a-z]+/
84
+ - name : barId
85
+ in : path
86
+ required : true
87
+ description : some parameter
88
+ schema :
89
+ type : string
90
+ pattern : /[a-z]+/
91
+ responses :
92
+ ' 204 ' :
93
+ description : Response description
94
+
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ module.exports = targetValue => {
29
29
// Split into path pieces ignoring blank/empty ones and params.
30
30
let pieces = targetValue . split ( '/' ) . filter ( i => ! ! i ) ;
31
31
32
- if ( ( pieces . length === 1 && pieces [ 0 ] === 'search' ) || pieces [ 0 ] === 'me' || pieces [ 0 ] === 'cust' ) {
32
+ if ( ( pieces . length === 1 && pieces [ 0 ] === 'search' ) || pieces [ 0 ] === 'me' || pieces [ 0 ] === 'cust' || ( pieces . length === 6 && pieces [ 4 ] === 'preview' ) ) {
33
33
// Top-level exceptions. Skip.
34
34
return ;
35
35
}
You can’t perform that action at this time.
0 commit comments