I just posted on SO but some older answers were redirecting here, so if 
anyone could help me out, this is the first time I am using swagger and 
it's a bit overwhelming.

Since it is vacation time, I have to complete a teammates task. He was 
using swagger to describe the API I program.

We now have a much more complex method in our API and I am having trouble 
how to describe the following json:

{
  "sql": [
    {
      "sql": 1,
      "id": "12345"
    },
    {
      "mysql": 0.75,
      "id": "222222"
    },
    {
      "nosql": 0.75,
      "id": "3333333"
    }
  ],
  "pithon": [
    {
      "python": 0.8333333333333334,
      "id": "4444444"
    }
  ]}

In our documentation. We are using swagger 2.3 as far as I can tell by this 
program line he told me to execute : java -jar 
swagger-codegen-cli-2.3.1.jar generate -i swagger.json -l html

And this is an example of what we were doing so far:

[...],
    "id" : {
      "type" : "object",
      "properties" : {
        "id" : {
          "type" : "string",
          "description" : "identification"
        },
        "name" : {
          "type" : "string",
          "description" : "name"
        }
      },
      "example" : {
        "id_value" : "5",
        "name_value": "value 1"
      }
    },
 [...]

I would like to know how to make this more complex json response work in 
the swagger documentation since I am following this 
<https://stackoverflow.com/q/26206685/6028947> as an example, and reading 
the documentation is not making it any more clear (partially because almost 
everything I find is in YAML, not json).

This is what I got so far, but I get all sort of errors

"skills" : {
    "type" : "array",
    "properties" : {
        "skill_input" : {
            "type" : "object",
            "properties" : {
                "skill_possible_name" : {
                    "type" : "array",
                    "properties" : {
                        "type" : "string",
                        "description" : "description 11"
                        }
                    }
                }
            }
        }
    }

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to