Skip to content

Commit e7c129d

Browse files
committed
feat: add another specialized exception to noun
1 parent a0350a2 commit e7c129d

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

fixtures/lint/noun-pass.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,29 @@ paths:
6666
responses:
6767
'204':
6868
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+

isp-functions/noun-deps.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module.exports = targetValue => {
2929
// Split into path pieces ignoring blank/empty ones and params.
3030
let pieces = targetValue.split('/').filter(i => !!i);
3131

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') {
3333
// Top-level exceptions. Skip.
3434
return;
3535
}

0 commit comments

Comments
 (0)