Skip to content

Instantly share code, notes, and snippets.

@KuroNoDev
Created March 27, 2018 06:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KuroNoDev/bf7561ed1424087a4fa69b7387a3c397 to your computer and use it in GitHub Desktop.
Save KuroNoDev/bf7561ed1424087a4fa69b7387a3c397 to your computer and use it in GitHub Desktop.
validation.json
{
"openapi" : "3.0.1",
"info" : {
"title" : "Http Client Mock Endpoints",
"license" : {
"name" : "W3C"
},
"version" : "1.0-SNAPSHOT"
},
"externalDocs" : {
"url" : "http://example.com"
},
"servers" : [ {
"url" : "http://localhost:8080/api/sample/mock-api",
"description" : "Integrate"
} ],
"tags" : [ ],
"paths" : {
"/weather/current" : {
"get" : {
"tags" : [ ],
"externalDocs" : {
"url" : "http://example.com"
},
"operationId" : "httpClient.mockApis.weather.GenerateCurrentWeather",
"parameters" : [ {
"name" : "city",
"in" : "query",
"description" : "City to get the weather from",
"required" : false,
"allowEmptyValue" : true,
"schema" : {
"type" : "string",
"description" : "City to get the weather from",
"nullable" : true
}
}, {
"name" : "country",
"in" : "query",
"description" : "Country of the city to get the weather from",
"required" : false,
"allowEmptyValue" : true,
"schema" : {
"type" : "string",
"description" : "Country of the city to get the weather from",
"nullable" : true
}
} ],
"responses" : {
"default" : {
"description" : "Gloop model output containing the response of this service",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/httpClient_model_GetCurrentWeatherOutput"
}
}
}
}
}
}
},
"/post" : {
"post" : {
"tags" : [ ],
"externalDocs" : {
"url" : "http://example.com"
},
"operationId" : "httpClient.mockApis.postData.ReturnPostData",
"responses" : {
"default" : {
"description" : "The request details",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/httpClient_model_PostHelloWorldOutput"
}
}
}
}
}
}
},
"/forecast/{city}/{country}" : {
"get" : {
"tags" : [ ],
"externalDocs" : {
"url" : "http://example.com"
},
"operationId" : "httpClient.mockApis.weather.GenerateWeatherForecast",
"parameters" : [ {
"name" : "city",
"in" : "path",
"description" : "City to get the weather from",
"required" : false,
"schema" : {
"maxLength" : 2,
"minLength" : 2,
"type" : "string",
"description" : "City to get the weather from"
}
}, {
"name" : "country",
"in" : "path",
"description" : "Country of the city to get the weather from",
"required" : false,
"allowEmptyValue" : true,
"schema" : {
"type" : "string",
"description" : "Country of the city to get the weather from",
"nullable" : true
}
} ],
"responses" : {
"default" : {
"description" : "Gloop model output containing the response of this service",
"content" : {
"*/*" : {
"schema" : {
"$ref" : "#/components/schemas/httpClient_model_GetWeatherForecastOutput"
}
}
}
}
}
}
},
"/dwad" : { }
},
"components" : {
"schemas" : {
"httpClient_model_PostHelloWorldOutput" : {
"properties" : {
"data" : {
"type" : "string",
"nullable" : true
},
"form" : {
"properties" : {
"message" : {
"type" : "string",
"nullable" : true
}
},
"nullable" : true
},
"headers" : {
"properties" : {
"Accept" : {
"type" : "string",
"nullable" : true
},
"Accept-Encoding" : {
"type" : "string",
"nullable" : true
},
"Connection" : {
"type" : "string",
"nullable" : true
},
"Content-Length" : {
"type" : "string",
"nullable" : true
},
"Content-Type" : {
"type" : "string",
"nullable" : true
},
"Host" : {
"type" : "string",
"nullable" : true
},
"User-Agent" : {
"type" : "string",
"nullable" : true
}
},
"nullable" : true
},
"origin" : {
"type" : "string",
"nullable" : true
},
"url" : {
"type" : "string",
"nullable" : true
},
"message" : {
"type" : "string",
"nullable" : true
}
}
},
"httpClient_model_GetCurrentWeatherOutput" : {
"properties" : {
"location" : {
"properties" : {
"city" : {
"type" : "string",
"nullable" : true
},
"country" : {
"type" : "string",
"nullable" : true
}
},
"nullable" : true
},
"weather" : {
"type" : "string",
"nullable" : true
},
"temperature" : {
"type" : "double",
"nullable" : true
},
"cod" : {
"type" : "integer",
"format" : "int32",
"nullable" : true
},
"message" : {
"type" : "string",
"nullable" : true
}
}
},
"httpClient_model_GetWeatherForecastOutput" : {
"properties" : {
"city" : {
"type" : "string",
"nullable" : true
},
"country" : {
"type" : "string",
"nullable" : true
},
"daily" : {
"properties" : {
"summary" : {
"type" : "string",
"nullable" : true
},
"data" : {
"type" : "array",
"nullable" : true,
"items" : {
"properties" : {
"summary" : {
"type" : "string",
"nullable" : true
},
"temperatureHigh" : {
"type" : "integer",
"format" : "int64",
"nullable" : true
},
"temperatureLow" : {
"type" : "integer",
"format" : "int64",
"nullable" : true
}
}
}
}
},
"nullable" : true
},
"error" : {
"type" : "string",
"nullable" : true
}
}
}
},
"securitySchemes" : {
"Bearer" : {
"type" : "http",
"scheme" : "bearer"
},
"OAuth2" : {
"type" : "oauth2",
"flows" : {
"password" : {
"tokenUrl" : "http://localhost:8080/oauth/token",
"scopes" : { }
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment