Demo entry 6350776

wu

   

Submitted by anonymous on Mar 14, 2017 at 17:34
Language: YAML. Code size: 2.1 kB.

swagger: '2.0'
info:
  version: "1"
  title: Weather Underground
host: api.wunderground.com
schemes:
  - http
basePath: /api
paths:
  /forecast10day/q/{state}/{city}: 
    get:
      tags: 
        - weather 
        - daily
      description: Restituisce il meteo del giorno
      parameters:
        - name: state
          in: path
          description: Nome dello stato
          required: true
          type: string
        - name: city
          in: path
          description: Nome della città 
          required: true
          type: string
      responses:
        200:
          description: Successful response
          schema:
            title: result
            type: object
            properties:
                date:
                  type: string
                location: 
                  $ref: '#/definitions/Location'
                forecast:
                  x-classAnnotation: dbr:Weather_Forecasting
                  $ref: '#/definitions/Forecast10'

definitions:
  Location:
    type: object
    properties:
      city: 
        type: string
      state:
        type: string
      country:  
        type: string
      zip_code:
        type: number
      latitude:
        type: number
      longitude:
        type: number
      elevation:
        type: number
            
  Forecast10:
    type: array
    items:
      type: object
      properties:
        weather:
          type: string
        temperature:
          type: object
          properties:
            celsius:
              type: number
            fahrenheit:
              type: number
        precipitation:
          type: string
        wind:
          type: object
          properties:
            kmH:
              type: number
            knot: 
              type: number
            direction:
              type: string
        humidity:
          type: number
        pression:
          type: number
        visibility:
          type: object
          properties:
            km:
              type: number
            mile:
              type: number

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).