openapi-graph-core
Advanced tools
Comparing version 0.0.1-alpha.1.0 to 0.0.1-alpha.2.0
{ | ||
"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", |
@@ -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) | ||
})(); | ||
``` |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
22248
26