pipermerriam/flex

json load error

lmeroc opened this issue · 3 comments

why i always get the following error:
'type':
- u"Got value None of type null. Value must be of type(s): (u'object',)"

json file contents:
{
"swagger": "2.0",
"info": {
"contact": {
"name": "Group Inc.",
"email": "lxxxxx@xxxxxxxxx.com"
},
"license": {
"name": "CNS"
},
"version": "0.1.0",
"title": "API",
"description": "TODO(description)"
},
"host": "123456",
"basePath": "/",
"schemes": [
"http"
],
"produces": [
"application/xml"
],
"consumes": [
"application/xml"
],
"tags": [
{
"name": "onlineroute"
},
{
"name": "debugroute"
}
],
"paths": {
"/onlineroute": {
"get": {
"tags": [
"onlineroute"
],
"description": "set route status.",
"parameters": [
{
"name": "OP",
"in": "query",
"description": "srs;op of the request.",
"type": "string",
"required": true
},
{
"name": "DriveID",
"in": "query",
"description": "0000000000H004760;drive id of the vehicle.",
"type": "string",
"required": true
},
{
"name": "RouteID",
"in": "query",
"description": "VSB3NlBGQVAMQKCD11;route id of the route",
"type": "string",
"required": true
},
{
"name": "Action",
"in": "query",
"description": "0;status to be set.",
"type": "string",
"required": true
}
],
"responses": {
"200": {
"description": "request successfully.",
"schema": {
"type": "string"
},
"headers": {
"App-Code": {
"description": "status code of the application",
"type": "string"
},
"App-Version": {
"description": "application version",
"type": "string"
},
"Cache-Control": {
"description": "no-store",
"type": "string"
},
"Pragma": {
"description": "no-cache",
"type": "string"
}
}
}
}
}
}
}
}

@lmeroc, can you format the JSON content above and elaborate more on the problem (how did you get to that)?

{
  "swagger":"2.0",
  "info":{
    "contact":{
      "name":"Group Inc.",
      "email":"lxxxxx@xxxxxxxxx.com"
    },
    "license":{
      "name":"CNS"
    },
    "version":"0.1.0",
    "title":"API",
    "description":"TODO(description)"
  },
  "host":"123456",
  "basePath":"/",
  "schemes":[
    "http"
  ],
  "produces":[
    "application/xml"
  ],
  "consumes":[
    "application/xml"
  ],
  "tags":[
    {
      "name":"onlineroute"
    },
    {
      "name":"debugroute"
    }
  ],
  "paths":{
    "/onlineroute":{
      "get":{
        "tags":[
          "onlineroute"
        ],
        "description":"set route status.",
        "parameters":[
          {
            "name":"OP",
            "in":"query",
            "description":"srs;op of the request.",
            "type":"string",
            "required":true
          },
          {
            "name":"DriveID",
            "in":"query",
            "description":"0000000000H004760;drive id of the vehicle.",
            "type":"string",
            "required":true
          },
          {
            "name":"RouteID",
            "in":"query",
            "description":"VSB3NlBGQVAMQKCD11;route id of the route",
            "type":"string",
            "required":true
          },
          {
            "name":"Action",
            "in":"query",
            "description":"0;status to be set.",
            "type":"string",
            "required":true
          }
        ],
        "responses":{
          "200":{
            "description":"request successfully.",
            "schema":{
              "type":"string"
            },
            "headers":{
              "App-Code":{
                "description":"status code of the application",
                "type":"string"
              },
              "App-Version":{
                "description":"application version",
                "type":"string"
              },
              "Cache-Control":{
                "description":"no-store",
                "type":"string"
              },
              "Pragma":{
                "description":"no-cache",
                "type":"string"
              }
            }
          }
        }
      }
    }
  }
}
blag commented

@lmeroc I'm closing this issue since you opened it over two years ago. If you are still having this issue, I'm happy to reopen this issue if you post more information, because it's impossible to troubleshoot your problem given the small amount of information you have posted so far.