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

@swagger-api/apidom-parser-adapter-openapi-yaml-3-0

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swagger-api/apidom-parser-adapter-openapi-yaml-3-0

Parser adapter for parsing YAML documents into OpenAPI 3.0.x namespace.

  • 1.0.0-alpha.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
444K
increased by3.72%
Maintainers
1
Weekly downloads
 
Created

What is @swagger-api/apidom-parser-adapter-openapi-yaml-3-0?

@swagger-api/apidom-parser-adapter-openapi-yaml-3-0 is an npm package designed to parse OpenAPI 3.0 YAML documents. It is part of the ApiDOM project, which provides a set of tools for working with API descriptions in various formats.

What are @swagger-api/apidom-parser-adapter-openapi-yaml-3-0's main functionalities?

Parsing OpenAPI 3.0 YAML

This feature allows you to parse an OpenAPI 3.0 YAML document into a JavaScript object. The code sample demonstrates reading an OpenAPI YAML file, loading it into a JavaScript object using `js-yaml`, and then parsing it using the `parse` function from the package.

const { parse } = require('@swagger-api/apidom-parser-adapter-openapi-yaml-3-0');
const yaml = require('js-yaml');
const fs = require('fs');

const openApiYaml = fs.readFileSync('openapi.yaml', 'utf8');
const openApiDocument = yaml.load(openApiYaml);

parse(openApiDocument).then((parsed) => {
  console.log(parsed);
}).catch((error) => {
  console.error(error);
});

Other packages similar to @swagger-api/apidom-parser-adapter-openapi-yaml-3-0

FAQs

Package last updated on 08 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