1- # Swagger -graph
1+ # OpenAPI -graph
22
33A TS library to manage large API projects defined by OpenAPIv3 specification.
44
@@ -8,33 +8,19 @@ A TS library to manage large API projects defined by OpenAPIv3 specification.
88
99Just run
1010
11- > npm install openapi-graph
11+ > npm install openapi-graph-core
1212
1313and you are good to go
1414
15- ## Functions
15+ ## Creating an OpenAPI graph
1616
17- For now, just one function is being exposed
18- 19- ### ` getUnusedSchemas(path: string) `
20- 21- It will create a OpenAPIGraph, and get the schemas that are not being used as a list.
22- 23- #### Arguments
24- 25- ` path: string ` - Abosolute, relative or url where the API has being defined
26- 27- #### Returns
28- 29- A list of ` Schemas ` that are not being used in the API.
30- 31- #### Example
17+ 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.
3218
3319``` javascript
34- const openApiGraph = require (' openapi-graph' );
20+ const OpenAPIGraphs = require (' openapi-graph-core ' );
3521
3622(async () => {
37- const a = await openApiGraph . getUnusedSchemas (' ./' )
38- console .log (a )
23+ const graphs = await new OpenAPIGraphs (' ./' ). build ( )
24+ console .log (graphs )
3925})();
4026```
0 commit comments