swagger: "2.0"
info:
  version: "0.0.1"
  title: Example Service
  contact:
    name:       Orange
    email:      support@mymail.com
  description: It's a example service

host: helloworld.com
# basePath prefixes all resource paths 
basePath: /
# 
schemes:
  - https
# format of bodies a client can send (Content-Type)
consumes:
  - application/json
# format of the responses to the client (Accepts)
produces:
  - application/json
paths:
  /helloworld:
    get:
      description: Returns 'Hello' to the caller
      # used as the method name of the controller
      operationId: helloworld
      responses:
        "200":
          description: Success
          schema:
            # a pointer to a definition
            $ref: "#/definitions/HelloWorldResponse"
        # responses may fall through to errors
        default:
          description: Error
          schema:
            $ref: "#/definitions/ErrorResponse"


# complex objects have schema definitions
definitions:
  HelloWorldResponse:
    required:
      - message
    properties:
      message:
        type: string
  ErrorResponse:
    required:
      - message
    properties:
      message:
        type: string
      error:
        type: string
      result:
        type: string