json2code.py: support swagger 2.0 format
json2code.py: support swagger 2.0 format

The swagger 2.0 is not backward compatibil to 1.2

This patch, modify the json2code, so it will identify that a given
file is part of 2.0 json file and will make it similar to 1.2

As 2.0 format expect a single file, each API will have a file with all
the paths and optionally an additional file with models definitions.

The json2code will wrap the content with braces to make them a legal json
object that the json formatter can support.

Signed-off-by: Amnon Heiman <ed5fc74c4692051ad0b19749fd7cea6ec2d74b9e@scylladb.com>
Message-Id: <20171212091649.13100-1-ed5fc74c4692051ad0b19749fd7cea6ec2d74b9e@scylladb.com>

scylladb/seastar,dreamsxin/seastar,dreamsxin/seastar,scylladb/seastar,syuu1228/seastar,avikivity/seastar,avikivity/seastar,dreamsxin/seastar,syuu1228/seastar,scylladb/seastar,avikivity/seastar,syuu1228/seastar,cloudius-systems/seastar,cloudius-systems/seastar,cloudius-systems/seastar