Skip to content

Commit

Permalink
fix: use name instead of description as field label.
Browse files Browse the repository at this point in the history
description can be too long
  • Loading branch information
albanm committed Mar 14, 2017
1 parent b0f9f98 commit 87b72e3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions OpenApi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,20 @@

<div v-for="parameter in selectedEntry.parameters">
<md-input-container v-if="(parameter.schema.type === 'string' || parameter.schema.type === 'integer' || parameter.schema.type === 'number') && !parameter.schema.enum">
<label>{{parameter.description}}</label>
<md-input v-model="currentRequest.params[parameter.name]" :type="parameter.schema.type === 'string' ? 'text' : 'number'" :placeholder="parameter.name"></md-input>
<label>{{parameter.name}}</label>
<md-input v-model="currentRequest.params[parameter.name]" :type="parameter.schema.type === 'string' ? 'text' : 'number'"></md-input>
</md-input-container>

<md-input-container v-if="parameter.schema.enum">
<label>{{parameter.description}}</label>
<md-select v-model="currentRequest.params[parameter.name]" :placeholder="parameter.name">
<label>{{parameter.name}}</label>
<md-select v-model="currentRequest.params[parameter.name]">
<md-option v-for="val in parameter.schema.enum" :value="val">{{val}}</md-option>
</md-select>
</md-input-container>

<md-input-container v-if="parameter.schema.type === 'array' && parameter.schema.items.enum">
<label>{{parameter.description}}</label>
<md-select v-model="currentRequest.params[parameter.name]" multiple :placeholder="parameter.name">
<label>{{parameter.name}}</label>
<md-select v-model="currentRequest.params[parameter.name]" multiple>
<md-option v-for="val in parameter.schema.items.enum" :value="val">{{val}}</md-option>
</md-select>
</md-input-container>
Expand All @@ -168,7 +168,7 @@
<template scope="chip">{{ chip.value }}</template>
</md-chips>

<md-checkbox v-if="parameter.schema.type === 'boolean'" v-model="currentRequest.params[parameter.name]">{{parameter.name}}<md-tooltip md-direction="top">{{parameter.description}}</md-tooltip></md-checkbox>
<md-checkbox v-if="parameter.schema.type === 'boolean'" v-model="currentRequest.params[parameter.name]">{{parameter.name}}</md-checkbox>

</div>
</form>
Expand Down

0 comments on commit 87b72e3

Please sign in to comment.