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: "" 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/FrontForecastResponseBody' required: - location - periods "400": description: Bad Request response. schema: $ref: '#/definitions/FrontForecastNotUsaResponseBody' schemes: - http definitions: 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: true timeout: type: boolean description: Is the error a timeout? example: true 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: true timeout: false required: - name - id - message - temporary - timeout - fault FrontForecastResponseBody: title: FrontForecastResponseBody type: object properties: location: $ref: '#/definitions/LocationResponseBody' periods: type: array items: $ref: '#/definitions/PeriodResponseBody' 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 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 - endTime: "2020-01-01T00:00:00Z" name: Morning startTime: "2020-01-01T00:00:00Z" summary: Clear temperature: 70 temperatureUnit: F required: - location - periods LocationResponseBody: title: LocationResponseBody 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 PeriodResponseBody: title: PeriodResponseBody 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