Module: Scorpio::OpenAPI::V3_0::Document
- Includes:
- Document::V3Methods
- Defined in:
- lib/scorpio/openapi/v3_0.rb
Overview
A document that defines or describes an API conforming to the OpenAPI Specification v3.0.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#oasObject
Instance Attribute Summary
Attributes included from Document::Configurables
#accept, #authorization, #faraday_adapter, #faraday_builder, #logger, #request_headers, #user_agent
Attributes included from Document::V3Methods::Configurables
#base_url, #request_media_type, #server, #server_variables
Instance Method Summary collapse
-
#components_schemas ⇒ #to_hash
/components/schemas, if present, or an empty hash.
Methods included from Document
#each_operation, from_instance, new_document, #operations, #title, #v2?, #v3?
Methods included from Document::V3Methods::Configurables
Instance Method Details
#components_schemas ⇒ #to_hash
Returns /components/schemas, if present, or an empty hash.
89 90 91 92 93 |
# File 'lib/scorpio/openapi/v3_0.rb', line 89 def components_schemas return JSI::Util::EMPTY_HASH unless key?('components') && components.respond_to?(:to_hash) return JSI::Util::EMPTY_HASH unless components.key?('schemas') && components.schemas.respond_to?(:to_hash) components.schemas end |