Class: TypeSpecFromSerializers::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/typespec_from_serializers/generator.rb

Overview

Internal: The configuration for TypeSpec generation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action_to_operation_mappingObject

Returns the value of attribute action_to_operation_mapping

Returns:

  • (Object)

    the current value of action_to_operation_mapping



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def action_to_operation_mapping
  @action_to_operation_mapping
end

#base_serializersObject

Returns the value of attribute base_serializers

Returns:

  • (Object)

    the current value of base_serializers



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def base_serializers
  @base_serializers
end

#custom_typespec_dirObject

Returns the value of attribute custom_typespec_dir

Returns:

  • (Object)

    the current value of custom_typespec_dir



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def custom_typespec_dir
  @custom_typespec_dir
end

#global_typesObject

Returns the value of attribute global_types

Returns:

  • (Object)

    the current value of global_types



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def global_types
  @global_types
end

#name_from_serializerObject

Returns the value of attribute name_from_serializer

Returns:

  • (Object)

    the current value of name_from_serializer



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def name_from_serializer
  @name_from_serializer
end

#namespaceObject

Returns the value of attribute namespace

Returns:

  • (Object)

    the current value of namespace



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def namespace
  @namespace
end

#output_dirObject

Returns the value of attribute output_dir

Returns:

  • (Object)

    the current value of output_dir



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def output_dir
  @output_dir
end

#serializers_dirsObject

Returns the value of attribute serializers_dirs

Returns:

  • (Object)

    the current value of serializers_dirs



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def serializers_dirs
  @serializers_dirs
end

#skip_serializer_ifObject

Returns the value of attribute skip_serializer_if

Returns:

  • (Object)

    the current value of skip_serializer_if



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def skip_serializer_if
  @skip_serializer_if
end

#sort_properties_byObject

Returns the value of attribute sort_properties_by

Returns:

  • (Object)

    the current value of sort_properties_by



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def sort_properties_by
  @sort_properties_by
end

#sql_to_typespec_type_mappingObject

Returns the value of attribute sql_to_typespec_type_mapping

Returns:

  • (Object)

    the current value of sql_to_typespec_type_mapping



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def sql_to_typespec_type_mapping
  @sql_to_typespec_type_mapping
end

#transform_keysObject

Returns the value of attribute transform_keys

Returns:

  • (Object)

    the current value of transform_keys



88
89
90
# File 'lib/typespec_from_serializers/generator.rb', line 88

def transform_keys
  @transform_keys
end

Instance Method Details

#relative_custom_typespec_dirObject



103
104
105
# File 'lib/typespec_from_serializers/generator.rb', line 103

def relative_custom_typespec_dir
  @relative_custom_typespec_dir ||= (custom_typespec_dir || output_dir.parent).relative_path_from(output_dir.join("models"))
end

#unknown_typeObject



107
108
109
# File 'lib/typespec_from_serializers/generator.rb', line 107

def unknown_type
  :unknown
end