OpenAPI Generator CLI is a Node.js/TypeScript command-line wrapper around the Java-based OpenAPITools/openapi-generator JAR. Despite using NestJS, it is not a server: NestJS provides a DI application context that wires a Commander CLI. On every invocation (main.ts → AppModule.onApplicationBootstrap), it reads openapitools.json, resolves a generator version (querying Sonatype's Solr search for the latest stable when unset), writes it back to config, downloads and caches the JAR — atomically, via temp file + rename — then asks the Java CLI itself (via `help` and `completion` output) what commands it exposes, registers them dynamically, and spawns `java -jar ... <command>` with inherited stdio. It supports HTTP(S) proxies, JAVA_OPTS, custom generator JARs (classpath merge), and a Docker execution mode. Beyond pass-through, the CLI adds value the raw Java tool lacks: a `version-manager` subcommand (list/set/remove tagged versions backed by an interactive table picker) and a config-driven batch generator in openapitools.json where named generators map glob patterns to invocations with placeholder tokens (#{name}, #{cwd}, #{relPath}, #{ext}, ...), executed concurrently (max 10 processes). The repo is an Nx single-app monorepo bundled into a shebang'd main.js and released via semantic-release; GitHub Actions CI runs lint, unit tests, and real Java-based E2E on Ubuntu and macOS. Unit test coverage is thorough across config, version management, command pass-through, and command construction. Genuinely clever parts: dynamic discovery of an external CLI's command surface, atomic binary caching, and a table-to-interactive-select UI. The warts: a ~100-entry hardcoded fallback version list embedded in source, a legacy root lib/index.js publishing script superseded by the webpack package plugin, leftover NestJS scaffolding (environment stubs, 'not a production server' comment), deprecated RxJS toPromise() usage, an ESLint root config that effectively ignores all files, and a Nix flake pinned to Node 18 while the package requires Node 22. It does what it claims and is actively maintained, but the residue keeps it from being exemplary.
Knife4j is an enhanced Swagger/OpenAPI user interface and aggregation toolkit for the Java Spring ecosystem. In production it deploys as a set of Spring Boot auto-configuration starters: openapi2 (springfox), openapi3 (springdoc), aggregation from disk/cloud/Nacos/Eureka/Polaris sources, and Spring Cloud Gateway discovery, plus an optional standalone `knife4j-insight` server and multiple frontend UIs (Vue 2, Vue 3, React/Ant Design Pro). The core data flow is: a Spring Boot service exposes OpenAPI JSON via springdoc/springfox; Knife4j customizers and plugins enrich that JSON with API ordering, markdown docs, global parameters, and enhanced metadata; the frontend consumes the OpenAPI document and renders API lists, debug consoles, OAuth2 flows, and offline export pages. Aggregation starters fetch and merge specs from remote registries or local files, cache them in memory, and proxy or route requests to upstream services.