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



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def action_to_operation_mapping
  @action_to_operation_mapping
end

#base_serializersObject

Returns the value of attribute base_serializers



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def base_serializers
  @base_serializers
end

#controller_suffixObject

Returns the value of attribute controller_suffix



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def controller_suffix
  @controller_suffix
end

#custom_typespec_dirObject

Returns the value of attribute custom_typespec_dir



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def custom_typespec_dir
  @custom_typespec_dir
end

#export_ifObject

Returns the value of attribute export_if



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def export_if
  @export_if
end

#extract_docsObject

Returns the value of attribute extract_docs



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def extract_docs
  @extract_docs
end

#global_typesObject

Returns the value of attribute global_types



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def global_types
  @global_types
end

#lintingObject

Returns the value of attribute linting



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def linting
  @linting
end

#max_line_lengthObject

Returns the value of attribute max_line_length



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def max_line_length
  @max_line_length
end

#name_from_serializerObject

Returns the value of attribute name_from_serializer



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def name_from_serializer
  @name_from_serializer
end

#namespaceObject

Returns the value of attribute namespace



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def namespace
  @namespace
end

#openapi_pathObject

Returns the value of attribute openapi_path



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def openapi_path
  @openapi_path
end

#output_dirObject

Returns the value of attribute output_dir



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def output_dir
  @output_dir
end

#package_managerObject

Returns the value of attribute package_manager



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def package_manager
  @package_manager
end

#param_method_suffixObject

Returns the value of attribute param_method_suffix



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def param_method_suffix
  @param_method_suffix
end

#rootObject

Returns the value of attribute root



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def root
  @root
end

#route_param_typesObject

Returns the value of attribute route_param_types



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def route_param_types
  @route_param_types
end

#serializers_dirsObject

Returns the value of attribute serializers_dirs



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def serializers_dirs
  @serializers_dirs
end

#skip_serializer_ifObject

Returns the value of attribute skip_serializer_if



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def skip_serializer_if
  @skip_serializer_if
end

#sorbet_to_typespec_type_mappingObject

Returns the value of attribute sorbet_to_typespec_type_mapping



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def sorbet_to_typespec_type_mapping
  @sorbet_to_typespec_type_mapping
end

#sort_properties_byObject

Returns the value of attribute sort_properties_by



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def sort_properties_by
  @sort_properties_by
end

#sql_to_typespec_type_mappingObject

Returns the value of attribute sql_to_typespec_type_mapping



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def sql_to_typespec_type_mapping
  @sql_to_typespec_type_mapping
end

#transform_keysObject

Returns the value of attribute transform_keys



209
210
211
# File 'lib/typespec_from_serializers/generator.rb', line 209

def transform_keys
  @transform_keys
end

Instance Method Details

#relative_custom_typespec_dirObject



235
236
237
# File 'lib/typespec_from_serializers/generator.rb', line 235

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



239
240
241
# File 'lib/typespec_from_serializers/generator.rb', line 239

def unknown_type
  :unknown
end