New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-graph-core

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-graph-core - npm Package Compare versions

Comparing version 0.0.1-alpha.1.0 to 0.0.1-alpha.2.0

5

package.json
{
"name": "openapi-graph-core",
"version": "0.0.1-alpha.1.0",
"version": "0.0.1-alpha.2.0",
"description": "A TS library to manage large API projects defined by OpenAPIv3 specification.",

@@ -25,2 +25,5 @@ "main": "./lib/index.js",

],
"repository": {
"url": "git://github.com/onmax/open-api-graph.git"
},
"devDependencies": {

@@ -27,0 +30,0 @@ "@types/jest": "^26.0.20",

28

README.md

@@ -1,2 +0,2 @@

# Swagger-graph
# OpenAPI-graph

@@ -11,31 +11,17 @@ A TS library to manage large API projects defined by OpenAPIv3 specification.

> npm install openapi-graph
> npm install openapi-graph-core
and you are good to go
## Functions
## Creating an OpenAPI graph
For now, just one function is being exposed
The constructor needs to be a path of the root of the proyect where all your openAPI specifications are stored which will be fetched automatically.
### `getUnusedSchemas(path: string)`
It will create a OpenAPIGraph, and get the schemas that are not being used as a list.
#### Arguments
`path: string` - Abosolute, relative or url where the API has being defined
#### Returns
A list of `Schemas` that are not being used in the API.
#### Example
```javascript
const openApiGraph = require('openapi-graph');
const OpenAPIGraphs = require('openapi-graph-core');
(async () => {
const a = await openApiGraph.getUnusedSchemas('./')
console.log(a)
const graphs = await new OpenAPIGraphs('./').build()
console.log(graphs)
})();
```
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