
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@icholy/openapi-ts
Advanced tools
Library for generating TypeScript interfaces from OpenAPI v3 documents.
The package comes with a cli tool with a basic transformer implementation.
$ openapi-ts ./openapi.json
import { load, analyse, transform } from "@icholy/openapi-ts";
function main() {
const doc = await load("openapi.json");
const details = analyse(doc);
console.log(transform(details));
}
import {
load,
analyse,
Schema,
Printer,
DocumentDetails
} from "@icholy/openapi-ts";
function main() {
const doc = await load("openapi.json");
const details = analyse(doc);
console.log(transform(details));
}
function transform(doc: DocumentDetails): string {
const print = new Printer();
// output component schemas
for (const [name, schema] of Object.entries(doc.schemas)) {
print.schema(schema, name);
}
// output body types with random names
for (const op of doc.operations) {
// usually the name is inferred from the op's method/path
print.schema(op.params.body, "InterfaceNameHere");
}
// output a custom type
const schema = new Schema("object");
schema.setProperty("a", new Schema("string", { required: true }));
schema.setProperty("b", new Schema("SomeOtherType"));
print.schema(schema, "MyType");
// output types for each route
return print.code();
}
FAQs
Library for generating typescript from openapi v3 documents
We found that @icholy/openapi-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.