A command-line tool and library to fetch and resolve Swagger/OpenAPI 2.0 resource listing (api-docs) into a single JSON object. Current stable version: 0.1.2. This package is unmaintained and works only with Swagger 2.0 (OpenAPI 2.0). It recursively fetches all referenced API declarations and attaches them as 'apiDeclaration' properties. No alternatives are suggested in the repo; the package is minimal and has no runtime dependencies.
npm install fetch-swagger-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates fetching a Swagger 2.0 resource listing and resolving all referenced API declarations into a single object.
Use a modern OpenAPI tool like 'swagger-parser' or 'openapi-fetch' for OpenAPI 3.x support.
Wrap in try-catch or validate the URL before calling fetchSchema. Use a more robust HTTP client for better error handling.
Use a custom script with a proper HTTP client and implement timeouts/concurrency limits if needed.
Switch to maintained alternatives like 'swagger-parser' (used by SwaggerUI) or '@apidevtools/swagger-parser'.
Run 'npm install fetch-swagger-schema' to install locally, or install globally with 'npm install -g fetch-swagger-schema'.
Use 'var fetchSchema = require('fetch-swagger-schema');' instead of destructured require.No dependency data recorded yet.