Skip to content
Snippets Groups Projects
Commit 50fb7129 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

refactor(schema): move description first

parent 82a9263d
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ const properties = {}; ...@@ -22,6 +22,9 @@ const properties = {};
function createSingleConfig(option) { function createSingleConfig(option) {
const temp = {}; const temp = {};
if (option.description) {
temp.description = option.description;
}
temp.type = types[option.type]; temp.type = types[option.type];
if (temp.type === 'object') { if (temp.type === 'object') {
temp.$ref = '#'; temp.$ref = '#';
...@@ -37,9 +40,6 @@ function createSingleConfig(option) { ...@@ -37,9 +40,6 @@ function createSingleConfig(option) {
if (option.format && temp.type !== 'array') { if (option.format && temp.type !== 'array') {
temp.format = option.format; temp.format = option.format;
} }
if (option.description) {
temp.description = option.description;
}
if (option.default !== undefined) { if (option.default !== undefined) {
temp.default = option.default; temp.default = option.default;
} }
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment