Skip to content

Commit

Permalink
Merge pull request #33 from istreamlabs/noun-exception
Browse files Browse the repository at this point in the history
feat: add 'cust' as top level exception for noun
  • Loading branch information
iwong-isp committed Jun 23, 2023
2 parents 1e8e4cc + 11ebd50 commit e351dab
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions fixtures/lint/noun-pass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,28 @@ paths:
responses:
'204':
description: Response description
/cust/{custId}/product/{productId}:
get:
summary: Test operation
description: Test operation description
operationId: test-cust
tags:
- Test
parameters:
- name: custId
in: path
required: true
description: some parameter
schema:
type: string
pattern: /[a-z]+/
- name: productId
in: path
required: true
description: some parameter
schema:
type: string
pattern: /[a-z]+/
responses:
'204':
description: Response description
2 changes: 1 addition & 1 deletion isp-functions/noun-deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = targetValue => {
// Split into path pieces ignoring blank/empty ones and params.
let pieces = targetValue.split('/').filter(i => !!i);

if ((pieces.length === 1 && pieces[0] === 'search') || pieces[0] === 'me') {
if ((pieces.length === 1 && pieces[0] === 'search') || pieces[0] === 'me' || pieces[0] === 'cust') {
// Top-level exceptions. Skip.
return;
}
Expand Down

0 comments on commit e351dab

Please sign in to comment.