You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

openapi-utils-schema-from-api

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-utils-schema-from-api

Extract schema from openapi definition

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

openapi-utils-schema-from-api

JavaScript Style Guide

Extract schema from openapi definition.

Installation

npm install --save openapi-utils-schema-from-api

Usage

var openApiUtils = require('openapi-utils-schema-from-api')

var api = {
  "definitions": {
    "Cat": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      }
    }
  }
}

var schema = openApiUtils.schemaFromApi(api, { 'schema': { '$ref': '#/definitions/Cat' } } )
console.log(schema)
/*
  { type: 'object', properties: { id: { type: 'string' } } }
*/

Keywords

Extract

FAQs

Package last updated on 11 Dec 2016

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