Class: OasCore::Spec::Specification
- Inherits:
-
Object
- Object
- OasCore::Spec::Specification
- Includes:
- Specable
- Defined in:
- lib/oas_core/spec/specification.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
Returns the value of attribute components.
-
#external_docs ⇒ Object
Returns the value of attribute external_docs.
-
#info ⇒ Object
Returns the value of attribute info.
-
#openapi ⇒ Object
Returns the value of attribute openapi.
-
#paths ⇒ Object
Returns the value of attribute paths.
-
#servers ⇒ Object
Returns the value of attribute servers.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize ⇒ Specification
constructor
A new instance of Specification.
- #oas_fields ⇒ Object
-
#security ⇒ Object
Create the Security Requirement Object.
Methods included from Specable
Constructor Details
#initialize ⇒ Specification
Returns a new instance of Specification.
11 12 13 14 15 16 17 18 19 |
# File 'lib/oas_core/spec/specification.rb', line 11 def initialize @components = Components.new(self) @info = OasCore.config.info @openapi = '3.1.0' @servers = OasCore.config.servers @tags = OasCore.config. @external_docs = {} @paths = Spec::Paths.new(self) end |
Instance Attribute Details
#components ⇒ Object
Returns the value of attribute components.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def components @components end |
#external_docs ⇒ Object
Returns the value of attribute external_docs.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def external_docs @external_docs end |
#info ⇒ Object
Returns the value of attribute info.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def info @info end |
#openapi ⇒ Object
Returns the value of attribute openapi.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def openapi @openapi end |
#paths ⇒ Object
Returns the value of attribute paths.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def paths @paths end |
#servers ⇒ Object
Returns the value of attribute servers.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def servers @servers end |
#tags ⇒ Object
Returns the value of attribute tags.
9 10 11 |
# File 'lib/oas_core/spec/specification.rb', line 9 def @tags end |
Instance Method Details
#oas_fields ⇒ Object
21 22 23 |
# File 'lib/oas_core/spec/specification.rb', line 21 def oas_fields %i[openapi info servers paths components security tags external_docs] end |