File tree 3 files changed +23
-0
lines changed
packages/apidom-ls/src/config
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ enum ApilintCodes {
68
68
SCHEMA_NULLABLE_NOT_RECOMMENDED ,
69
69
SCHEMA_MISSING_CORE_FIELDS ,
70
70
SCHEMA_NULLABLE ,
71
+ SCHEMA_XML ,
71
72
72
73
DUPLICATE_KEYS = 14999 ,
73
74
NOT_ALLOWED_FIELDS = 15000 ,
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import exclusiveMaximumPatternLint from './exclusive-maximum--pattern';
27
27
import exclusiveMaximumTypeLint from './exclusive-maximum--type' ;
28
28
import exclusiveMinimumPatternLint from './exclusive-minimum--pattern' ;
29
29
import exclusiveMinimumTypeLint from './exclusive-minimum--type' ;
30
+ import xmlTypeLint from './xml--type' ;
30
31
import externalDocsTypeLint from './external-docs--type' ;
31
32
import formatTypeLint from './format--type' ;
32
33
import ifNonThenLint from './if--non-then' ;
@@ -111,6 +112,7 @@ const schemaLints = [
111
112
exclusiveMaximumTypeLint ,
112
113
exclusiveMinimumPatternLint ,
113
114
exclusiveMinimumTypeLint ,
115
+ xmlTypeLint ,
114
116
externalDocsTypeLint ,
115
117
formatTypeLint ,
116
118
ifNonThenLint ,
Original file line number Diff line number Diff line change
1
+ import { DiagnosticSeverity } from 'vscode-languageserver-types' ;
2
+
3
+ import ApilintCodes from '../../../codes' ;
4
+ import { LinterMeta } from '../../../../apidom-language-types' ;
5
+ import { OpenAPI3 } from '../../../openapi/target-specs' ;
6
+
7
+ const xmlTypeLint : LinterMeta = {
8
+ code : ApilintCodes . SCHEMA_XML ,
9
+ source : 'apilint' ,
10
+ message : 'xml must be an object' ,
11
+ severity : DiagnosticSeverity . Error ,
12
+ linterFunction : 'apilintElementOrClass' ,
13
+ linterParams : [ 'xml' ] ,
14
+ marker : 'value' ,
15
+ target : 'xml' ,
16
+ data : { } ,
17
+ targetSpecs : OpenAPI3 ,
18
+ } ;
19
+
20
+ export default xmlTypeLint ;
You can’t perform that action at this time.
0 commit comments