Class: R2OAS::AppConfiguration::Swagger::UI
- Inherits:
-
Object
- Object
- R2OAS::AppConfiguration::Swagger::UI
- Defined in:
- lib/r2-oas/app_configuration/swagger/ui.rb
Constant Summary collapse
- DEFAULT_IMAGE =
'swaggerapi/swagger-ui'- DEFAULT_PORT =
'8080'- DEFAULT_EXPOSED_PORT =
'8080/tcp'- DEFAULT_VOLUME =
'/app/swagger.json'- DEFAULT_HOST =
Fixed
'http://localhost'- VALID_OPTIONS_KEYS =
i[ image port exposed_port volume ].freeze
Instance Method Summary collapse
- #configure {|_self| ... } ⇒ Object
-
#initialize ⇒ UI
constructor
A new instance of UI.
- #url ⇒ Object
Constructor Details
#initialize ⇒ UI
Returns a new instance of UI.
22 23 24 |
# File 'lib/r2-oas/app_configuration/swagger/ui.rb', line 22 def initialize set_default end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
26 27 28 |
# File 'lib/r2-oas/app_configuration/swagger/ui.rb', line 26 def configure yield self end |
#url ⇒ Object
30 31 32 |
# File 'lib/r2-oas/app_configuration/swagger/ui.rb', line 30 def url "#{DEFAULT_HOST}:#{port}" end |