swagger: "2.0" info: title: Weather Forecast Service API description: The weather forecast service API produces weather forecasts from US-based IPs. It uses IP location to find the appropriate weather station. version: 1.0.0 host: localhost:80 consumes: - application/json - application/xml - application/gob produces: - application/json - application/xml - application/gob paths: /forecast/{ip}: get: tags: - front summary: forecast front description: Retrieve weather forecast for given IP operationId: front#forecast parameters: - name: ip in: path required: true type: string format: ip responses: "200": description: OK response. schema: $ref: '#/definitions/Forecast' required: - location - periods "400": description: Bad Request response. schema: $ref: '#/definitions/FrontForecastNotUsaResponseBody' schemes: - http /tester/all: post: tags: - front summary: test_all front description: Endpoint for running ALL API Integration Tests for the Weather System, allowing for filtering on included or excluded tests operationId: front#test_all parameters: - name: test_all_request_body in: body required: true schema: $ref: '#/definitions/FrontTestAllRequestBody' responses: "200": description: OK response. schema: $ref: '#/definitions/TestResults' required: - collections - duration - pass_count - fail_count schemes: - http /tester/smoke: post: tags: - front summary: test_smoke front description: Endpoint for running API Integration Tests' Smoke Tests ONLY for the Weather System operationId: front#test_smoke responses: "200": description: OK response. schema: $ref: '#/definitions/TestResults' required: - collections - duration - pass_count - fail_count schemes: - http definitions: Forecast: title: Forecast type: object properties: location: $ref: '#/definitions/Location' periods: type: array items: $ref: '#/definitions/Period' description: Weather forecast periods example: - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F example: location: city: San Francisco lat: 37.8267 long: -122.4233 state: CA periods: - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F required: - location - periods FrontForecastNotUsaResponseBody: title: 'Mediatype identifier: application/vnd.goa.error; view=default' type: object properties: fault: type: boolean description: Is the error a server-side fault? example: true id: type: string description: ID is a unique identifier for this particular occurrence of the problem. example: 123abc message: type: string description: Message is a human-readable explanation specific to this occurrence of the problem. example: parameter 'p' must be an integer name: type: string description: Name is the name of this class of errors. example: bad_request temporary: type: boolean description: Is the error temporary? example: false timeout: type: boolean description: Is the error a timeout? example: false description: IP address is not in the US (default view) example: fault: true id: 123abc message: parameter 'p' must be an integer name: bad_request temporary: false timeout: true required: - name - id - message - temporary - timeout - fault FrontTestAllRequestBody: title: FrontTestAllRequestBody type: object properties: exclude: type: array items: type: string example: Eligendi sequi. description: Tests to exclude example: - Pariatur nam saepe autem dolorem inventore. - Velit eius iste. - Maxime quibusdam in dolor error amet ut. include: type: array items: type: string example: Iste eveniet. description: Tests to run example: - Architecto minima molestiae ad unde. - Porro possimus iste eius minus nesciunt. - Dolores ducimus. example: exclude: - Veritatis nesciunt est officia facere. - Cum est et sit. include: - Saepe nihil cum laboriosam amet consequatur. - Quis sint alias. Location: title: Location type: object properties: city: type: string description: City example: San Francisco lat: type: number description: Latitude example: 37.8267 format: double long: type: number description: Longitude example: -122.4233 format: double state: type: string description: State example: CA description: Geographical location example: city: San Francisco lat: 37.8267 long: -122.4233 state: CA required: - lat - long - city - state Period: title: Period type: object properties: endTime: type: string description: End time example: "2020-01-01T00:00:00Z" format: date-time name: type: string description: Period name example: Morning startTime: type: string description: Start time example: "2020-01-01T00:00:00Z" format: date-time summary: type: string description: Summary example: Clear temperature: type: integer description: Temperature example: 70 format: int64 temperatureUnit: type: string description: Temperature unit example: F description: Weather forecast period example: endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F required: - name - startTime - endTime - temperature - temperatureUnit - summary TestCollection: title: TestCollection type: object properties: duration: type: integer description: Duration of the tests in ms example: 1234 format: int64 fail_count: type: integer description: Number of tests that failed example: 1 format: int64 name: type: string description: Name of the test collection example: Locator Tests pass_count: type: integer description: Number of tests that passed example: 12 format: int64 results: type: array items: $ref: '#/definitions/TestResult' description: Test results example: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true description: Collection of test results for grouping by service example: duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true required: - name - duration - pass_count - fail_count TestResult: title: TestResult type: object properties: duration: type: integer description: Duration of the test in ms example: 1234 format: int64 error: type: string description: Error message if the test failed example: 'error getting location for valid ip: %v' name: type: string description: Name of the test example: TestValidIP passed: type: boolean description: Status of the test example: true description: Test result for a single test example: duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true required: - name - passed - duration TestResults: title: TestResults type: object properties: collections: type: array items: $ref: '#/definitions/TestCollection' description: Test collections example: - duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true duration: type: integer description: Duration of the tests in ms example: 1234 format: int64 fail_count: type: integer description: Number of tests that failed example: 1 format: int64 pass_count: type: integer description: Number of tests that passed example: 12 format: int64 example: collections: - duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 fail_count: 1 name: Locator Tests pass_count: 12 results: - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true - duration: 1234 error: 'error getting location for valid ip: %v' name: TestValidIP passed: true duration: 1234 fail_count: 1 pass_count: 12 required: - collections - duration - pass_count - fail_count