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

@expediagroup/spec-transformer

Package Overview
Dependencies
Maintainers
0
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expediagroup/spec-transformer

API Spec Transformer

  • 1.12.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Spec Transformer

The API Spec Transformer Library

Installation

npm install @expediagroup/spec-transformer

Usage

Pick one of the following ways to use the library:

1. Use spec-transformer as a library

Example:

import { HeaderRemovalTransformer, TransformerChain, YamlReader, YamlWriter } from '@spec-transformer';

const openapispecs = '...'; // OpenAPI specs in JSON or YAML format

const transformers = new TransformerChain([
  new HeaderRemovalTransformer() // Add more transformers here
]);

const transformedSpecs = transformers.transform(openapispecs, YamlReader, YamlWriter);

console.log(transformedSpecs);

2. Use spec-transformer as a CLI

npx -p @expediagroup/spec-transformer cli --help  # Show help, and list all available commands.

Example:

npx -p @expediagroup/spec-transformer cli --input specs.yaml --output out.yaml --headers  # Read specs from specs.yaml, remove headers, and write to out.yaml

3. Build and run spec-transformer locally

npm install
npm run build

Test

npm test

Development Team

  • Mohammad Noor Abu Khleif
  • Osama Salman

Keywords

FAQs

Package last updated on 06 Aug 2024

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