@@ -27,7 +27,7 @@ import {
2727} from '../../utils/miscellaneous.js' ;
2828import type { CommandArgs } from '../../wrapper.js' ;
2929import { COMPONENTS } from '../split/constants.js' ;
30- import type { JoinArgv , AnyOas3Definition , RootSecurity } from './types.js' ;
30+ import type { JoinArgv , AnyOas3Definition } from './types.js' ;
3131import {
3232 replace$Refs ,
3333 getInfoPrefix ,
@@ -170,22 +170,6 @@ export async function handleJoin({
170170
171171 addInfoSectionAndSpecVersion ( joinedDef , documents , prefixComponentsWithInfoProp ) ;
172172
173- const rootSecurities : RootSecurity [ ] = documents . flatMap ( ( document ) => {
174- const openapi = isPlainObject < AnyOas3Definition > ( document . parsed )
175- ? document . parsed
176- : ( { } as AnyOas3Definition ) ;
177- const { paths, security, info } = openapi ;
178- if ( ! security || ( paths && ! isEmptyObject ( paths ) ) ) {
179- return [ ] ;
180- }
181- return [
182- {
183- security,
184- componentsPrefix : getInfoPrefix ( info , prefixComponentsWithInfoProp , COMPONENTS ) ,
185- } ,
186- ] ;
187- } ) ;
188-
189173 if ( serversAreTheSame && first . parsed . servers ) {
190174 joinedDef . servers = first . parsed . servers ;
191175 }
@@ -200,7 +184,6 @@ export async function handleJoin({
200184 const tagsPrefix = prefixTagsWithFilename
201185 ? apiFilename
202186 : getInfoPrefix ( info , prefixTagsWithInfoProp , 'tags' ) ;
203-
204187 const componentsPrefix = getInfoPrefix ( info , prefixComponentsWithInfoProp , COMPONENTS ) ;
205188
206189 if ( openapi . hasOwnProperty ( 'x-tagGroups' ) ) {
@@ -220,16 +203,8 @@ export async function handleJoin({
220203 if ( tags ) {
221204 populateTags ( { joinedDef, withoutXTagGroups, context } ) ;
222205 }
223-
224206 collectExternalDocs ( { joinedDef, openapi, context } ) ;
225- collectPaths ( {
226- joinedDef,
227- withoutXTagGroups,
228- openapi,
229- context,
230- serversAreTheSame,
231- rootSecurities,
232- } ) ;
207+ collectPaths ( { joinedDef, withoutXTagGroups, openapi, context, serversAreTheSame } ) ;
233208 collectComponents ( { joinedDef, openapi, context } ) ;
234209 collectWebhooks ( { joinedDef, withoutXTagGroups, openapi, context } ) ;
235210 if ( componentsPrefix ) {
0 commit comments