diff --git a/packages/apidom-ns-openapi-2/config/api-extractor/api-extractor.json b/packages/apidom-ns-openapi-2/config/api-extractor/api-extractor.json new file mode 100644 index 0000000000..7de0d99447 --- /dev/null +++ b/packages/apidom-ns-openapi-2/config/api-extractor/api-extractor.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "../../../../api-extractor.json" +} diff --git a/packages/apidom-ns-openapi-2/config/rollup/types.dist.js b/packages/apidom-ns-openapi-2/config/rollup/types.dist.js deleted file mode 100644 index 308fe65359..0000000000 --- a/packages/apidom-ns-openapi-2/config/rollup/types.dist.js +++ /dev/null @@ -1,11 +0,0 @@ -import dts from 'rollup-plugin-dts'; - -const config = [ - { - input: './types/index.d.ts', - output: [{ file: 'types/dist.d.ts', format: 'es' }], - plugins: [dts()], - }, -]; - -export default config; diff --git a/packages/apidom-ns-openapi-2/package.json b/packages/apidom-ns-openapi-2/package.json index ee4acf3dfe..8d288050e4 100644 --- a/packages/apidom-ns-openapi-2/package.json +++ b/packages/apidom-ns-openapi-2/package.json @@ -14,11 +14,11 @@ "unpkg": "./dist/apidom-ns-openapi-2.browser.min.js", "main": "./src/index.cjs", "exports": { - "types": "./types/dist.d.ts", + "types": "./types/apidom-ns-openapi-2.d.ts", "import": "./src/index.mjs", "require": "./src/index.cjs" }, - "types": "./types/dist.d.ts", + "types": "./types/apidom-ns-openapi-2.d.ts", "scripts": { "build": "npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser", "build:es": "cross-env BABEL_ENV=es babel src --out-dir src --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward'", @@ -30,7 +30,7 @@ "test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha", "test:update-snapshots": "cross-env UPDATE_SNAPSHOT=1 mocha", "typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit", - "typescript:declaration": "tsc -p tsconfig.declaration.json && rollup -c config/rollup/types.dist.js", + "typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json 2>&1 | shx grep -v 'Visitor_base'", "prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .", "postpack": "rimraf NOTICE LICENSES" }, @@ -54,7 +54,7 @@ "src/**/*.mjs", "src/**/*.cjs", "dist/", - "types/dist.d.ts", + "types/apidom-ns-openapi-2.d.ts", "LICENSES", "NOTICE", "README.md", diff --git a/packages/apidom-ns-openapi-2/src/elements/Contact.ts b/packages/apidom-ns-openapi-2/src/elements/Contact.ts index 7b7eb26031..68f10a6961 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Contact.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Contact.ts @@ -1,5 +1,8 @@ import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Contact extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Definitions.ts b/packages/apidom-ns-openapi-2/src/elements/Definitions.ts index b80442f800..bdfbfef599 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Definitions.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Definitions.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Definitions extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Example.ts b/packages/apidom-ns-openapi-2/src/elements/Example.ts index adeae4ff5b..62b27ddd6b 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Example.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Example.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Example extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/ExternalDocumentation.ts b/packages/apidom-ns-openapi-2/src/elements/ExternalDocumentation.ts index 6e1644f6be..097b1b3afc 100644 --- a/packages/apidom-ns-openapi-2/src/elements/ExternalDocumentation.ts +++ b/packages/apidom-ns-openapi-2/src/elements/ExternalDocumentation.ts @@ -1,5 +1,8 @@ import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class ExternalDocumentation extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Header.ts b/packages/apidom-ns-openapi-2/src/elements/Header.ts index c228a495b2..de5408f7ab 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Header.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Header.ts @@ -15,6 +15,9 @@ import { } from '@swagger-api/apidom-ns-json-schema-draft-4'; /* eslint-disable class-methods-use-this */ +/** + * @public + */ class Header extends JSONSchemaElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Headers.ts b/packages/apidom-ns-openapi-2/src/elements/Headers.ts index 9b635af130..6b99b6551b 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Headers.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Headers.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Headers extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Info.ts b/packages/apidom-ns-openapi-2/src/elements/Info.ts index 310c02895f..0146ad126c 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Info.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Info.ts @@ -3,6 +3,9 @@ import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/api import ContactElement from './Contact.ts'; import LicenseElement from './License.ts'; +/** + * @public + */ class Info extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Items.ts b/packages/apidom-ns-openapi-2/src/elements/Items.ts index fea7c17bb4..0ef25f8d7a 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Items.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Items.ts @@ -15,6 +15,9 @@ import { } from '@swagger-api/apidom-ns-json-schema-draft-4'; /* eslint-disable class-methods-use-this */ +/** + * @public + */ class Items extends JSONSchemaElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/License.ts b/packages/apidom-ns-openapi-2/src/elements/License.ts index 8f8bae0d2d..29b0aa4b03 100644 --- a/packages/apidom-ns-openapi-2/src/elements/License.ts +++ b/packages/apidom-ns-openapi-2/src/elements/License.ts @@ -1,5 +1,8 @@ import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class License extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Operation.ts b/packages/apidom-ns-openapi-2/src/elements/Operation.ts index 2089a0a3ae..8101e68f62 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Operation.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Operation.ts @@ -10,6 +10,9 @@ import { import ExternalDocumentationElement from './ExternalDocumentation.ts'; import ResponsesElement from './Responses.ts'; +/** + * @public + */ class Operation extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Parameter.ts b/packages/apidom-ns-openapi-2/src/elements/Parameter.ts index 2349f4eb6f..46a38a088f 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Parameter.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Parameter.ts @@ -17,6 +17,9 @@ import { import SchemaElement from './Schema.ts'; /* eslint-disable class-methods-use-this */ +/** + * @public + */ class Parameter extends JSONSchemaElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/ParametersDefinitions.ts b/packages/apidom-ns-openapi-2/src/elements/ParametersDefinitions.ts index 3273cc2d48..256e5854d9 100644 --- a/packages/apidom-ns-openapi-2/src/elements/ParametersDefinitions.ts +++ b/packages/apidom-ns-openapi-2/src/elements/ParametersDefinitions.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class ParametersDefinitions extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/PathItem.ts b/packages/apidom-ns-openapi-2/src/elements/PathItem.ts index 812ec6c63d..11b43ecf13 100644 --- a/packages/apidom-ns-openapi-2/src/elements/PathItem.ts +++ b/packages/apidom-ns-openapi-2/src/elements/PathItem.ts @@ -8,6 +8,9 @@ import { import OperationElement from './Operation.ts'; +/** + * @public + */ class PathItem extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Paths.ts b/packages/apidom-ns-openapi-2/src/elements/Paths.ts index f3bbf33afa..a6f57b484c 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Paths.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Paths.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Paths extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Reference.ts b/packages/apidom-ns-openapi-2/src/elements/Reference.ts index 74826b4196..2d1d7c5e80 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Reference.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Reference.ts @@ -1,5 +1,8 @@ import { StringElement, ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Reference extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Response.ts b/packages/apidom-ns-openapi-2/src/elements/Response.ts index 73f46e2904..a156451dc0 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Response.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Response.ts @@ -4,6 +4,9 @@ import SchemaElement from './Schema.ts'; import HeadersElement from './Headers.ts'; import ExampleElement from './Example.ts'; +/** + * @public + */ class Response extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Responses.ts b/packages/apidom-ns-openapi-2/src/elements/Responses.ts index 9578f0b4af..f92ef0a334 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Responses.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Responses.ts @@ -3,6 +3,9 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; import ResponseElement from './Response.ts'; import ReferenceElement from './Reference.ts'; +/** + * @public + */ class Responses extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/ResponsesDefinitions.ts b/packages/apidom-ns-openapi-2/src/elements/ResponsesDefinitions.ts index 29d0e35355..d412aef72c 100644 --- a/packages/apidom-ns-openapi-2/src/elements/ResponsesDefinitions.ts +++ b/packages/apidom-ns-openapi-2/src/elements/ResponsesDefinitions.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class ResponsesDefinitions extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Schema.ts b/packages/apidom-ns-openapi-2/src/elements/Schema.ts index c1ecbfc0a3..6addfe6ee7 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Schema.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Schema.ts @@ -14,6 +14,9 @@ import { } from '@swagger-api/apidom-ns-json-schema-draft-4'; /* eslint-disable class-methods-use-this */ +/** + * @public + */ class Schema extends JSONSchemaElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Scopes.ts b/packages/apidom-ns-openapi-2/src/elements/Scopes.ts index 129d2f1e0f..5cff52fcad 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Scopes.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Scopes.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class Scopes extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/SecurityDefinitions.ts b/packages/apidom-ns-openapi-2/src/elements/SecurityDefinitions.ts index fc03f2af63..b6abbe2695 100644 --- a/packages/apidom-ns-openapi-2/src/elements/SecurityDefinitions.ts +++ b/packages/apidom-ns-openapi-2/src/elements/SecurityDefinitions.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SecurityDefinitions extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/SecurityRequirement.ts b/packages/apidom-ns-openapi-2/src/elements/SecurityRequirement.ts index 247dadf598..f1626e5b90 100644 --- a/packages/apidom-ns-openapi-2/src/elements/SecurityRequirement.ts +++ b/packages/apidom-ns-openapi-2/src/elements/SecurityRequirement.ts @@ -1,5 +1,8 @@ import { ObjectElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SecurityRequirement extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/SecurityScheme.ts b/packages/apidom-ns-openapi-2/src/elements/SecurityScheme.ts index 95fda61509..6968a24a06 100644 --- a/packages/apidom-ns-openapi-2/src/elements/SecurityScheme.ts +++ b/packages/apidom-ns-openapi-2/src/elements/SecurityScheme.ts @@ -6,6 +6,9 @@ import { Meta, } from '@swagger-api/apidom-core'; +/** + * @public + */ class SecurityScheme extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Swagger.ts b/packages/apidom-ns-openapi-2/src/elements/Swagger.ts index 657dda3d8c..a93e019366 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Swagger.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Swagger.ts @@ -15,6 +15,9 @@ import ResponsesDefinitionsElement from './ResponsesDefinitions.ts'; import SecurityDefinitionsElement from './SecurityDefinitions.ts'; import ExternalDocumentationElement from './ExternalDocumentation.ts'; +/** + * @public + */ class Swagger extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/SwaggerVersion.ts b/packages/apidom-ns-openapi-2/src/elements/SwaggerVersion.ts index 0c4fc2a27c..fc2a7d4440 100644 --- a/packages/apidom-ns-openapi-2/src/elements/SwaggerVersion.ts +++ b/packages/apidom-ns-openapi-2/src/elements/SwaggerVersion.ts @@ -1,5 +1,8 @@ import { StringElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerVersion extends StringElement { constructor(content?: string, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Tag.ts b/packages/apidom-ns-openapi-2/src/elements/Tag.ts index 1c1a2d51a1..e571f9010d 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Tag.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Tag.ts @@ -2,6 +2,9 @@ import { ObjectElement, StringElement, Attributes, Meta } from '@swagger-api/api import ExternalDocumentationElement from './ExternalDocumentation.ts'; +/** + * @public + */ class Tag extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/Xml.ts b/packages/apidom-ns-openapi-2/src/elements/Xml.ts index 267bd2eeff..5a9ddd8577 100644 --- a/packages/apidom-ns-openapi-2/src/elements/Xml.ts +++ b/packages/apidom-ns-openapi-2/src/elements/Xml.ts @@ -6,6 +6,9 @@ import { Meta, } from '@swagger-api/apidom-core'; +/** + * @public + */ class Xml extends ObjectElement { constructor(content?: Record, meta?: Meta, attributes?: Attributes) { super(content, meta, attributes); diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationConsumes.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationConsumes.ts index dc64ab24d4..5295f2a07e 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationConsumes.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationConsumes.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationConsumes extends ArrayElement { static primaryClass = 'operation-consumes'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationParameters.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationParameters.ts index a5e084e1af..a3020e9b14 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationParameters.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationParameters.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationParameters extends ArrayElement { static primaryClass = 'operation-parameters'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationProduces.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationProduces.ts index d68ed100b7..b34bcda32b 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationProduces.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationProduces.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationProduces extends ArrayElement { static primaryClass = 'operation-produces'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationSchemes.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationSchemes.ts index a22853088b..20d5fe023e 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationSchemes.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationSchemes.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationSchemes extends ArrayElement { static primaryClass = 'operation-schemes'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationSecurity.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationSecurity.ts index 4c721004d8..06602bcefa 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationSecurity.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationSecurity.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationSecurity extends ArrayElement { static primaryClass = 'operation-security'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/OperationTags.ts b/packages/apidom-ns-openapi-2/src/elements/nces/OperationTags.ts index 62817c585e..56a619f795 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/OperationTags.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/OperationTags.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class OperationTags extends ArrayElement { static primaryClass = 'operation-tags'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/PathItemParameters.ts b/packages/apidom-ns-openapi-2/src/elements/nces/PathItemParameters.ts index c7cddea47c..9384da09a4 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/PathItemParameters.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/PathItemParameters.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class PathItemParameters extends ArrayElement { static primaryClass = 'path-item-parameters'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerConsumes.ts b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerConsumes.ts index 8e21364d39..22457c30d3 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerConsumes.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerConsumes.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerConsumes extends ArrayElement { static primaryClass = 'swagger-consumes'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerProduces.ts b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerProduces.ts index 9ca78d72c7..7326b96dd9 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerProduces.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerProduces.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerProduces extends ArrayElement { static primaryClass = 'swagger-produces'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSchemes.ts b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSchemes.ts index 29086c6b3b..2251868d4c 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSchemes.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSchemes.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerSchemes extends ArrayElement { static primaryClass = 'swagger-schemes'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSecurity.ts b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSecurity.ts index bb1695fcaa..02293e944c 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSecurity.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerSecurity.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerSecurity extends ArrayElement { static primaryClass = 'swagger-security'; diff --git a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerTags.ts b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerTags.ts index 7bdc0871db..2de4b35906 100644 --- a/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerTags.ts +++ b/packages/apidom-ns-openapi-2/src/elements/nces/SwaggerTags.ts @@ -1,5 +1,8 @@ import { ArrayElement, Attributes, Meta } from '@swagger-api/apidom-core'; +/** + * @public + */ class SwaggerTags extends ArrayElement { static primaryClass = 'swagger-tags'; diff --git a/packages/apidom-ns-openapi-2/src/index.ts b/packages/apidom-ns-openapi-2/src/index.ts index fdd9c72da0..fe75b49126 100644 --- a/packages/apidom-ns-openapi-2/src/index.ts +++ b/packages/apidom-ns-openapi-2/src/index.ts @@ -17,6 +17,7 @@ export { } from '@swagger-api/apidom-ns-json-schema-draft-4'; export { default as mediaTypes, OpenAPIMediaTypes } from './media-types.ts'; +export type { Format } from './media-types.ts'; // eslint-disable-next-line no-restricted-exports export { default } from './namespace.ts'; @@ -57,9 +58,13 @@ export { } from './predicates.ts'; export { isReferenceLikeElement, isSwaggerExtension } from './refractor/predicates.ts'; +export type { ReferenceLikeElement } from './refractor/predicates.ts'; export { default as AlternatingVisitor } from './refractor/visitors/generics/AlternatingVisitor.ts'; -export type { AlternatingVisitorOptions } from './refractor/visitors/generics/AlternatingVisitor.ts'; +export type { + AlternatingVisitorOptions, + Alternator, +} from './refractor/visitors/generics/AlternatingVisitor.ts'; export { default as FixedFieldsVisitor } from './refractor/visitors/generics/FixedFieldsVisitor.ts'; export type { FixedFieldsVisitorOptions } from './refractor/visitors/generics/FixedFieldsVisitor.ts'; export { default as MapVisitor } from './refractor/visitors/generics/MapVisitor.ts'; @@ -198,18 +203,22 @@ export type { export type { default as SchemaAllOfVisitor, AllOfVisitorOptions as SchemaAllOfVisitorOptions, + JSONSchemaAllOfVisitor, } from './refractor/visitors/open-api-2/schema/AllOfVisitor.ts'; export type { default as SchemaItemsVisitor, ItemsVisitorOptions as SchemaItemsVisitorOptions, + JSONSchemaItemsVisitor, } from './refractor/visitors/open-api-2/schema/ItemsVisitor.ts'; export type { default as SchemaPropertiesVisitor, PropertiesVisitorOptions as SchemaPropertiesVisitorOptions, + JSONSchemaPropertiesVisitor, } from './refractor/visitors/open-api-2/schema/PropertiesVisitor.ts'; export type { default as SchemaOrJSONReferenceVisitor, SchemaOrReferenceVisitorOptions as SchemaOrJSONReferenceVisitorOptions, + JSONSchemaOrJSONReferenceVisitor, } from './refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts'; export type { default as ScopesVisitor, @@ -267,6 +276,11 @@ export type { default as SwaggerVersionVisitor, SwaggerVisitorOptions as SwaggerVersionVisitorOptions, } from './refractor/visitors/open-api-2/SwaggerVisitor.ts'; +export type { default as SpecificationExtensionVisitor } from './refractor/visitors/SpecificationExtensionVisitor.ts'; +export type { + default as TagsVisitor, + TagsVisitorOptions, +} from './refractor/visitors/open-api-2/TagsVisitor.ts'; export type { SpecPath } from './refractor/visitors/generics/FixedFieldsVisitor.ts'; diff --git a/packages/apidom-ns-openapi-2/src/media-types.ts b/packages/apidom-ns-openapi-2/src/media-types.ts index 4b3d65da5d..0a99ca6d0d 100644 --- a/packages/apidom-ns-openapi-2/src/media-types.ts +++ b/packages/apidom-ns-openapi-2/src/media-types.ts @@ -1,8 +1,14 @@ import { last } from 'ramda'; import { MediaTypes } from '@swagger-api/apidom-core'; -type Format = 'generic' | 'json' | 'yaml'; +/** + * @public + */ +export type Format = 'generic' | 'json' | 'yaml'; +/** + * @public + */ export class OpenAPIMediaTypes extends MediaTypes { filterByFormat(format: Format = 'generic') { const effectiveFormat = format === 'generic' ? 'openapi;version' : format; @@ -24,6 +30,9 @@ export class OpenAPIMediaTypes extends MediaTypes { } } +/** + * @public + */ const mediaTypes = new OpenAPIMediaTypes( 'application/vnd.oai.openapi;version=2.0', 'application/vnd.oai.openapi+json;version=2.0', diff --git a/packages/apidom-ns-openapi-2/src/namespace.ts b/packages/apidom-ns-openapi-2/src/namespace.ts index 8c3756ac28..9c8f68f4c5 100644 --- a/packages/apidom-ns-openapi-2/src/namespace.ts +++ b/packages/apidom-ns-openapi-2/src/namespace.ts @@ -28,6 +28,9 @@ import SecuritySchemeElement from './elements/SecurityScheme.ts'; import ScopesElement from './elements/Scopes.ts'; import SecurityRequirementElement from './elements/SecurityRequirement.ts'; +/** + * @public + */ const openApi2 = { namespace: (options: NamespacePluginOptions) => { const { base } = options; diff --git a/packages/apidom-ns-openapi-2/src/predicates.ts b/packages/apidom-ns-openapi-2/src/predicates.ts index 4a953e7ca0..e15da4a5c7 100644 --- a/packages/apidom-ns-openapi-2/src/predicates.ts +++ b/packages/apidom-ns-openapi-2/src/predicates.ts @@ -28,6 +28,9 @@ import SecuritySchemeElement from './elements/SecurityScheme.ts'; import SecurityRequirementElement from './elements/SecurityRequirement.ts'; import ScopesElement from './elements/Scopes.ts'; +/** + * @public + */ export const isSwaggerElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SwaggerElement => @@ -38,6 +41,9 @@ export const isSwaggerElement = createPredicate( }, ); +/** + * @public + */ export const isSwaggerVersionElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SwaggerVersionElement => @@ -48,6 +54,9 @@ export const isSwaggerVersionElement = createPredicate( }, ); +/** + * @public + */ export const isInfoElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is InfoElement => @@ -58,6 +67,9 @@ export const isInfoElement = createPredicate( }, ); +/** + * @public + */ export const isLicenseElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is LicenseElement => @@ -68,6 +80,9 @@ export const isLicenseElement = createPredicate( }, ); +/** + * @public + */ export const isContactElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ContactElement => @@ -78,6 +93,9 @@ export const isContactElement = createPredicate( }, ); +/** + * @public + */ export const isPathsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is PathsElement => @@ -88,6 +106,9 @@ export const isPathsElement = createPredicate( }, ); +/** + * @public + */ export const isPathItemElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is PathItemElement => @@ -98,6 +119,9 @@ export const isPathItemElement = createPredicate( }, ); +/** + * @public + */ export const isOperationElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is OperationElement => @@ -108,6 +132,9 @@ export const isOperationElement = createPredicate( }, ); +/** + * @public + */ export const isExternalDocumentationElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ExternalDocumentationElement => @@ -118,6 +145,9 @@ export const isExternalDocumentationElement = createPredicate( }, ); +/** + * @public + */ export const isParameterElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ParameterElement => @@ -128,6 +158,9 @@ export const isParameterElement = createPredicate( }, ); +/** + * @public + */ export const isItemsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ItemsElement => @@ -138,6 +171,9 @@ export const isItemsElement = createPredicate( }, ); +/** + * @public + */ export const isResponsesElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ResponsesElement => @@ -148,6 +184,9 @@ export const isResponsesElement = createPredicate( }, ); +/** + * @public + */ export const isResponseElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ResponseElement => @@ -158,6 +197,9 @@ export const isResponseElement = createPredicate( }, ); +/** + * @public + */ export const isHeadersElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is HeadersElement => @@ -168,6 +210,9 @@ export const isHeadersElement = createPredicate( }, ); +/** + * @public + */ export const isExampleElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ExampleElement => @@ -178,6 +223,9 @@ export const isExampleElement = createPredicate( }, ); +/** + * @public + */ export const isHeaderElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is HeaderElement => @@ -188,6 +236,9 @@ export const isHeaderElement = createPredicate( }, ); +/** + * @public + */ export const isTagElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is TagElement => @@ -198,6 +249,9 @@ export const isTagElement = createPredicate( }, ); +/** + * @public + */ export const isReferenceElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ReferenceElement => @@ -208,6 +262,9 @@ export const isReferenceElement = createPredicate( }, ); +/** + * @public + */ export const isSchemaElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SchemaElement => @@ -218,6 +275,9 @@ export const isSchemaElement = createPredicate( }, ); +/** + * @public + */ export const isXmlElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is XmlElement => @@ -228,6 +288,9 @@ export const isXmlElement = createPredicate( }, ); +/** + * @public + */ export const isResponsesDefinitionsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ResponsesDefinitionsElement => @@ -238,6 +301,9 @@ export const isResponsesDefinitionsElement = createPredicate( }, ); +/** + * @public + */ export const isSecurityDefinitionsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SecurityDefinitionsElement => @@ -248,6 +314,9 @@ export const isSecurityDefinitionsElement = createPredicate( }, ); +/** + * @public + */ export const isDefinitionsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is DefinitionsElement => @@ -258,6 +327,9 @@ export const isDefinitionsElement = createPredicate( }, ); +/** + * @public + */ export const isParametersDefinitionsElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ParametersDefinitionsElement => @@ -268,6 +340,9 @@ export const isParametersDefinitionsElement = createPredicate( }, ); +/** + * @public + */ export const isSecuritySchemeElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SecuritySchemeElement => @@ -278,6 +353,9 @@ export const isSecuritySchemeElement = createPredicate( }, ); +/** + * @public + */ export const isScopesElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is ScopesElement => @@ -288,6 +366,9 @@ export const isScopesElement = createPredicate( }, ); +/** + * @public + */ export const isSecurityRequirementElement = createPredicate( ({ hasBasicElementProps, isElementType, primitiveEq }) => { return (element: unknown): element is SecurityRequirementElement => diff --git a/packages/apidom-ns-openapi-2/src/refractor/index.ts b/packages/apidom-ns-openapi-2/src/refractor/index.ts index e469204bc1..871829344a 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/index.ts @@ -12,6 +12,9 @@ import specification from './specification.ts'; import { keyMap, getNodeType } from '../traversal/visitor.ts'; import createToolbox from './toolbox.ts'; +/** + * @public + */ const refract = ( value: unknown, { specPath = ['visitors', 'document', 'objects', 'Swagger', '$visitor'], plugins = [] } = {}, @@ -39,6 +42,9 @@ const refract = ( }) as T; }; +/** + * @public + */ export const createRefractor = (specPath: string[]) => (value: unknown, options = {}) => diff --git a/packages/apidom-ns-openapi-2/src/refractor/plugins/replace-empty-element.ts b/packages/apidom-ns-openapi-2/src/refractor/plugins/replace-empty-element.ts index 1687656604..fff2684b20 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/plugins/replace-empty-element.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/plugins/replace-empty-element.ts @@ -342,6 +342,9 @@ const findElementFactory = (ancestor: any, keyName: string) => { : keyMapping[keyName]; }; +/** + * @public + */ const plugin = () => () => ({ visitor: { StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]) { diff --git a/packages/apidom-ns-openapi-2/src/refractor/predicates.ts b/packages/apidom-ns-openapi-2/src/refractor/predicates.ts index 35e6445f33..74654747d2 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/predicates.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/predicates.ts @@ -7,14 +7,23 @@ import { isObjectElement, } from '@swagger-api/apidom-core'; +/** + * @public + */ export interface ReferenceLikeElement extends ObjectElement { hasKey: (value: '$ref') => true; } +/** + * @public + */ export const isSwaggerExtension = (element: MemberElement): boolean => { return isStringElement(element.key) && startsWith('x-', toValue(element.key)); }; +/** + * @public + */ export const isReferenceLikeElement = (element: unknown): element is ReferenceLikeElement => { return isObjectElement(element) && element.hasKey('$ref'); }; diff --git a/packages/apidom-ns-openapi-2/src/refractor/specification.ts b/packages/apidom-ns-openapi-2/src/refractor/specification.ts index 5fb0d0a7c0..258c417034 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/specification.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/specification.ts @@ -64,6 +64,9 @@ import SpecificationExtensionVisitor from './visitors/SpecificationExtensionVisi const { fixedFields: jsonSchemaFixedFields } = JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema; +/** + * @public + */ const specification = { visitors: { value: FallbackVisitor, diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/FallbackVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/FallbackVisitor.ts index 2527929475..d7137e74a5 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/FallbackVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/FallbackVisitor.ts @@ -11,6 +11,9 @@ import Visitor, { VisitorOptions } from './Visitor.ts'; export type { VisitorOptions as FallbackVisitorOptions }; +/** + * @public + */ class FallbackVisitor extends Visitor { enter(element: Element) { this.element = cloneDeep(element); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationExtensionVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationExtensionVisitor.ts index 0249b92410..373c30ce3a 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationExtensionVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationExtensionVisitor.ts @@ -4,6 +4,9 @@ import SpecificationVisitor, { SpecificationVisitorOptions } from './Specificati export type { SpecificationVisitorOptions as SpecificationExtensionVisitorOptions }; +/** + * @public + */ class SpecificationExtensionVisitor extends SpecificationVisitor { public declare element: MemberElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationVisitor.ts index 65c3b535bf..926e061ae6 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/SpecificationVisitor.ts @@ -9,11 +9,15 @@ import type specification from '../specification.ts'; /** * This is a base Type for every visitor that does * internal look-ups to retrieve other child visitors. + * @public */ export interface SpecificationVisitorOptions extends VisitorOptions { readonly specObj: typeof specification; } +/** + * @public + */ class SpecificationVisitor extends Visitor { protected readonly specObj: typeof specification; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/Visitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/Visitor.ts index 973c504198..a9b5296e53 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/Visitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/Visitor.ts @@ -1,7 +1,13 @@ import { Element, ObjectElement, hasElementSourceMap, deepmerge } from '@swagger-api/apidom-core'; +/** + * @public + */ export interface VisitorOptions {} +/** + * @public + */ class Visitor { public element!: Element; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/AlternatingVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/AlternatingVisitor.ts index 5cbd2ee7da..343ec61029 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/AlternatingVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/AlternatingVisitor.ts @@ -4,12 +4,21 @@ import { Element, BREAK } from '@swagger-api/apidom-core'; import SpecificationVisitor, { SpecificationVisitorOptions } from '../SpecificationVisitor.ts'; +/** + * @public + */ export type Alternator = { predicate: (element: unknown) => boolean; specPath: string[] }; +/** + * @public + */ export interface AlternatingVisitorOptions extends SpecificationVisitorOptions { readonly alternator?: Alternator[]; } +/** + * @public + */ class AlternatingVisitor extends SpecificationVisitor { protected alternator: Alternator[]; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/FixedFieldsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/FixedFieldsVisitor.ts index 641606ff9a..bc33c3bd8a 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/FixedFieldsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/FixedFieldsVisitor.ts @@ -11,8 +11,14 @@ import { import SpecificationVisitor, { SpecificationVisitorOptions } from '../SpecificationVisitor.ts'; import { isSwaggerExtension } from '../../predicates.ts'; +/** + * @public + */ export type SpecPath = (element: unknown) => T; +/** + * @public + */ export interface FixedFieldsVisitorOptions extends SpecificationVisitorOptions { readonly specPath: SpecPath; readonly ignoredFields?: string[]; @@ -20,6 +26,9 @@ export interface FixedFieldsVisitorOptions extends SpecificationVisitorOptions { readonly specificationExtensionPredicate?: typeof isSwaggerExtension; } +/** + * @public + */ class FixedFieldsVisitor extends SpecificationVisitor { protected specPath: SpecPath; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MapVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MapVisitor.ts index 3bc4c80b5e..def4e58f2e 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MapVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MapVisitor.ts @@ -7,8 +7,14 @@ import PatternedFieldsVisitor, { export type { SpecPath }; +/** + * @public + */ export interface MapVisitorOptions extends PatternedFieldsVisitorOptions {} +/** + * @public + */ class MapVisitor extends PatternedFieldsVisitor { constructor(options: MapVisitorOptions) { super(options); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MixedFieldsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MixedFieldsVisitor.ts index 87667b26e3..23adeb9b82 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MixedFieldsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/MixedFieldsVisitor.ts @@ -7,11 +7,17 @@ import PatternedFieldsVisitor, { PatternedFieldsVisitorOptions } from './Pattern export type { SpecPath }; +/** + * @public + */ export interface MixedFieldsVisitorOptions extends PatternedFieldsVisitorOptions { readonly specPathFixedFields: SpecPath; readonly specPathPatternedFields: SpecPath; } +/** + * @public + */ class MixedFieldsVisitor extends Mixin(FixedFieldsVisitor, PatternedFieldsVisitor) { protected readonly specPathFixedFields: SpecPath; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/PatternedFieldsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/PatternedFieldsVisitor.ts index 18e43e107e..8762030778 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/PatternedFieldsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/generics/PatternedFieldsVisitor.ts @@ -14,6 +14,9 @@ import { isSwaggerExtension } from '../../predicates.ts'; export type { SpecPath }; +/** + * @public + */ export interface PatternedFieldsVisitorOptions extends SpecificationVisitorOptions { readonly specPath: SpecPath; readonly ignoredFields?: string[]; @@ -22,6 +25,9 @@ export interface PatternedFieldsVisitorOptions extends SpecificationVisitorOptio readonly specificationExtensionPredicate?: typeof isSwaggerExtension; } +/** + * @public + */ class PatternedFieldsVisitor extends SpecificationVisitor { protected specPath: SpecPath; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/BasePathVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/BasePathVisitor.ts index 0e9a1987ae..78731ad0a2 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/BasePathVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/BasePathVisitor.ts @@ -4,6 +4,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; export type { FallbackVisitorOptions as BasePathVisitorOptions }; +/** + * @public + */ class BasePathVisitor extends FallbackVisitor { public declare readonly element: StringElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ConsumesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ConsumesVisitor.ts index 87f60280ff..7eb63bf4b9 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ConsumesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ConsumesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; export type { FallbackVisitorOptions as ConsumesVisitorOptions }; +/** + * @public + */ class ConsumesVisitor extends FallbackVisitor { public declare element: SwaggerConsumesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/HostVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/HostVisitor.ts index 92061e56a8..0168f9cd4b 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/HostVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/HostVisitor.ts @@ -4,6 +4,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; export type { FallbackVisitorOptions as HostVisitorOptions }; +/** + * @public + */ class HostVisitor extends FallbackVisitor { public declare readonly element: StringElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ProducesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ProducesVisitor.ts index 5e73516bb4..2dddda3e03 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ProducesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/ProducesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; export type { FallbackVisitorOptions as ProducesVisitorOptions }; +/** + * @public + */ class ProducesVisitor extends FallbackVisitor { public declare element: SwaggerProducesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SchemesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SchemesVisitor.ts index d38a70ce75..0550617ac0 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SchemesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SchemesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; export type { FallbackVisitorOptions as SchemesVisitorOptions }; +/** + * @public + */ class SchemesVisitor extends FallbackVisitor { public declare element: SwaggerSchemesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SecurityVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SecurityVisitor.ts index a7745bd4d3..857554ea8d 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SecurityVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SecurityVisitor.ts @@ -5,10 +5,16 @@ import SwaggerSecurityElement from '../../../elements/nces/SwaggerSecurity.ts'; import SpecificationVisitor, { SpecificationVisitorOptions } from '../SpecificationVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; +/** + * @public + */ export interface SecurityVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SecurityVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare readonly element: SwaggerSecurityElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SwaggerVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SwaggerVisitor.ts index 6948341b59..79795cc6ad 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SwaggerVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/SwaggerVisitor.ts @@ -5,10 +5,16 @@ import SwaggerVersionElement from '../../../elements/SwaggerVersion.ts'; import SpecificationVisitor, { SpecificationVisitorOptions } from '../SpecificationVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; +/** + * @public + */ export interface SwaggerVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SwaggerVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare element: SwaggerVersionElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/TagsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/TagsVisitor.ts index 8fa030df96..3e4f5622ed 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/TagsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/TagsVisitor.ts @@ -5,8 +5,14 @@ import SpecificationVisitor, { SpecificationVisitorOptions } from '../Specificat import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; import SwaggerTagsElement from '../../../elements/nces/SwaggerTags.ts'; +/** + * @public + */ export interface TagsVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class TagsVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare readonly element: SwaggerTagsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/contact/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/contact/index.ts index 25b7f9a333..dd93f6bde6 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/contact/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/contact/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ContactVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ContactVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ContactElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/definitions/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/definitions/index.ts index c2338f2d9e..3967a7b81d 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/definitions/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/definitions/index.ts @@ -10,8 +10,14 @@ import DefinitionsElement from '../../../../elements/Definitions.ts'; import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface DefinitionsVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class DefinitionsVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: DefinitionsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/example/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/example/index.ts index 19ef4b6e5b..074b511af9 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/example/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/example/index.ts @@ -5,8 +5,14 @@ import ExampleElement from '../../../../elements/Example.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; +/** + * @public + */ export interface ExampleVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ExampleVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: ExampleElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/external-documentation/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/external-documentation/index.ts index f9d488f446..cf987aca77 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/external-documentation/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/external-documentation/index.ts @@ -8,10 +8,16 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ExternalDocumentationVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ExternalDocumentationVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ExternalDocumentationElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/header/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/header/index.ts index bce3e4006c..52e9fa2df0 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/header/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/header/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface HeaderVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class HeaderVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: HeaderElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/headers/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/headers/index.ts index fa07bb310a..4adb16f01c 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/headers/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/headers/index.ts @@ -5,8 +5,14 @@ import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisit import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; import HeadersElement from '../../../../elements/Headers.ts'; +/** + * @public + */ export interface HeadersVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class HeadersVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: HeadersElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/index.ts index 48e7833735..5625165fe3 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../FallbackVisitor.ts'; +/** + * @public + */ export interface SwaggerVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SwaggerVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: SwaggerElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/VersionVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/VersionVisitor.ts index 6eeedabf6f..54d891b6c5 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/VersionVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/VersionVisitor.ts @@ -4,6 +4,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as VersionVisitorOptions }; +/** + * @public + */ class VersionVisitor extends FallbackVisitor { public declare readonly element: StringElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/index.ts index 181a7b68d1..49ba083c29 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/info/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface InfoVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class InfoVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: InfoElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/items/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/items/index.ts index 10b4a0ecf8..df9c990770 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/items/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/items/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ItemsVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ItemsVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ItemsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/license/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/license/index.ts index be2c8359dc..001b8ad1b7 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/license/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/license/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface LicenseVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class LicenseVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: LicenseElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts index 8a609fa41b..87d8f40618 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ConsumesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as ConsumesVisitorOptions }; +/** + * @public + */ class ConsumesVisitor extends FallbackVisitor { public declare element: OperationConsumesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts index dda24b84e7..13ca2edac0 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ParametersVisitor.ts @@ -7,10 +7,16 @@ import OperationParametersElement from '../../../../elements/nces/OperationParam import SpecificationVisitor, { SpecificationVisitorOptions } from '../../SpecificationVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ParametersVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ParametersVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare readonly element: OperationParametersElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts index 845057cbe2..fc6afd2eb8 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/ProducesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as ProducesVisitorOptions }; +/** + * @public + */ class ProducesVisitor extends FallbackVisitor { public declare element: OperationProducesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts index f4b02f214e..e1b1af04b8 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SchemesVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as SchemesVisitorOptions }; +/** + * @public + */ class SchemesVisitor extends FallbackVisitor { public declare element: OperationSchemesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts index 8bf4a91b34..fdaa5a695e 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/SecurityVisitor.ts @@ -5,10 +5,16 @@ import OperationSecurityElement from '../../../../elements/nces/OperationSecurit import SpecificationVisitor, { SpecificationVisitorOptions } from '../../SpecificationVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface SecurityVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SecurityVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare readonly element: OperationSecurityElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts index 38ca858eae..cb77dfc0d4 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/TagsVisitor.ts @@ -5,6 +5,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as TagsVisitorOptions }; +/** + * @public + */ class TagsVisitor extends FallbackVisitor { public declare element: OperationTagsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/index.ts index 09c5f5fb42..81f89d540d 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/operation/index.ts @@ -8,10 +8,16 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface OperationVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class OperationVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: OperationElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameter/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameter/index.ts index 200ac95b42..43713a1fc1 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameter/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameter/index.ts @@ -8,10 +8,16 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ParameterVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ParameterVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ParameterElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameters-definitions/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameters-definitions/index.ts index 85885ce270..7e42280ac6 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameters-definitions/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/parameters-definitions/index.ts @@ -5,10 +5,16 @@ import ParametersDefinitionsElement from '../../../../elements/ParametersDefinit import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ParametersDefinitionsVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ParametersDefinitionsVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: ParametersDefinitionsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts index 8b4eafe939..13c20d6fd7 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/$RefVisitor.ts @@ -4,6 +4,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as $RefVisitorOptions }; +/** + * @public + */ class $RefVisitor extends FallbackVisitor { public declare readonly element: StringElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts index 1fe436e9b0..868df8daee 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/ParametersVisitor.ts @@ -7,10 +7,16 @@ import PathItemParametersElement from '../../../../elements/nces/PathItemParamet import SpecificationVisitor, { SpecificationVisitorOptions } from '../../SpecificationVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ParametersVisitorOptions extends SpecificationVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ParametersVisitor extends Mixin(SpecificationVisitor, FallbackVisitor) { public declare readonly element: PathItemParametersElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/index.ts index f51ccd391a..85a26fa0ea 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/path-item/index.ts @@ -17,8 +17,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface PathItemVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class PathItemVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: PathItemElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/paths/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/paths/index.ts index ed8b4a25ac..9e51ea67c6 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/paths/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/paths/index.ts @@ -11,10 +11,16 @@ import PatternedFieldsVisitor, { import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; import { isPathItemElement } from '../../../../predicates.ts'; +/** + * @public + */ export interface PathsVisitorOptions extends PatternedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class PathsVisitor extends Mixin(PatternedFieldsVisitor, FallbackVisitor) { public readonly element: PathsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts index 8b4eafe939..13c20d6fd7 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/$RefVisitor.ts @@ -4,6 +4,9 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t export type { FallbackVisitorOptions as $RefVisitorOptions }; +/** + * @public + */ class $RefVisitor extends FallbackVisitor { public declare readonly element: StringElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/index.ts index 3093a243e4..249a2ed8bb 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/reference/index.ts @@ -9,10 +9,16 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ReferenceVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ReferenceVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ReferenceElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/response/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/response/index.ts index a1fc3f53ae..3a6ce3ac68 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/response/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/response/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ResponseVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ResponseVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ResponseElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses-definitions/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses-definitions/index.ts index 62d5738e33..0a682293ad 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses-definitions/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses-definitions/index.ts @@ -5,10 +5,16 @@ import ResponsesDefinitionsElement from '../../../../elements/ResponsesDefinitio import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ResponsesDefinitionsVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ResponsesDefinitionsVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: ResponsesDefinitionsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts index bad94af87a..04f3760876 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/DefaultVisitor.ts @@ -9,8 +9,14 @@ import AlternatingVisitor, { } from '../../generics/AlternatingVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface DefaultVisitorOptions extends AlternatingVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class DefaultVisitor extends Mixin(AlternatingVisitor, FallbackVisitor) { constructor(options: DefaultVisitorOptions) { super(options); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/index.ts index 35c291974b..49f2ab4a31 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/responses/index.ts @@ -18,10 +18,16 @@ import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.t import { isReferenceLikeElement } from '../../../predicates.ts'; import { isReferenceElement, isResponseElement } from '../../../../predicates.ts'; +/** + * @public + */ export interface ResponsesVisitorOptions extends MixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ResponsesVisitor extends Mixin(MixedFieldsVisitor, FallbackVisitor) { public declare readonly element: ResponsesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts index 392837e86c..0eeb8da7ad 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/AllOfVisitor.ts @@ -4,13 +4,20 @@ import { isJSONReferenceElement, JSONReferenceElement, AllOfVisitorOptions, + AllOfVisitor as AllOfVisitorType, } from '@swagger-api/apidom-ns-json-schema-draft-4'; export type { AllOfVisitorOptions }; -const { allOf: JSONSchemaAllOfVisitor } = - JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields; +/** + * @public + */ +export const JSONSchemaAllOfVisitor: typeof AllOfVisitorType = + JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.allOf; +/** + * @public + */ class AllOfVisitor extends JSONSchemaAllOfVisitor { ArrayElement(arrayElement: ArrayElement) { const result = JSONSchemaAllOfVisitor.prototype.ArrayElement.call(this, arrayElement); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts index baac5859d3..40f4b596cd 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/ItemsVisitor.ts @@ -4,13 +4,20 @@ import { JSONReferenceElement, isJSONReferenceElement, ItemsVisitorOptions, + ItemsVisitor as ItemsVisitorType, } from '@swagger-api/apidom-ns-json-schema-draft-4'; export type { ItemsVisitorOptions }; -const { items: JSONSchemaItemsVisitor } = - JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields; +/** + * @public + */ +export const JSONSchemaItemsVisitor: typeof ItemsVisitorType = + JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.items; +/** + * @public + */ class ItemsVisitor extends JSONSchemaItemsVisitor { ObjectElement(objectElement: ObjectElement) { const result = JSONSchemaItemsVisitor.prototype.ObjectElement.call(this, objectElement); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts index d477d7a96a..284f052286 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/PropertiesVisitor.ts @@ -4,13 +4,20 @@ import { JSONReferenceElement, isJSONReferenceElement, PropertiesVisitorOptions, + PropertiesVisitor as PropertiesVisitorType, } from '@swagger-api/apidom-ns-json-schema-draft-4'; export type { PropertiesVisitorOptions }; -const { properties: JSONSchemaPropertiesVisitor } = - JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields; +/** + * @public + */ +export const JSONSchemaPropertiesVisitor: typeof PropertiesVisitorType = + JSONSchemaDraft4Specification.visitors.document.objects.JSONSchema.fixedFields.properties; +/** + * @public + */ class PropertiesVisitor extends JSONSchemaPropertiesVisitor { ObjectElement(objectElement: ObjectElement) { const result = JSONSchemaPropertiesVisitor.prototype.ObjectElement.call(this, objectElement); diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts index cc377c808a..77b08acbbf 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/SchemaOrJSONReferenceVisitor.ts @@ -4,14 +4,23 @@ import { isJSONReferenceElement, JSONReferenceElement, SchemaOrReferenceVisitorOptions, + SchemaOrReferenceVisitor as SchemaOrReferenceVisitorType, } from '@swagger-api/apidom-ns-json-schema-draft-4'; import SchemaElement from '../../../../elements/Schema.ts'; export type { SchemaOrReferenceVisitorOptions }; -const { JSONSchemaOrJSONReferenceVisitor } = JSONSchemaDraft4Specification.visitors; +/** + * @public + */ +// eslint-disable-next-line prefer-destructuring +export const JSONSchemaOrJSONReferenceVisitor: typeof SchemaOrReferenceVisitorType = + JSONSchemaDraft4Specification.visitors.JSONSchemaOrJSONReferenceVisitor; +/** + * @public + */ class SchemaOrJSONReferenceVisitor extends JSONSchemaOrJSONReferenceVisitor { public declare element: SchemaElement | JSONReferenceElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/index.ts index cb54b47230..c553f3eae0 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/schema/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface SchemaVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SchemaVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: SchemaElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/scopes/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/scopes/index.ts index ce93d561a2..ba2c48d53c 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/scopes/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/scopes/index.ts @@ -5,8 +5,14 @@ import ScopesElement from '../../../../elements/Scopes.ts'; import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface ScopesVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class ScopesVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: ScopesElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-definitions/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-definitions/index.ts index 1d5e85993c..66c2bd77bb 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-definitions/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-definitions/index.ts @@ -5,10 +5,16 @@ import SecurityDefinitionsElement from '../../../../elements/SecurityDefinitions import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface SecurityDefinitionsVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SecurityDefinitionsVisitor extends Mixin(MapVisitor, FallbackVisitor) { public readonly element: SecurityDefinitionsElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-requirement/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-requirement/index.ts index 757c64ec86..b805fa7eac 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-requirement/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-requirement/index.ts @@ -5,10 +5,16 @@ import SecurityRequirementElement from '../../../../elements/SecurityRequirement import MapVisitor, { MapVisitorOptions, SpecPath } from '../../generics/MapVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface SecurityRequirementVisitorOptions extends MapVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SecurityRequirementVisitor extends Mixin(MapVisitor, FallbackVisitor) { public declare readonly element: SecurityRequirementElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-scheme/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-scheme/index.ts index f3c0dc644d..0968abd4b8 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-scheme/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/security-scheme/index.ts @@ -8,10 +8,16 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface SecuritySchemeVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class SecuritySchemeVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: SecuritySchemeElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/tag/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/tag/index.ts index 78a60ec977..829494b3c5 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/tag/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/tag/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface TagVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class TagVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: TagElement; diff --git a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/xml/index.ts b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/xml/index.ts index a5b61d36d5..b713d02372 100644 --- a/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/xml/index.ts +++ b/packages/apidom-ns-openapi-2/src/refractor/visitors/open-api-2/xml/index.ts @@ -8,8 +8,14 @@ import FixedFieldsVisitor, { } from '../../generics/FixedFieldsVisitor.ts'; import FallbackVisitor, { FallbackVisitorOptions } from '../../FallbackVisitor.ts'; +/** + * @public + */ export interface XmlVisitorOptions extends FixedFieldsVisitorOptions, FallbackVisitorOptions {} +/** + * @public + */ class XmlVisitor extends Mixin(FixedFieldsVisitor, FallbackVisitor) { public declare readonly element: XmlElement; diff --git a/packages/apidom-ns-openapi-2/src/traversal/visitor.ts b/packages/apidom-ns-openapi-2/src/traversal/visitor.ts index 5152d93159..d54e111170 100644 --- a/packages/apidom-ns-openapi-2/src/traversal/visitor.ts +++ b/packages/apidom-ns-openapi-2/src/traversal/visitor.ts @@ -1,6 +1,8 @@ import { keyMap as keyMapBase, isElement, Element } from '@swagger-api/apidom-core'; -// getNodeType :: Node -> String +/** + * @public + */ export const getNodeType = (element: T): string | undefined => { if (!isElement(element)) { return undefined; @@ -16,6 +18,7 @@ export const getNodeType = (element: T): string | undefined = * * To be 100% sure that currently visiting `LinkElement` is from this namespace * use `isLinkElement` predicate from this namespace to assert for it. + * @public */ export const keyMap = {