@bearer/openapi-generator
Advanced tools
Comparing version 0.100.0 to 0.100.1-canary.25
@@ -82,2 +82,3 @@ "use strict"; | ||
const authType = checker.typeToString(typ.aliasTypeArguments[index]); | ||
console.log(authType); | ||
if (/apiKey/.test(authType)) | ||
@@ -87,2 +88,5 @@ return 'APIKEY'; | ||
return 'BASIC'; | ||
if ((/accessToken/.test(authType) && /tokenSecret/.test(authType)) || /TOAUTH1AuthContext/.test(authType)) { | ||
return 'OAUTH1'; | ||
} | ||
if (/accessToken/.test(authType)) | ||
@@ -155,3 +159,3 @@ return 'OAUTH2'; | ||
requestBody: typeSchema.requestBody, | ||
oauth2: typeSchema.intentAuthType === 'OAUTH2' | ||
oauth: typeSchema.intentAuthType === 'OAUTH2' || typeSchema.intentAuthType === 'OAUTH1' | ||
})); | ||
@@ -158,0 +162,0 @@ }, {}); |
@@ -36,3 +36,3 @@ declare type THeader = { | ||
}; | ||
export declare function specPath({ integrationUuid, intentName, requestBody, response, oauth2 }: { | ||
export declare function specPath({ integrationUuid, intentName, requestBody, response, oauth }: { | ||
integrationUuid: string; | ||
@@ -42,3 +42,3 @@ intentName: string; | ||
response: any; | ||
oauth2: boolean; | ||
oauth: boolean; | ||
}): { | ||
@@ -45,0 +45,0 @@ [x: string]: { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function specPath({ integrationUuid, intentName, requestBody, response, oauth2 }) { | ||
function specPath({ integrationUuid, intentName, requestBody, response, oauth }) { | ||
return { | ||
@@ -15,3 +15,3 @@ [`/${integrationUuid}/${intentName}`]: { | ||
}, | ||
oauthParam(oauth2) | ||
oauthParam(oauth) | ||
].filter(e => e !== undefined), | ||
@@ -40,4 +40,4 @@ summary: intentName, | ||
exports.specPath = specPath; | ||
function oauthParam(oauth2) { | ||
if (oauth2) { | ||
function oauthParam(oauth) { | ||
if (oauth) { | ||
return { | ||
@@ -44,0 +44,0 @@ name: 'authId', |
{ | ||
"name": "@bearer/openapi-generator", | ||
"version": "0.100.0", | ||
"version": "0.100.1-canary.25+f940327d", | ||
"description": "Intent openapi spec generator", | ||
"main": "lib/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "github:Bearer/bearer" | ||
}, | ||
"repository": "Bearer/bearer", | ||
"homepage": "https://github.com/Bearer/bearer/packages/openapi-generator#readme", | ||
"author": "Bearer Team", | ||
@@ -16,20 +14,9 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@bearer/intents": "next", | ||
"@bearer/package-init": "^0.78.0", | ||
"@commitlint/cli": "^7.4.0", | ||
"@commitlint/config-conventional": "^7.3.1", | ||
"@oclif/tslint": "^3.1.1", | ||
"@types/jest": "^23.3.13", | ||
"@types/lodash.merge": "^4.6.5", | ||
"@types/node": "^10.12.19", | ||
"commitlint": "^7.4.0", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"husky": "^1.3.1", | ||
"jest": "^24.0.0", | ||
"lint-staged": "^8.1.1", | ||
"prettier": "^1.16.2", | ||
"ts-jest": "^24.0.0", | ||
"tslint": "^5.12.1", | ||
"tslint-config-prettier": "^1.17.0", | ||
"typescript": "^3.2.4" | ||
"typescript": "^3.3.3333" | ||
}, | ||
@@ -46,5 +33,6 @@ "scripts": { | ||
"dependencies": { | ||
"@bearer/intents": "^0.99.0", | ||
"lodash.merge": "^4.6.1" | ||
}, | ||
"gitHead": "c3f5144aa6c0cddc9d4341051cba3fb7b88f263e" | ||
"gitHead": "f940327ddcfb8d1956bc3ca20aa2b420e95ed9aa" | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
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
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7
432
19820
2
1
2
+ Added@bearer/intents@^0.99.0