Module: SoberSwag

Defined in:
lib/sober_swag.rb,
lib/sober_swag/type.rb,
lib/sober_swag/nodes.rb,
lib/sober_swag/types.rb,
lib/sober_swag/parser.rb,
lib/sober_swag/server.rb,
lib/sober_swag/version.rb,
lib/sober_swag/compiler.rb,
lib/sober_swag/nodes/sum.rb,
lib/sober_swag/reporting.rb,
lib/sober_swag/controller.rb,
lib/sober_swag/nodes/base.rb,
lib/sober_swag/nodes/enum.rb,
lib/sober_swag/nodes/list.rb,
lib/sober_swag/serializer.rb,
lib/sober_swag/type/named.rb,
lib/sober_swag/nodes/array.rb,
lib/sober_swag/input_object.rb,
lib/sober_swag/nodes/binary.rb,
lib/sober_swag/nodes/object.rb,
lib/sober_swag/nodes/one_of.rb,
lib/sober_swag/compiler/path.rb,
lib/sober_swag/compiler/type.rb,
lib/sober_swag/output_object.rb,
lib/sober_swag/compiler/error.rb,
lib/sober_swag/compiler/paths.rb,
lib/sober_swag/nodes/attribute.rb,
lib/sober_swag/nodes/primitive.rb,
lib/sober_swag/reporting/input.rb,
lib/sober_swag/serializer/base.rb,
lib/sober_swag/serializer/hash.rb,
lib/sober_swag/serializer/meta.rb,
lib/sober_swag/controller/route.rb,
lib/sober_swag/reporting/output.rb,
lib/sober_swag/reporting/report.rb,
lib/sober_swag/serializer/array.rb,
lib/sober_swag/serializer/mapped.rb,
lib/sober_swag/types/comma_array.rb,
lib/sober_swag/compiler/primitive.rb,
lib/sober_swag/output_object/view.rb,
lib/sober_swag/reporting/compiler.rb,
lib/sober_swag/output_object/field.rb,
lib/sober_swag/serializer/optional.rb,
lib/sober_swag/reporting/input/base.rb,
lib/sober_swag/reporting/input/bool.rb,
lib/sober_swag/reporting/input/enum.rb,
lib/sober_swag/reporting/input/list.rb,
lib/sober_swag/reporting/input/null.rb,
lib/sober_swag/reporting/input/text.rb,
lib/sober_swag/serializer/primitive.rb,
lib/sober_swag/reporting/input/defer.rb,
lib/sober_swag/reporting/output/base.rb,
lib/sober_swag/reporting/output/bool.rb,
lib/sober_swag/reporting/output/enum.rb,
lib/sober_swag/reporting/output/list.rb,
lib/sober_swag/reporting/output/null.rb,
lib/sober_swag/reporting/output/text.rb,
lib/sober_swag/reporting/report/base.rb,
lib/sober_swag/reporting/report/list.rb,
lib/sober_swag/serializer/field_list.rb,
lib/sober_swag/reporting/input/either.rb,
lib/sober_swag/reporting/input/format.rb,
lib/sober_swag/reporting/input/mapped.rb,
lib/sober_swag/reporting/input/number.rb,
lib/sober_swag/reporting/input/object.rb,
lib/sober_swag/reporting/input/struct.rb,
lib/sober_swag/reporting/output/defer.rb,
lib/sober_swag/reporting/report/error.rb,
lib/sober_swag/reporting/report/value.rb,
lib/sober_swag/serializer/conditional.rb,
lib/sober_swag/reporting/input/pattern.rb,
lib/sober_swag/reporting/output/number.rb,
lib/sober_swag/reporting/output/object.rb,
lib/sober_swag/reporting/output/struct.rb,
lib/sober_swag/reporting/output/viewed.rb,
lib/sober_swag/reporting/report/either.rb,
lib/sober_swag/reporting/report/object.rb,
lib/sober_swag/reporting/report/output.rb,
lib/sober_swag/nodes/nullable_primitive.rb,
lib/sober_swag/output_object/definition.rb,
lib/sober_swag/reporting/input/in_range.rb,
lib/sober_swag/reporting/output/pattern.rb,
lib/sober_swag/reporting/output/via_map.rb,
lib/sober_swag/reporting/input/described.rb,
lib/sober_swag/reporting/input/interface.rb,
lib/sober_swag/reporting/output/in_range.rb,
lib/sober_swag/output_object/field_syntax.rb,
lib/sober_swag/reporting/input/converting.rb,
lib/sober_swag/reporting/input/dictionary.rb,
lib/sober_swag/reporting/input/referenced.rb,
lib/sober_swag/reporting/output/described.rb,
lib/sober_swag/reporting/output/interface.rb,
lib/sober_swag/reporting/input/multiple_of.rb,
lib/sober_swag/reporting/output/dictionary.rb,
lib/sober_swag/reporting/output/referenced.rb,
lib/sober_swag/reporting/output/partitioned.rb,
lib/sober_swag/reporting/input/merge_objects.rb,
lib/sober_swag/reporting/invalid_schema_error.rb,
lib/sober_swag/reporting/output/merge_objects.rb,
lib/sober_swag/reporting/report/merged_object.rb,
lib/sober_swag/controller/undefined_body_error.rb,
lib/sober_swag/controller/undefined_path_error.rb,
lib/sober_swag/reporting/input/converting/bool.rb,
lib/sober_swag/reporting/input/converting/date.rb,
lib/sober_swag/reporting/input/object/property.rb,
lib/sober_swag/controller/undefined_query_error.rb,
lib/sober_swag/reporting/output/object/property.rb,
lib/sober_swag/reporting/input/converting/decimal.rb,
lib/sober_swag/reporting/input/converting/integer.rb,
lib/sober_swag/reporting/input/converting/date_time.rb

Overview

Root namespace for the SoberSwag Module.

Defined Under Namespace

Modules: Controller, Nodes, Reporting, Serializer, Type Classes: Compiler, Error, InputObject, OutputObject, Parser, Server, Types

Constant Summary collapse

VERSION =
'0.25.2'

Class Method Summary collapse

Class Method Details

.input_object(parent = nil, &block) ⇒ Class

Define a struct of something. Useful to prevent weirdness from autoloading.

Parameters:

  • parent (Class) (defaults to: nil)

    the base class for the struct (default of Struct)

Returns:

  • (Class)

    the input object class generated



36
37
38
# File 'lib/sober_swag.rb', line 36

def self.input_object(parent = nil, &block)
  Class.new(parent || SoberSwag::InputObject, &block)
end