Skip to content

1.23.0 release caused breaking change in bundle output option when APIs are not specified #1776

@imdex-brett-debeer

Description

@imdex-brett-debeer

Describe the bug

Release 1.23.0 introduced #1715. Fix #1717 resolved the issue when API names are provided as arguments but did not correct the problem when no API names are provided.

To Reproduce

We have the following make command to bundle some spec files:

npx @redocly/cli bundle -o ./generated/

As of 1.23.0, it outputs a single file named generated.yaml in the ./ folder:

.
└── generated.yaml

Expected behavior

Before, it would output one file per spec file to the ./generated/ folder.

.
├── generated
    ├── some_spec_file.yaml
    ├── another_spec_file.yaml
    └── ...

OpenAPI description

OAS 3.0.0

Redocly Version(s)

I've tried the following versions but expect it applies to all versions since 1.23.0

  • 1.25.7
  • 1.23.1
  • 1.23.0

Node.js Version(s)

v20.10.0

OS, environment

Ubuntu 22.04.5 LTS in WSL on Windows 11

Additional context

Changing redocly-cli/packages/cli/src/commands/bundle.ts line 78 to the below might solve the problem.

        entries: apis.length,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions