Open barlowm opened 8 years ago
Thank you for the issue, I will take a look
I still don't find a "file" option on the top menu as we find at editor.swagger.io. Am i missing some config?
@DiegoZoracKy , it's not just you, i don't see it too.
I have the same issue.
I have the same issue here, it looks like they just added a portion of the editor, anyway I just added a new npm script and a new dependency to my package.json file:
"devDependencies": { "yamljs": "^0.2.8" }, "scripts": { "start": "node app.js", "test": "swagger project test", "json": "node ./node_modules/yamljs/cli/yaml2json.js ./api/swagger/swagger.yaml > ./public/swagger.json" }
Then you can run npm run json
and you'll have your .json file generated
@yarax - Any further progress on this issue?
I'm working through a QuickStart example in swagger-tools, and after creating the simple project to get the API up and running (swagger project create simple), I opened the editor (swagger project edit) and then tried to import the "Simple Weather API" listing that was listed (which is in JSON format) into the editor but can't. There's no options to open or import any file.
I finally managed to get the JSON example as a YAML file (I went to the online editor http://editor.swagger.io/#/ and imported the Weather API JSON file I'd manually created and exported that as a YAML file). After which the normal swagger project edit brought up the "Simple Weather API" file just fine.
So, is there a simpler way to open (or import) an existing JSON file into a project? Or can the project editor convert to/from JSON/YAML?
Thanks P.S. I originally opened this issue in the swagger-tools repo and was told the issue was a "swagger-node design feature"