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

swagger-jsdoc

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-jsdoc - npm Package Compare versions

Comparing version 3.2.1 to 3.2.2

2

package.json
{
"name": "swagger-jsdoc",
"version": "3.2.1",
"version": "3.2.2",
"description": "Generates swagger doc based on JSDoc",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -48,11 +48,17 @@ # swagger-jsdoc

Definition object maps to [OpenAPI object](https://swagger.io/specification/#oasObject). This is where you would add information about your API and any root-level properties. Definition object is required parameter.
Definition object maps to [OpenAPI object](https://swagger.io/specification/#oasObject). This is where you would add information about your API and any root-level properties. Definition object is a required parameter.
Input APIs are any files which you pass as arguemnts to the program in order to extract information about your API. For instance, these could be `.js` files with JSDoc comments or `.yaml` files directly. This parameter is also required.
There are 2 ways by which you can pass these 2 required arguemnts:
There are a few ways by which you can pass these 2 required arguments:
- Through `apis` property in your definition object
- Through arguments (`program.args`) when using the CLI.
When using the CLI:
- Through `apis` property in your definition object.
- Through arguments
When using the Node API:
- Through `apis` in your `options` object.
For example, given the following module export for a definition object:

@@ -75,3 +81,3 @@

The only way you can make use of this definition is by using the CLI as following:
One way you can make use of this definition is by using the CLI as following:

@@ -89,3 +95,3 @@ ```sh

...
apis: ['example/v2/route*.js']
apis: ['example/v2/route*.js'] // <-- We add this property:
basePath: '/', // Base path (optional)

@@ -101,3 +107,3 @@ };

Keep in mind that, this holds true for the CLI usage as it's flexible. When using the Node API in the following way:
When using the Node API, input APIs come in in the following way:

@@ -114,3 +120,3 @@ ```javascript

swaggerDefinition,
apis: ['./example/v2/routes*.js'],
apis: ['./example/v2/routes*.js'], // <-- not in the definition, but in the options
};

@@ -117,0 +123,0 @@

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