Module: DoctorSwagger

Defined in:
lib/doctor_swagger/root_swagger_doc.rb,
lib/doctor_swagger.rb,
lib/doctor_swagger/errors.rb,
lib/doctor_swagger/version.rb,
lib/doctor_swagger/endpoint.rb,
lib/doctor_swagger/operation.rb,
lib/doctor_swagger/parameter.rb,
lib/doctor_swagger/post_body.rb,
lib/doctor_swagger/swagger_doc.rb,
lib/doctor_swagger/error_response.rb,
lib/doctor_swagger/path_parameter.rb,
lib/doctor_swagger/post_parameter.rb,
lib/doctor_swagger/query_parameter.rb,
lib/doctor_swagger/header_parameter.rb

Overview

TODO: specme

Defined Under Namespace

Modules: ClassMethods, Errors Classes: Endpoint, ErrorResponse, HeaderParameter, Operation, Parameter, PathParameter, PostBody, PostParameter, QueryParameter, RootSwaggerDoc, SwaggerDoc

Constant Summary collapse

VERSION =
"0.2.0"

Class Method Summary collapse

Class Method Details

.api_versionObject



20
21
22
# File 'lib/doctor_swagger.rb', line 20

def self.api_version
  @api_version ||= lambda { raise 'Set your API version with DoctorSwagger.api_version= or at the resource level'}
end

.api_version=(version) ⇒ Object



32
33
34
# File 'lib/doctor_swagger.rb', line 32

def self.api_version=(version)
  @api_version = version
end

.base_pathObject



24
25
26
# File 'lib/doctor_swagger.rb', line 24

def self.base_path
  @base_path ||= lambda { raise 'Set your base URL with DoctorSwagger.base_path= or at the resource level'}
end

.base_path=(url) ⇒ Object



36
37
38
# File 'lib/doctor_swagger.rb', line 36

def self.base_path=(url)
  @base_path = url
end

.included(receiver) ⇒ Object



74
75
76
# File 'lib/doctor_swagger.rb', line 74

def self.included(receiver)
  receiver.extend(ClassMethods)
end

.swagger_versionObject

global settings, override with DSL



16
17
18
# File 'lib/doctor_swagger.rb', line 16

def self.swagger_version
  @swagger_version ||= '1.0'
end

.swagger_version=(version) ⇒ Object



28
29
30
# File 'lib/doctor_swagger.rb', line 28

def self.swagger_version=(version)
  @swagger_version = version
end