Commit beadd753 authored by cazenave's avatar cazenave
Browse files

swagger form suite

parent 0476d3e9
......@@ -93,23 +93,32 @@ paths: \n\
text = fileReader.result as string;
lines = text.split("\n");
let j = 1;
for ( let i = 0; i < lines.length; i++) {
line = lines[i].split(": ");
if (line[0].trim() == "description") {
map.set("description"+j,line[1]);
j++;
} else {
map.set(line[0].trim(),line[1]);
}
console.log(line);
}
console.log(map);
this.Form.setValue({
title: map.get('title'),
description: map.get('description'),
description: map.get('description1'),
version: map.get('version'),
url: map.get('- url'),
urldescription: map.get('description'),
urldescription: map.get('description2'),
paths: '',
verb: '',
summary: map.get('summary'),
verbdescription: map.get('description'),
verbdescription: map.get('description3'),
responses: '',
responsedescription: map.get('description'),
responsedescription: map.get('description4'),
content: '',
schema: map.get('schema'),
items: map.get('items'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment