swagger-jsdoc
Advanced tools
Comparing version 3.2.1 to 3.2.2
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164
124281
17
509