I create a YAML file, save it as JSON, but when I try to paste the JSON, it gives me errors.
Can you share what errors you're getting? We can't do much with that info.
trivial example (but you'll get an error)
Error
Object
message: "options.definition is required"
code: "UNCAUGHT_SWAY_WORKER_ERROR"
strangely, import -or- dragging-and-dropping the same JSON file loads it fine.
I can not reproduce this issue. Maybe you are using an old version of Swagger Editor.
+1

I have the same problem.
Same error with sample files.
I'm using your website.
On Feb 1, 2016 9:56 PM, "Sahar Jafari" [email protected] wrote:
I can not reproduce this issue. Maybe you are using an old version of
Swagger Editor.—
Reply to this email directly or view it on GitHub
https://github.com/swagger-api/swagger-editor/issues/805#issuecomment-178390262
.
@saharj - I was able to reproduce the problem with the online version.
My bad! There is an error.
I just made a PR to fix this.
I'm sill getting that error at http://editor.swagger.io/#/ when I export a minimal example yaml as JSON, then paste it.
Also am getting it when I paste from https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v2.0/json/api-with-examples.json
Please try clearing your browser cache. I've seen that cause trouble with spurious errors.
Clearing browser cache doesn't help (in Chrome browser on Windows 8.1).
I also can't import a .json file -- after selecting the file the import button is still locked.
@SEWilco This issue has been fixed and will be published on next release very soon.
@saharj Thanks. I'm just puzzled how it was ever broken, as any project using JSON as their standard should have noticed.
Has this fix been pushed? I'm still getting this same error, pasting or uploading a file.
Most helpful comment
Has this fix been pushed? I'm still getting this same error, pasting or uploading a file.