Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

orval

Package Overview
Dependencies
Maintainers
1
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orval

A swagger client generator for typescript

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is orval?

Orval is a powerful tool for generating API clients from OpenAPI (Swagger) specifications. It helps streamline the process of creating and maintaining API clients by automating the generation of TypeScript or JavaScript code based on your API definitions.

What are orval's main functionalities?

Generate API Clients

This feature allows you to generate API clients from an OpenAPI specification file. You can specify the input file, output directory, and the HTTP client library (e.g., axios) to use.

const orval = require('orval');
orval.generate({
  input: './path/to/openapi.yaml',
  output: './path/to/output',
  client: 'axios'
});

Custom Templates

Orval supports custom templates, allowing you to tailor the generated code to your specific needs. You can provide a path to your custom templates directory.

const orval = require('orval');
orval.generate({
  input: './path/to/openapi.yaml',
  output: './path/to/output',
  client: 'axios',
  templates: './path/to/custom/templates'
});

Mock Server

Orval can generate a mock server based on your OpenAPI specification. This is useful for testing and development purposes. You can specify the input file, output directory, and the port for the mock server.

const orval = require('orval');
orval.mock({
  input: './path/to/openapi.yaml',
  output: './path/to/output',
  port: 3000
});

Other packages similar to orval

Keywords

FAQs

Package last updated on 07 Feb 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc