You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@expediagroup/spec-transformer

Package Overview
Dependencies
Maintainers
0
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expediagroup/spec-transformer

API Spec Transformer


Version published
Weekly downloads
83
increased by207.41%
Maintainers
0
Created
Weekly downloads
 

Readme

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 21 Jul 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc