Skip to content

Commit

Permalink
Initialize te OpenAPI completer correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Jan 17, 2020
1 parent 0eea20c commit 701fc6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/completers/openapi.js
Expand Up @@ -17,6 +17,10 @@ class OpenAPIPlugin {
this.paths = []
this.methods = []
this.pathsByMethod = {}
this.paths = []
this.schemaByPathMethod = {}
this.schemaPropertiesByPathMethod = {}
this.methods = []
}

async onstart (httpConsole) {
Expand All @@ -38,8 +42,6 @@ class OpenAPIPlugin {

if (spec) {
this.paths = Object.keys(this.spec.paths)
this.schemaByPathMethod = {}
this.schemaPropertiesByPathMethod = {}

for (const [path, methods] of Object.entries(this.spec.paths)) {
for (const method of Object.keys(methods)) {
Expand Down

0 comments on commit 701fc6d

Please sign in to comment.