File tree 5 files changed +42
-0
lines changed
packages/apidom-ls/src/config 5 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -639,6 +639,10 @@ enum ApilintCodes {
639
639
OPENAPI3_O_SERVER_VARIABLE_FIELD_DEFAULT_REQUIRED ,
640
640
OPENAPI3_O_SERVER_VARIABLE_FIELD_DESCRIPTION_TYPE = 5080300 ,
641
641
642
+ OPENAPI_3_0_PATHS = 5090000 ,
643
+ OPENAPI_3_0_PATHS_KEYS_PATTERN ,
644
+ OPENAPI_3_0_PATHS_VALUES_PATTERN ,
645
+
642
646
OPENAPI3_1 = 7000000 ,
643
647
644
648
OPENAPI3_1_OPENAPI_VALUE_PATTERN_3_1_0 = 7000100 ,
Original file line number Diff line number Diff line change
1
+ import keysPatternLint from './keys--pattern' ;
2
+ import valuesTypeLint from './values--type' ;
3
+
4
+ const lints = [ keysPatternLint , valuesTypeLint ] ;
5
+
6
+ export default lints ;
Original file line number Diff line number Diff line change
1
+ import ApilintCodes from '../../../codes' ;
2
+ import { LinterMeta } from '../../../../apidom-language-types' ;
3
+
4
+ const keysPatternLint : LinterMeta = {
5
+ code : ApilintCodes . OPENAPI_3_0_PATHS_KEYS_PATTERN ,
6
+ source : 'apilint' ,
7
+ message : 'Paths Object keys must match the regular expression: `^/.*$`' ,
8
+ severity : 1 ,
9
+ linterFunction : 'apilintMembersKeysRegex' ,
10
+ linterParams : [ '^\\/.*$' ] ,
11
+ marker : 'key' ,
12
+ data : { } ,
13
+ } ;
14
+
15
+ export default keysPatternLint ;
Original file line number Diff line number Diff line change
1
+ import ApilintCodes from '../../../codes' ;
2
+ import { LinterMeta } from '../../../../apidom-language-types' ;
3
+
4
+ const valuesTypeLint : LinterMeta = {
5
+ code : ApilintCodes . OPENAPI_3_0_PATHS_VALUES_PATTERN ,
6
+ source : 'apilint' ,
7
+ message : 'Paths Object values must be of Path Item Object shape' ,
8
+ severity : 1 ,
9
+ linterFunction : 'apilintChildrenOfElementsOrClasses' ,
10
+ linterParams : [ [ 'pathItem' ] ] ,
11
+ marker : 'key' ,
12
+ data : { } ,
13
+ } ;
14
+
15
+ export default valuesTypeLint ;
Original file line number Diff line number Diff line change
1
+ import lint from './lint' ;
1
2
import documentation from './documentation' ;
2
3
import { FormatMeta } from '../../../apidom-language-types' ;
3
4
4
5
const meta : FormatMeta = {
6
+ lint,
5
7
documentation,
6
8
} ;
7
9
You can’t perform that action at this time.
0 commit comments