lib/oas_rails.rb in oas_rails-0.3.0 vs lib/oas_rails.rb in oas_rails-0.4.0

- old
+ new

@@ -4,40 +4,65 @@ module OasRails require "oas_rails/version" require "oas_rails/engine" - autoload :OasBase, "oas_rails/oas_base" autoload :Configuration, "oas_rails/configuration" - autoload :Specification, "oas_rails/specification" autoload :OasRoute, "oas_rails/oas_route" - autoload :Operation, "oas_rails/operation" - autoload :Info, "oas_rails/info" - autoload :Contact, "oas_rails/contact" - autoload :Paths, "oas_rails/paths" - autoload :PathItem, "oas_rails/path_item" - autoload :Parameter, "oas_rails/parameter" - autoload :Tag, "oas_rails/tag" - autoload :License, "oas_rails/license" - autoload :Server, "oas_rails/server" - autoload :RequestBody, "oas_rails/request_body" - autoload :MediaType, "oas_rails/media_type" - autoload :Response, "oas_rails/response" - autoload :Responses, "oas_rails/responses" - autoload :Utils, "oas_rails/utils" autoload :EsquemaBuilder, "oas_rails/esquema_builder" + module Builders + autoload :OperationBuilder, "oas_rails/builders/operation_builder" + autoload :PathItemBuilder, "oas_rails/builders/path_item_builder" + autoload :ResponseBuilder, "oas_rails/builders/response_builder" + autoload :ResponsesBuilder, "oas_rails/builders/responses_builder" + autoload :ContentBuilder, "oas_rails/builders/content_builder" + autoload :ParametersBuilder, "oas_rails/builders/parameters_builder" + autoload :ParameterBuilder, "oas_rails/builders/parameter_builder" + autoload :RequestBodyBuilder, "oas_rails/builders/request_body_builder" + end + + # This module contains all the clases that represent a part of the OAS file. + module Spec + autoload :Hashable, "oas_rails/spec/hashable" + autoload :Specable, "oas_rails/spec/specable" + autoload :Components, "oas_rails/spec/components" + autoload :Parameter, "oas_rails/spec/parameter" + autoload :License, "oas_rails/spec/license" + autoload :Response, "oas_rails/spec/response" + autoload :PathItem, "oas_rails/spec/path_item" + autoload :Operation, "oas_rails/spec/operation" + autoload :RequestBody, "oas_rails/spec/request_body" + autoload :Responses, "oas_rails/spec/responses" + autoload :MediaType, "oas_rails/spec/media_type" + autoload :Paths, "oas_rails/spec/paths" + autoload :Contact, "oas_rails/spec/contact" + autoload :Info, "oas_rails/spec/info" + autoload :Server, "oas_rails/spec/server" + autoload :Tag, "oas_rails/spec/tag" + autoload :Specification, "oas_rails/spec/specification" + autoload :Reference, "oas_rails/spec/reference" + end + module YARD autoload :OasYARDFactory, 'oas_rails/yard/oas_yard_factory' end module Extractors autoload :RenderResponseExtractor, 'oas_rails/extractors/render_response_extractor' autoload :RouteExtractor, "oas_rails/extractors/route_extractor" + autoload :OasRouteExtractor, "oas_rails/extractors/oas_route_extractor" end class << self + def build + oas = Spec::Specification.new + oas.build + + oas.to_spec + end + # Configurations for make the OasRails engine Work. def configure OasRails.configure_yard! yield config end