Skip to content

Commit

Permalink
refactor(ns-openapi-3-1): remove empty fallback visitors (#3805)
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n authored Feb 8, 2024
1 parent c9e26c2 commit 76d3f15
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 44 deletions.
8 changes: 0 additions & 8 deletions packages/apidom-ns-openapi-3-1/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ export type {
InfoVersionVisitor,
InfoVersionVisitorOptions,
} from '@swagger-api/apidom-ns-openapi-3-0';
export type {
default as InfoSummaryVisitor,
SummaryVisitorOption as InfoSummaryVisitorOption,
} from './refractor/visitors/open-api-3-1/info/SummaryVisitor';
export type {
default as LicenseIdentifierVisitor,
IdentifierVisitorOption as LicenseIdentifierVisitorOption,
} from './refractor/visitors/open-api-3-1/license/IdentifierVisitor';
export type {
default as LicenseVisitor,
LicenseVisitorOptions,
Expand Down
12 changes: 4 additions & 8 deletions packages/apidom-ns-openapi-3-1/src/refractor/specification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import { specificationObj as OpenApi3_0Specification } from '@swagger-api/apidom

import OpenApi3_1Visitor from './visitors/open-api-3-1';
import InfoVisitor from './visitors/open-api-3-1/info';
import InfoSummaryVisitor from './visitors/open-api-3-1/info/SummaryVisitor';
import ContactVisitor from './visitors/open-api-3-1/contact';
import LicenseVisitor from './visitors/open-api-3-1/license';
import LicenseIdentifierVisitor from './visitors/open-api-3-1/license/IdentifierVisitor';
import LinkVisitor from './visitors/open-api-3-1/link';
import JsonSchemaDialectVisitor from './visitors/open-api-3-1/JsonSchemaDialectVisitor';
import ServerVisitor from './visitors/open-api-3-1/server';
Expand All @@ -15,8 +13,6 @@ import SecurityRequirementVisitor from './visitors/open-api-3-1/security-require
import ComponentsVisitor from './visitors/open-api-3-1/components';
import TagVisitor from './visitors/open-api-3-1/tag';
import ReferenceVisitor from './visitors/open-api-3-1/reference';
import ReferenceSummaryVisitor from './visitors/open-api-3-1/reference/SummaryVisitor';
import ReferenceDescriptionVisitor from './visitors/open-api-3-1/reference/DescriptionVisitor';
import ParameterVisitor from './visitors/open-api-3-1/parameter';
import HeaderVisitor from './visitors/open-api-3-1/header';
import SchemaVisitor from './visitors/open-api-3-1/schema';
Expand Down Expand Up @@ -96,7 +92,7 @@ const specification = {
title: OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.title,
description:
OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.description,
summary: InfoSummaryVisitor,
summary: { $ref: '#/visitors/value' },
termsOfService:
OpenApi3_0Specification.visitors.document.objects.Info.fixedFields.termsOfService,
contact: {
Expand All @@ -120,7 +116,7 @@ const specification = {
$visitor: LicenseVisitor,
fixedFields: {
name: OpenApi3_0Specification.visitors.document.objects.License.fixedFields.name,
identifier: LicenseIdentifierVisitor,
identifier: { $ref: '#/visitors/value' },
url: OpenApi3_0Specification.visitors.document.objects.License.fixedFields.url,
},
},
Expand Down Expand Up @@ -401,8 +397,8 @@ const specification = {
$visitor: ReferenceVisitor,
fixedFields: {
$ref: OpenApi3_0Specification.visitors.document.objects.Reference.fixedFields.$ref,
summary: ReferenceSummaryVisitor,
description: ReferenceDescriptionVisitor,
summary: { $ref: '#/visitors/value' },
description: { $ref: '#/visitors/value' },
},
},
Schema: {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 76d3f15

Please sign in to comment.