Skip to content

Commit

Permalink
ignore vendor extensions in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed May 7, 2020
1 parent 3f2f1a3 commit a82154d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/openapi.spec.loader.ts
Expand Up @@ -84,7 +84,7 @@ export class OpenApiSpecLoader {
const bp = bpa.replace(/\/$/, '');
for (const [path, methods] of Object.entries(apiDoc.paths)) {
for (const [method, schema] of Object.entries(methods)) {
if (['parameters', 'summary', 'description'].includes(method)) {
if (method.startsWith('x-') || ['parameters', 'summary', 'description'].includes(method)) {
continue;
}
const schemaParameters = new Set();
Expand Down
2 changes: 2 additions & 0 deletions test/resources/serialized.objects.yaml
Expand Up @@ -9,7 +9,9 @@ servers:

paths:
/deep_object:
x-vendorExtension1: accounts
get:
x-vendorExtension2: accounts
summary: "retrieve a deep object"
operationId: getDeepObject
parameters:
Expand Down

0 comments on commit a82154d

Please sign in to comment.