@pactflow/openapi-pact-comparator 1.5.0 → 1.5.1
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/dist/cli.cjs +8 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -3707,7 +3707,7 @@ const minimumSchema = (originalSchema, oas) => {
|
|
|
3707
3707
|
const ref = refToAdd.shift();
|
|
3708
3708
|
const path = splitPath(ref);
|
|
3709
3709
|
refAdded.push(ref);
|
|
3710
|
-
const subschema = cloneDeep(get$1(oas, path));
|
|
3710
|
+
const subschema = cloneDeep(get$1(oas, path, {}));
|
|
3711
3711
|
delete subschema.description;
|
|
3712
3712
|
delete subschema.example;
|
|
3713
3713
|
traverse(subschema, collectReferences);
|
|
@@ -7621,9 +7621,9 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7621
7621
|
}
|
|
7622
7622
|
for (const schemeName of Object.keys(scheme)) {
|
|
7623
7623
|
const scheme = securitySchemes[schemeName];
|
|
7624
|
-
switch (scheme?.type) {
|
|
7625
|
-
case "
|
|
7626
|
-
switch (scheme.in) {
|
|
7624
|
+
switch (scheme?.type?.toLowerCase()) {
|
|
7625
|
+
case "apikey":
|
|
7626
|
+
switch (scheme.in.toLowerCase()) {
|
|
7627
7627
|
case "header":
|
|
7628
7628
|
if (requestHeaders.has(scheme.name)) {
|
|
7629
7629
|
isSecured = true;
|
|
@@ -7718,7 +7718,7 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7718
7718
|
isValidSchema = requestHeaders.get("authorization") !== null;
|
|
7719
7719
|
}
|
|
7720
7720
|
else {
|
|
7721
|
-
switch (scheme.scheme) {
|
|
7721
|
+
switch (scheme.scheme.toLowerCase()) {
|
|
7722
7722
|
case "basic":
|
|
7723
7723
|
isValidSchema = auth.toLowerCase().startsWith("basic ");
|
|
7724
7724
|
break;
|
|
@@ -7750,9 +7750,9 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7750
7750
|
}
|
|
7751
7751
|
break;
|
|
7752
7752
|
}
|
|
7753
|
-
case "
|
|
7753
|
+
case "mutualtls":
|
|
7754
7754
|
case "oauth2":
|
|
7755
|
-
case "
|
|
7755
|
+
case "openidconnect":
|
|
7756
7756
|
// nothing can be validated, assume meets security requirements
|
|
7757
7757
|
isSecured = true;
|
|
7758
7758
|
break;
|