Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@orval/core
Advanced tools
[![npm version](https://badge.fury.io/js/orval.svg)](https://badge.fury.io/js/orval) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![tests](https://github.com/anymaniax/orval/actions/workflows
@orval/core is a powerful tool for generating TypeScript clients from OpenAPI (Swagger) specifications. It helps streamline the process of creating API clients by automating the generation of TypeScript types and functions based on the OpenAPI definitions.
Generate TypeScript API Clients
This feature allows you to generate TypeScript API clients from an OpenAPI specification file. The generated clients can be configured to use different HTTP clients like Axios.
const orval = require('@orval/core');
orval.generate({
input: './path/to/openapi.yaml',
output: './path/to/output',
client: 'axios'
});
Custom Templates
You can provide custom templates to tailor the generated code to your specific needs. This allows for greater flexibility and customization in how the API clients are generated.
const orval = require('@orval/core');
orval.generate({
input: './path/to/openapi.yaml',
output: './path/to/output',
client: 'axios',
templates: './path/to/custom/templates'
});
Mock Server Generation
This feature enables the generation of a mock server based on the OpenAPI specification. It can be useful for testing and development purposes when the actual API is not yet available.
const orval = require('@orval/core');
orval.generate({
input: './path/to/openapi.yaml',
output: './path/to/output',
mock: true
});
OpenAPI Generator is a comprehensive tool that supports the generation of API clients, server stubs, and API documentation from OpenAPI specifications. It offers a wide range of language and framework support, making it a versatile alternative to @orval/core.
Swagger Codegen is another popular tool for generating API clients, server stubs, and API documentation from OpenAPI (Swagger) specifications. It has a large community and extensive support for various languages and frameworks, similar to OpenAPI Generator.
typescript-fetch is a generator for TypeScript clients using the Fetch API. It is more lightweight compared to @orval/core and focuses specifically on generating TypeScript clients that use the Fetch API for making HTTP requests.
orval
is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml
or json
formats.
Generate
, valid
, cache
and mock
in your React, Vue, Svelte and Angular applications all with your OpenAPI specification.
You can find below some samples
FAQs
[![npm version](https://badge.fury.io/js/orval.svg)](https://badge.fury.io/js/orval) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![tests](https://github.com/orval-labs/orval/actions/workflow
The npm package @orval/core receives a total of 201,178 weekly downloads. As such, @orval/core popularity was classified as popular.
We found that @orval/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.