Created
April 10, 2018 23:58
-
-
Save KuroNoDev/b91d56268d1089fc598453ef5017b171 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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