-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ls): oas31 lint and completion rules for
- Loading branch information
Showing
6 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/apidom-ls/src/config/openapi/openapi3_1/lint/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import allowedFieldsLint from './allowed-fields'; | ||
import infoRequiredLint from './info--required'; | ||
import jsonSchemaDialectTypeLint from './jsonSchemaDialect--type'; | ||
import jsonSchemaDialectFormatURILint from './jsonSchemaDialect--format-uri'; | ||
import webhooksLint from './webhooks--type'; | ||
|
||
const lints = [allowedFieldsLint, infoRequiredLint, jsonSchemaDialectTypeLint, webhooksLint]; | ||
const lints = [allowedFieldsLint, infoRequiredLint, jsonSchemaDialectFormatURILint, webhooksLint]; | ||
|
||
export default lints; |
15 changes: 15 additions & 0 deletions
15
packages/apidom-ls/src/config/openapi/openapi3_1/lint/jsonSchemaDialect--format-uri.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import ApilintCodes from '../../../codes'; | ||
import { LinterMeta } from '../../../../apidom-language-types'; | ||
|
||
const jsonSchemaDialectFormatURILint: LinterMeta = { | ||
code: ApilintCodes.OPENAPI3_1_OPEN_API_FIELD_JSON_SCHEMA_FORMAT_URI, | ||
source: 'apilint', | ||
message: "'jsonSchemaDialect' value MUST be in the form of a URI.", | ||
severity: 1, | ||
linterFunction: 'apilintValidURI', | ||
marker: 'value', | ||
target: 'jsonSchemaDialect', | ||
data: {}, | ||
}; | ||
|
||
export default jsonSchemaDialectFormatURILint; |
16 changes: 0 additions & 16 deletions
16
packages/apidom-ls/src/config/openapi/openapi3_1/lint/jsonSchemaDialect--type.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import lint from './lint'; | ||
import completion from './completion'; | ||
import documentation from './documentation'; | ||
import lint from './lint'; | ||
import { FormatMeta } from '../../../apidom-language-types'; | ||
|
||
const meta: FormatMeta = { | ||
lint, | ||
completion, | ||
documentation, | ||
lint, | ||
}; | ||
|
||
export default meta; |