Class: RatPackSwagger::SwaggerOperation

Inherits:
Object
  • Object
show all
Includes:
SwaggerType
Defined in:
lib/swagger_spec.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SwaggerType

#to_h

Constructor Details

#initializeSwaggerOperation

Returns a new instance of SwaggerOperation.



28
29
30
31
32
33
34
35
36
# File 'lib/swagger_spec.rb', line 28

def initialize
  @tags = []
  @consumes = []
  @produces = []
  @parameters = []
  @responses = {}
  @schemes = []
  @security = []
end

Instance Attribute Details

#consumesObject

Returns the value of attribute consumes.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def consumes
  @consumes
end

#deprecatedObject

Returns the value of attribute deprecated.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def deprecated
  @deprecated
end

#descriptionObject

Returns the value of attribute description.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def description
  @description
end

#externalDocsObject

Returns the value of attribute externalDocs.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def externalDocs
  @externalDocs
end

#parametersObject

Returns the value of attribute parameters.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def parameters
  @parameters
end

#producesObject

Returns the value of attribute produces.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def produces
  @produces
end

#responsesObject

Returns the value of attribute responses.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def responses
  @responses
end

#schemesObject

Returns the value of attribute schemes.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def schemes
  @schemes
end

#securityObject

Returns the value of attribute security.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def security
  @security
end

#summaryObject

Returns the value of attribute summary.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def summary
  @summary
end

#tagsObject

Returns the value of attribute tags.



25
26
27
# File 'lib/swagger_spec.rb', line 25

def tags
  @tags
end

Instance Method Details

#swagger?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/swagger_spec.rb', line 38

def swagger?
  to_h != {}
end