Skip to content

Commit

Permalink
feat(ls): add rules for OpenAPI 2.0 Items Object (#3622)
Browse files Browse the repository at this point in the history
Refs #3605
  • Loading branch information
char0n authored Jan 3, 2024
1 parent 23a83b5 commit 3f213b5
Show file tree
Hide file tree
Showing 24 changed files with 1,003 additions and 1 deletion.
17 changes: 17 additions & 0 deletions packages/apidom-ls/src/config/codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,23 @@ enum ApilintCodes {
OPENAPI2_PARAMETER_FIELD_ENUM_TYPE = 3101800,
OPENAPI2_PARAMETER_FIELD_MULTIPLE_OF_TYPE = 3101900,

OPENAPI2_ITEMS = 3110000,
OPENAPI2_ITEMS_FIELD_TYPE_EQUALS = 3110100,
OPENAPI2_ITEMS_FIELD_TYPE_REQUIRED,
OPENAPI2_ITEMS_FIELD_FORMAT_TYPE = 3110200,
OPENAPI2_ITEMS_FIELD_ITEMS_TYPE = 3110300,
OPENAPI2_ITEMS_FIELD_ITEMS_REQUIRED,
OPENAPI2_ITEMS_FIELD_COLLECTION_FORMAT_EQUALS = 3110400,
OPENAPI2_ITEMS_FIELD_MAXIMUM_TYPE = 3110500,
OPENAPI2_ITEMS_FIELD_EXCLUSIVE_MAXIMUM_TYPE = 3110600,
OPENAPI2_ITEMS_FIELD_MINIMUM_TYPE = 3110700,
OPENAPI2_ITEMS_FIELD_EXCLUSIVE_MINIMUM_TYPE = 3110800,
OPENAPI2_ITEMS_FIELD_MAX_LENGTH_TYPE = 3110900,
OPENAPI2_ITEMS_FIELD_MIN_LENGTH_TYPE = 3111000,
OPENAPI2_ITEMS_FIELD_UNIQUE_ITEMS_TYPE = 3111100,
OPENAPI2_ITEMS_FIELD_ENUM_TYPE = 3111200,
OPENAPI2_ITEMS_FIELD_MULTIPLE_OF_TYPE = 3111300,

OPENAPI3_0 = 5000000,

OPENAPI3_0_OPENAPI_VALUE_PATTERN_3_0_0 = 5000100,
Expand Down
2 changes: 2 additions & 0 deletions packages/apidom-ls/src/config/openapi/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import swaggerMeta from './swagger/meta';
import tagMeta from './tag/meta';
import xmlMeta from './xml/meta';
import pathTemplateMeta from './path-template/meta';
import itemsMeta from './items/meta';
import schemaMeta from '../common/schema/meta';
import ApilintCodes from '../codes';

Expand Down Expand Up @@ -83,6 +84,7 @@ export default {
swagger: swaggerMeta,
tag: tagMeta,
xml: xmlMeta,
items: itemsMeta,
schema: schemaMeta,
'path-template': pathTemplateMeta,
};
Loading

0 comments on commit 3f213b5

Please sign in to comment.