title: Swagger 3.0.0 codegen failed java.lang.RuntimeException: missing swagger input or config
body: <p>I am specifying my APIs using swagger I was using 2.0 now there is new version 3.0.0 according to the documentation I have specified 3.0.0 specification using offline swagger editor. Once it was ready I downloaded json file using which I am going to generate spring server code. I downloaded the <a href="https://github.com/swagger-api/swagger-codegen" rel="noreferrer">swagger-codegen</a></p>
  
  <p>Built it using <code>mvn clean package</code> then I executed following command :</p>
  
  <pre><code>java -jar &lt;PARENT_DIR&gt;/swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -i &lt;PARENT_DIR&gt;/ServerCode/swagger.json -l spring -o &lt;PARENT_DIR&gt;/ServerCode
  </code></pre>
  
  <p>Above command gives following error to me :</p>
  
  <pre><code>[main] INFO io.swagger.parser.Swagger20Parser - reading from swagger.json
  [main] INFO io.swagger.parser.Swagger20Parser - reading from swagger.json
  [main] INFO io.swagger.codegen.ignore.CodegenIgnoreProcessor - No .swagger-codegen-ignore file found.
  Exception in thread "main" java.lang.RuntimeException: missing swagger input or config!
          at io.swagger.codegen.DefaultGenerator.generate(DefaultGenerator.java:723)
          at io.swagger.codegen.cmd.Generate.run(Generate.java:285)
          at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:35)
  </code></pre>
  
  <p><strong>Update :</strong> </p>
  
  <p>My swagger.json file as follows ( This is my trial project hence I have pasted my api structure here ):</p>
  
  <pre><code>{
    "openapi": "3.0.0",
    "info": {
      "version": "1.0.0",
      "title": "User Example",
      "license": {
        "name": "MIT"
      }
    },
    "servers": [
      {
        "url": "http://www.example.com//v1"
      }
    ],
    "paths": {
      "/user": {
        "post": {
          "summary": "API to create a new User",
          "operationId": "createUser",
          "tags": [
            "user"
          ],
          "security": [
            {
              "bearerAuth": []
            }
          ],
          "requestBody": {
            "description": "User data to be created",
            "required": true,
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "responses": {
            "200": {
              "description": "Newly created User data",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            },
            "404": {
              "description": "Unexpected Error",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/AuthError"
                  }
                }
              }
            },
            "500": {
              "description": "Unexpected Error",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/InternalServerError"
                  }
                }
              }
            },
            "default": {
              "description": "Unexpected Error",
              "content": {
                "application/json": {
                  "schema": {
                    "$ref": "#/components/schemas/UnexpectedError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "components": {
      "schemas": {
        "User": {
          "required": [
            "id",
            "fname",
            "email"
          ],
          "properties": {
            "id": {
              "type": "integer",
              "format": "int64"
            },
            "fname": {
              "type": "string"
            },
            "lname": {
              "type": "string"
            },
            "email": {
              "type": "string",
              "format": "email"
            },
            "phone": {
              "type": "string"
            }
          }
        },
        "UnexpectedError": {
          "properties": {
            "message": {
              "type": "string",
              "example": "Something went wrong"
            }
          }
        },
        "AuthError": {
          "properties": {
            "message": {
              "type": "string",
              "example": "Authorization failed"
            }
          }
        },
        "InternalServerError": {
          "properties": {
            "message": {
              "type": "string",
              "example": "There is server side error while processing your request"
            }
          }
        }
      },
      "securitySchemes": {
        "bearerAuth": {
          "type": "http",
          "scheme": "bearer",
          "bearerFormat": "JWT"
        }
      }
    }
  }
  </code></pre>
  
  <p>I have tried building the code-gen-cli on <a href="https://github.com/swagger-api/swagger-codegen/tree/3.0.0" rel="noreferrer">3.0.0</a> branch also which is giving same error.</p>