diff --git a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/authorization-url--required.ts b/packages/apidom-ls/src/config/openapi/oauth-flow/lint/authorization-url--required.ts deleted file mode 100644 index 526b6fdf8b..0000000000 --- a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/authorization-url--required.ts +++ /dev/null @@ -1,24 +0,0 @@ -import ApilintCodes from '../../../codes'; -import { LinterMeta } from '../../../../apidom-language-types'; - -const authorizationUrlRequiredLint: LinterMeta = { - code: ApilintCodes.OPENAPI3_0_OAUTH_FLOW_FIELD_AUTHORIZATION_URL_REQUIRED, - source: 'apilint', - message: "should always have a 'authorizationUrl'", - severity: 1, - linterFunction: 'hasRequiredField', - linterParams: ['authorizationUrl'], - marker: 'key', - data: { - quickFix: [ - { - message: "add 'authorizationUrl' field", - action: 'addChild', - snippetYaml: 'authorizationUrl: \n ', - snippetJson: '"authorizationUrl": "",\n ', - }, - ], - }, -}; - -export default authorizationUrlRequiredLint; diff --git a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/index.ts b/packages/apidom-ls/src/config/openapi/oauth-flow/lint/index.ts index e7ef22a219..50b3a1c2c0 100644 --- a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/index.ts +++ b/packages/apidom-ls/src/config/openapi/oauth-flow/lint/index.ts @@ -1,20 +1,14 @@ import authorizationUrlFormatURILint from './authorization-url--format-uri'; -import authorizationUrlRequiredLint from './authorization-url--required'; import tokenUrlFormatURILint from './token-url--format-uri'; -import tokenUrlRequiredLint from './token-url--required'; import refreshUrlFormatURILint from './refresh-url--format-uri'; import scopesTypeLint from './scopes--type'; -import scopesRequiredLint from './scopes--required'; import allowedFieldsLint from './allowed-fields'; const lints = [ authorizationUrlFormatURILint, - authorizationUrlRequiredLint, tokenUrlFormatURILint, - tokenUrlRequiredLint, refreshUrlFormatURILint, scopesTypeLint, - scopesRequiredLint, allowedFieldsLint, ]; diff --git a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/scopes--required.ts b/packages/apidom-ls/src/config/openapi/oauth-flow/lint/scopes--required.ts deleted file mode 100644 index b198c48b6e..0000000000 --- a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/scopes--required.ts +++ /dev/null @@ -1,24 +0,0 @@ -import ApilintCodes from '../../../codes'; -import { LinterMeta } from '../../../../apidom-language-types'; - -const scopesRequiredLint: LinterMeta = { - code: ApilintCodes.OPENAPI3_0_OAUTH_FLOW_FIELD_SCOPES_REQUIRED, - source: 'apilint', - message: "should always have a 'scopes'", - severity: 1, - linterFunction: 'hasRequiredField', - linterParams: ['scopes'], - marker: 'key', - data: { - quickFix: [ - { - message: "add 'scopes' field", - action: 'addChild', - snippetYaml: 'scopes: \n ', - snippetJson: '"scopes": {},\n ', - }, - ], - }, -}; - -export default scopesRequiredLint; diff --git a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/token-url--required.ts b/packages/apidom-ls/src/config/openapi/oauth-flow/lint/token-url--required.ts deleted file mode 100644 index d9191f457b..0000000000 --- a/packages/apidom-ls/src/config/openapi/oauth-flow/lint/token-url--required.ts +++ /dev/null @@ -1,24 +0,0 @@ -import ApilintCodes from '../../../codes'; -import { LinterMeta } from '../../../../apidom-language-types'; - -const tokenUrlRequiredLint: LinterMeta = { - code: ApilintCodes.OPENAPI3_0_OAUTH_FLOW_FIELD_TOKEN_URL_REQUIRED, - source: 'apilint', - message: "should always have a 'tokenUrl'", - severity: 1, - linterFunction: 'hasRequiredField', - linterParams: ['tokenUrl'], - marker: 'key', - data: { - quickFix: [ - { - message: "add 'tokenUrl' field", - action: 'addChild', - snippetYaml: 'tokenUrl: \n ', - snippetJson: '"tokenUrl": "",\n ', - }, - ], - }, -}; - -export default tokenUrlRequiredLint; diff --git a/packages/apidom-ls/src/config/openapi/security-scheme/completion.ts b/packages/apidom-ls/src/config/openapi/security-scheme/completion.ts index c635d71a57..3c9ca8af7c 100644 --- a/packages/apidom-ls/src/config/openapi/security-scheme/completion.ts +++ b/packages/apidom-ls/src/config/openapi/security-scheme/completion.ts @@ -99,7 +99,7 @@ const completion: ApidomCompletionItem[] = [ documentation: { kind: 'markdown', value: - '#### [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauthFlowsObject)\\n\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', + '[OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauthFlowsObject)\n\\\nnApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', }, targetSpecs: [ { namespace: 'openapi', version: '3.0.0' }, diff --git a/packages/apidom-ls/src/config/openapi/security-scheme/documentation.ts b/packages/apidom-ls/src/config/openapi/security-scheme/documentation.ts index d119f050e2..c63afb0c11 100644 --- a/packages/apidom-ls/src/config/openapi/security-scheme/documentation.ts +++ b/packages/apidom-ls/src/config/openapi/security-scheme/documentation.ts @@ -36,7 +36,7 @@ const documentation = [ }, { target: 'flows', - docs: '#### [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauthFlowsObject)\\n\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', + docs: '[OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#oauthFlowsObject)\n\\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', targetSpecs: [ { namespace: 'openapi', version: '3.0.0' }, { namespace: 'openapi', version: '3.0.1' }, @@ -46,7 +46,7 @@ const documentation = [ }, { target: 'flows', - docs: '#### [OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauthFlowsObject)\\n\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', + docs: '[OAuth Flows Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#oauthFlowsObject)\n\\\nApplies to `oauth2`. **REQUIRED**. An object containing configuration information for the flow types supported.', targetSpecs: [{ namespace: 'openapi', version: '3.1.0' }], }, { diff --git a/packages/apidom-ls/src/config/openapi/security-scheme/lint/flows--type.ts b/packages/apidom-ls/src/config/openapi/security-scheme/lint/flows--type.ts index a7f30b9454..8750293216 100644 --- a/packages/apidom-ls/src/config/openapi/security-scheme/lint/flows--type.ts +++ b/packages/apidom-ls/src/config/openapi/security-scheme/lint/flows--type.ts @@ -7,7 +7,7 @@ const flowsTypeLint: LinterMeta = { message: 'flows must be an object', severity: 1, linterFunction: 'apilintElementOrClass', - linterParams: ['flows'], + linterParams: ['oAuthFlows'], marker: 'value', target: 'flows', data: {},