Skip to content

fix: add validation to mount-path#2391

Merged
kanoru3101 merged 7 commits into
mainfrom
fix/mount-path-validation
Oct 28, 2025
Merged

fix: add validation to mount-path#2391
kanoru3101 merged 7 commits into
mainfrom
fix/mount-path-validation

Conversation

@kanoru3101

@kanoru3101 kanoru3101 commented Oct 28, 2025

Copy link
Copy Markdown
Contributor

What/Why/How?

mount-path was not checked, which led to errors when used with an empty path or a path identical (/) to the project path.

Reference

Testing

Error when using --mount-path or --mp with an empty path or root path.

Mount path cannot be empty or root path. Please use --mount-path option with a valid path.

Screenshots (optional)

Example of usage
Screenshot 2025-10-28 at 15 16 32

Check yourself

  • Code changed? - Tested with Redoc/Realm/Reunite (internal)
  • All new/updated code is covered by tests
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

@kanoru3101 kanoru3101 self-assigned this Oct 28, 2025
@changeset-bot

changeset-bot Bot commented Oct 28, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 512a7ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@redocly/cli Patch
@redocly/openapi-core Patch
@redocly/respect-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@changeset-bot

changeset-bot Bot commented Oct 28, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ab72f01

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Oct 28, 2025

Copy link
Copy Markdown
Contributor
Command Mean [s] Min [s] Max [s] Relative
redocly lint packages/core/src/benchmark/benches/rebilly.yaml 1.367 ± 0.007 1.357 1.378 1.01 ± 0.02
redocly-next lint packages/core/src/benchmark/benches/rebilly.yaml 1.358 ± 0.021 1.341 1.413 1.00

Comment thread packages/cli/src/reunite/commands/push.ts Outdated
@kanoru3101 kanoru3101 added the snapshot Create experimental release PR label Oct 28, 2025
@github-actions

Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1761649655 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1761649655
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1761649655
# or
npm install @redocly/respect-core@0.0.0-snapshot.1761649655

⚠️ Note: This is a development build and may contain unstable features.

@kanoru3101 kanoru3101 added snapshot Create experimental release PR and removed snapshot Create experimental release PR labels Oct 28, 2025
@github-actions

Copy link
Copy Markdown
Contributor

📦 A new experimental 🧪 version v0.0.0-snapshot.1761650882 of Redocly CLI has been published for testing.

Install with NPM:

npm install @redocly/cli@0.0.0-snapshot.1761650882
# or
npm install @redocly/openapi-core@0.0.0-snapshot.1761650882
# or
npm install @redocly/respect-core@0.0.0-snapshot.1761650882

⚠️ Note: This is a development build and may contain unstable features.

@kanoru3101
kanoru3101 marked this pull request as ready for review October 28, 2025 11:31
@kanoru3101
kanoru3101 requested review from a team as code owners October 28, 2025 11:31
Comment thread .changeset/violet-jobs-doubt.md Outdated
Co-authored-by: Jacek Łękawa <164185257+JLekawa@users.noreply.github.com>
@tatomyr
tatomyr requested a review from mark-redocly October 28, 2025 12:51
@tatomyr

tatomyr commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

Have you considered updating the corresponding documentation?
image

@kanoru3101

Copy link
Copy Markdown
Contributor Author

Have you considered updating the corresponding documentation? image

Updated information about the path in the push command for mount-path.

Comment thread docs/@v1/commands/push.md
Comment thread packages/cli/src/utils/__tests__/validate-mount-path.test.ts
@kanoru3101
kanoru3101 merged commit 2b64a2b into main Oct 28, 2025
118 of 127 checks passed
@kanoru3101
kanoru3101 deleted the fix/mount-path-validation branch October 28, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot Create experimental release PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants