diff --git a/src/OpenApi.vue b/src/OpenApi.vue index 2aaaa69..f605b6d 100644 --- a/src/OpenApi.vue +++ b/src/OpenApi.vue @@ -35,7 +35,7 @@ {{tag}} - + {{entry.method}} @@ -50,22 +50,32 @@ - - {{selectedEntry.summary}} - - Make request - - - - - Parameters - - - Responses - - + {{selectedEntry.summary}} + {{selectedEntry.method.toUpperCase()}} {{api.servers[0].url + selectedEntry.path}} + + + Parameters + + Responses + + + + + + Request + + + Execute + + + + + Response + {{currentResponse}} + + + + @@ -91,30 +101,6 @@ - - - - {{selectedEntry && selectedEntry.method.toUpperCase()}} {{selectedEntry && selectedEntry.path}} - - - close - - - - - Request - - - Request - - - Response - -{{currentResponse}} - - - - @@ -125,10 +111,6 @@ height:100%; } -.openapi .md-right .md-sidenav-content { - width: 500px; -} - .openapi #request-form { padding: 16px; } @@ -199,7 +181,7 @@ export default { reset(entry) { this.currentRequest.params = {}; (entry.parameters || []).forEach(p => { - this.currentRequest.params[p.name] = (p.in === 'query' && this.queryParams && this.queryParams[p.name]) || (p.in === 'header' && this.headers && this.headers[p.name]) + this.currentRequest.params[p.name] = (p.in === 'query' && this.queryParams && this.queryParams[p.name]) || (p.in === 'header' && this.headers && this.headers[p.name]) || null if (!this.currentRequest.params[p.name]) { if (p.schema && p.schema.enum) { this.currentRequest.params[p.name] = p.schema.enum[0] @@ -230,14 +212,6 @@ export default { this.currentExamples = examples this.$refs.examplesDialog.open() }, - openSidenav() { - this.reset(this.selectedEntry) - this.currentResponse = '' - this.$refs.sidenav.open() - }, - closeSidenav() { - this.$refs.sidenav.close() - }, request() { this.currentResponse = '' fetch(this.currentRequest, this.selectedEntry, this.api).then(res => {
{{currentResponse}}
-{{currentResponse}} -