@mimik/api-helper 2.0.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/index.js +2 -2
- package/package.json +3 -3
- package/test/oauthValidation-helper.test.js +1 -1
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ The default formats for validation are: `date`, `time`, `date-time`, `byte`, `uu
|
|
|
55
55
|
<a name="module_api-helper..getAPIFile"></a>
|
|
56
56
|
|
|
57
57
|
### api-helper~getAPIFile(apiFilename, correlationId, options) ⇒ <code>Promise.<object></code>
|
|
58
|
-
Gets the API file from swaggerhub and
|
|
58
|
+
Gets the API file from swaggerhub and stores it in the given PATH location.
|
|
59
59
|
|
|
60
60
|
**Kind**: inner method of [<code>api-helper</code>](#module_api-helper)
|
|
61
61
|
**Returns**: <code>Promise.<object></code> - The API file itself.
|
|
@@ -72,7 +72,7 @@ Gets the API file from swaggerhub and store it in the given PATH location.
|
|
|
72
72
|
"username": "username for bitbucket",
|
|
73
73
|
"password": "password for bitbucket"
|
|
74
74
|
},
|
|
75
|
-
"apiApiKey": "apiKey
|
|
75
|
+
"apiApiKey": "apiKey to access private API on swaggerhub, can be optional if the API is accessible publicly"
|
|
76
76
|
}
|
|
77
77
|
```
|
|
78
78
|
|
package/index.js
CHANGED
|
@@ -228,7 +228,7 @@ const buildProviderRequest = (params, apiInfo, apiFilename) => {
|
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
*
|
|
231
|
-
* Gets the API file from swaggerhub and
|
|
231
|
+
* Gets the API file from swaggerhub and stores it in the given PATH location.
|
|
232
232
|
*
|
|
233
233
|
* @function getAPIFile
|
|
234
234
|
* @category async
|
|
@@ -252,7 +252,7 @@ const buildProviderRequest = (params, apiInfo, apiFilename) => {
|
|
|
252
252
|
* "username": "username for bitbucket",
|
|
253
253
|
* "password": "password for bitbucket"
|
|
254
254
|
* },
|
|
255
|
-
* "apiApiKey": "apiKey
|
|
255
|
+
* "apiApiKey": "apiKey to access private API on swaggerhub, can be optional if the API is accessible publicly"
|
|
256
256
|
* }
|
|
257
257
|
* ```
|
|
258
258
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mimik/api-helper",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "helper for openAPI backend and mimik service",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@mimik/request-retry": "^4.0.9",
|
|
31
31
|
"@mimik/response-helper": "^4.0.10",
|
|
32
|
-
"@mimik/sumologic-winston-logger": "^2.1.
|
|
32
|
+
"@mimik/sumologic-winston-logger": "^2.1.14",
|
|
33
33
|
"@mimik/swagger-helper": "^5.0.3",
|
|
34
34
|
"ajv-formats": "3.0.1",
|
|
35
35
|
"js-base64": "3.7.8",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@eslint/js": "9.32.0",
|
|
43
43
|
"@mimik/eslint-plugin-document-env": "^2.0.8",
|
|
44
44
|
"@stylistic/eslint-plugin": "5.9.0",
|
|
45
|
-
"c8": "
|
|
45
|
+
"c8": "11.0.0",
|
|
46
46
|
"chai": "6.2.2",
|
|
47
47
|
"eslint": "9.32.0",
|
|
48
48
|
"eslint-plugin-import": "2.32.0",
|
|
@@ -115,7 +115,7 @@ describe('oauthValidation-helper', () => {
|
|
|
115
115
|
expect(validateApiKey(schemes, 'ApiKeySecurity')).to.equal('ApiKeySecurity');
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
-
it('should throw when in
|
|
118
|
+
it('should throw when not in header', () => {
|
|
119
119
|
const schemes = {
|
|
120
120
|
ApiKeySecurity: { in: 'query', name: 'apiKey' },
|
|
121
121
|
};
|