@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.mjs
CHANGED
|
@@ -3705,7 +3705,7 @@ const minimumSchema = (originalSchema, oas) => {
|
|
|
3705
3705
|
const ref = refToAdd.shift();
|
|
3706
3706
|
const path = splitPath(ref);
|
|
3707
3707
|
refAdded.push(ref);
|
|
3708
|
-
const subschema = cloneDeep(get$1(oas, path));
|
|
3708
|
+
const subschema = cloneDeep(get$1(oas, path, {}));
|
|
3709
3709
|
delete subschema.description;
|
|
3710
3710
|
delete subschema.example;
|
|
3711
3711
|
traverse(subschema, collectReferences);
|
|
@@ -7619,9 +7619,9 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7619
7619
|
}
|
|
7620
7620
|
for (const schemeName of Object.keys(scheme)) {
|
|
7621
7621
|
const scheme = securitySchemes[schemeName];
|
|
7622
|
-
switch (scheme?.type) {
|
|
7623
|
-
case "
|
|
7624
|
-
switch (scheme.in) {
|
|
7622
|
+
switch (scheme?.type?.toLowerCase()) {
|
|
7623
|
+
case "apikey":
|
|
7624
|
+
switch (scheme.in.toLowerCase()) {
|
|
7625
7625
|
case "header":
|
|
7626
7626
|
if (requestHeaders.has(scheme.name)) {
|
|
7627
7627
|
isSecured = true;
|
|
@@ -7716,7 +7716,7 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7716
7716
|
isValidSchema = requestHeaders.get("authorization") !== null;
|
|
7717
7717
|
}
|
|
7718
7718
|
else {
|
|
7719
|
-
switch (scheme.scheme) {
|
|
7719
|
+
switch (scheme.scheme.toLowerCase()) {
|
|
7720
7720
|
case "basic":
|
|
7721
7721
|
isValidSchema = auth.toLowerCase().startsWith("basic ");
|
|
7722
7722
|
break;
|
|
@@ -7748,9 +7748,9 @@ function* compareReqSecurity(ajv, route, interaction, index, config) {
|
|
|
7748
7748
|
}
|
|
7749
7749
|
break;
|
|
7750
7750
|
}
|
|
7751
|
-
case "
|
|
7751
|
+
case "mutualtls":
|
|
7752
7752
|
case "oauth2":
|
|
7753
|
-
case "
|
|
7753
|
+
case "openidconnect":
|
|
7754
7754
|
// nothing can be validated, assume meets security requirements
|
|
7755
7755
|
isSecured = true;
|
|
7756
7756
|
break;
|