
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
openapi2aspida
Advanced tools
Convert OpenAPI 3.0 and Swagger 2.0 definitions into aspida.
Since openapi2aspida >= 0.18.0 , decision whether to be required follows the OpenAPI spec correctly. Dropping the support for original implementation, that was defaulting to required.
Since openapi2aspida >= 0.16.0 , requires TypeSciprt 3.8 or higher for Type-Only Imports.
Since openapi2aspida >= 0.14.0 , request headers are forced to be optional.
Since openapi2aspida >= 0.13.0 , optional for aspida only if the 'required' property of OpenAPI is set to false.
Compatible with yaml/json of OpenAPI3.0/Swagger2.0
$ mkdir petstore-api
$ cd petstore-api
$ npx openapi2aspida -i https://petstore.swagger.io/v2/swagger.json # or ../local-swagger.yaml
# api/$api.ts was built successfully.
$ npm init -y
$ npm install @aspida/axios axios typescript ts-node @types/node
index.ts
import axiosClient from "@aspida/axios"
import api from "./api/$api"
import type { Pet } from "./api/@types"
;(async () => {
const client = api(axiosClient())
const petId = 100
const body: Pet = {
id: petId,
name: "hoge",
photoUrls: [],
status: "available"
}
await client.pet.$post({ body })
const pet = await client.pet._petId(petId).$get()
console.log(pet)
})()
package.json
{
"scripts": {
"start": "ts-node index.ts"
}
}
$ npm start
# { id: 100, name: 'hoge', photoUrls: [], tags: [], status: 'available' }
Create config file in project root
aspida.config.js
module.exports = {
input: "api", // "input" of aspida is "output" for openapi2aspida
outputEachDir: true, // Generate $api.ts in each endpoint directory
openapi: { inputFile: "https://petstore.swagger.io/v2/swagger.json" }
}
$ npx openapi2aspida
-i, --inputpath to an OpenAPI spec file for input
-o, --outputdircan change aspida output directory
-c, --configpath to an aspida config file
--versiondisplays version of openapi2aspida
npx openapi2aspida -i=openApi/sample.yaml -o=lib/api/sample
openapi2aspida is licensed under a MIT License.
FAQs
Convert OpenAPI 3.0 or Swagger 2.0 definitions into aspida
We found that openapi2aspida demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.