docs: correct npx package resolution guidance

MI
3h ago
+1-1

Summary

Update the npx package resolution guidance in docs/installation.md.

The previous explanation incorrectly stated that npx prioritizes globally installed commands over project-local packages. This does not reflect the behavior documented for modern npm versions.

Changes

  • Clarify that npx uses the project-local @openapitools/openapi-generator-cli package when available.
  • Explain that npm may fetch the package into its cache when it is not available locally.
  • Clarify how to invoke a globally installed CLI directly.
  • Leave the existing installation and generation commands unchanged.

Validation

Verified package resolution behavior on Windows using Node.js 24.22.1 and npm/npx 11.19.1.

  • Global package: prettier@2.8.8
  • Local package: prettier@3.1.0
  • npx prettier --version returned 3.1.0.
  • npx --no-install prettier --version also returned 3.1.0.

The observed behavior is consistent with the [official npm documentation](https://docs.npmjs.com/cli/v11/commands/npx/).

This is a documentation-only change. The OpenAPI Generator CLI was not tested directly, and the project build and sample generation were not run.


Summary by cubic

Corrects the npx package resolution guidance in docs/installation.md to match modern npm behavior.

The old instructions claimed npx prefers globally installed commands over project-local packages. The new guidance states that npx uses the local @openapitools/openapi-generator-cli when available, may fetch the package into npm's cache otherwise, and shows how to invoke a globally installed CLI directly. This is a documentation-only change; installation and generation commands are unchanged.