Module: JSONAPI

Defined in:
lib/jsonapi/error.rb,
lib/jsonapi/resource.rb,
lib/jsonapi/callbacks.rb,
lib/jsonapi/formatter.rb,
lib/jsonapi/operation.rb,
lib/jsonapi/paginator.rb,
lib/jsonapi/processor.rb,
lib/jsonapi/exceptions.rb,
lib/jsonapi/mime_types.rb,
lib/jsonapi/error_codes.rb,
lib/jsonapi/naive_cache.rb,
lib/jsonapi/link_builder.rb,
lib/jsonapi/relationship.rb,
lib/jsonapi/compiled_json.rb,
lib/jsonapi/configuration.rb,
lib/jsonapi/request_parser.rb,
lib/jsonapi/operation_result.rb,
lib/jsonapi/operation_results.rb,
lib/jsonapi/resources/version.rb,
lib/jsonapi/response_document.rb,
lib/jsonapi/include_directives.rb,
lib/jsonapi/resource_controller.rb,
lib/jsonapi/resource_serializer.rb,
lib/jsonapi/operation_dispatcher.rb,
lib/jsonapi/relationship_builder.rb,
lib/jsonapi/cached_resource_fragment.rb,
lib/jsonapi/resource_controller_metal.rb,
lib/jsonapi/acts_as_resource_controller.rb

Defined Under Namespace

Modules: ActsAsResourceController, Callbacks, Exceptions, MimeTypes, Resources Classes: CachedResourceFragment, CompiledJson, Configuration, Error, ErrorsOperationResult, Formatter, FormatterWrapperCache, IncludeDirectives, KeyFormatter, LinkBuilder, LinksObjectOperationResult, NaiveCache, Operation, OperationDispatcher, OperationResult, OperationResults, Paginator, Processor, RelatedResourcesOperationResult, Relationship, RelationshipBuilder, RequestParser, Resource, ResourceController, ResourceControllerMetal, ResourceOperationResult, ResourceSerializer, ResourcesOperationResult, ResponseDocument, RouteFormatter, ValueFormatter, Warning

Constant Summary collapse

MEDIA_TYPE =
'application/vnd.api+json'
VALIDATION_ERROR =
'100'
INVALID_RESOURCE =
'101'
FILTER_NOT_ALLOWED =
'102'
INVALID_FIELD_VALUE =
'103'
INVALID_FIELD =
'104'
PARAM_NOT_ALLOWED =
'105'
PARAM_MISSING =
'106'
INVALID_FILTER_VALUE =
'107'
KEY_ORDER_MISMATCH =
'109'
KEY_NOT_INCLUDED_IN_URL =
'110'
INVALID_INCLUDE =
'112'
RELATION_EXISTS =
'113'
INVALID_SORT_CRITERIA =
'114'
'115'
TYPE_MISMATCH =
'116'
INVALID_PAGE_OBJECT =
'117'
INVALID_PAGE_VALUE =
'118'
INVALID_FIELD_FORMAT =
'119'
INVALID_FILTERS_SYNTAX =
'120'
SAVE_FAILED =
'121'
INVALID_DATA_FORMAT =
'122'
BAD_REQUEST =
'400'
FORBIDDEN =
'403'
RECORD_NOT_FOUND =
'404'
NOT_ACCEPTABLE =
'406'
UNSUPPORTED_MEDIA_TYPE =
'415'
LOCKED =
'423'
INTERNAL_SERVER_ERROR =
'500'
TEXT_ERRORS =
{ VALIDATION_ERROR => 'VALIDATION_ERROR',
  INVALID_RESOURCE => 'INVALID_RESOURCE',
  FILTER_NOT_ALLOWED => 'FILTER_NOT_ALLOWED',
  INVALID_FIELD_VALUE => 'INVALID_FIELD_VALUE',
  INVALID_FIELD => 'INVALID_FIELD',
  PARAM_NOT_ALLOWED => 'PARAM_NOT_ALLOWED',
  PARAM_MISSING => 'PARAM_MISSING',
  INVALID_FILTER_VALUE => 'INVALID_FILTER_VALUE',
  KEY_ORDER_MISMATCH => 'KEY_ORDER_MISMATCH',
  KEY_NOT_INCLUDED_IN_URL => 'KEY_NOT_INCLUDED_IN_URL',
  INVALID_INCLUDE => 'INVALID_INCLUDE',
  RELATION_EXISTS => 'RELATION_EXISTS',
  INVALID_SORT_CRITERIA => 'INVALID_SORT_CRITERIA',
  INVALID_LINKS_OBJECT => 'INVALID_LINKS_OBJECT',
  TYPE_MISMATCH => 'TYPE_MISMATCH',
  INVALID_PAGE_OBJECT => 'INVALID_PAGE_OBJECT',
  INVALID_PAGE_VALUE => 'INVALID_PAGE_VALUE',
  INVALID_FIELD_FORMAT => 'INVALID_FIELD_FORMAT',
  INVALID_FILTERS_SYNTAX => 'INVALID_FILTERS_SYNTAX',
  SAVE_FAILED => 'SAVE_FAILED',
  INVALID_DATA_FORMAT => 'INVALID_DATA_FORMAT',
  FORBIDDEN => 'FORBIDDEN',
  RECORD_NOT_FOUND => 'RECORD_NOT_FOUND',
  NOT_ACCEPTABLE => 'NOT_ACCEPTABLE',
  UNSUPPORTED_MEDIA_TYPE => 'UNSUPPORTED_MEDIA_TYPE',
  LOCKED => 'LOCKED',
  INTERNAL_SERVER_ERROR => 'INTERNAL_SERVER_ERROR'
}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration



250
251
252
# File 'lib/jsonapi/configuration.rb', line 250

def configuration
  @configuration
end

Class Method Details

.configure {|@configuration| ... } ⇒ Object

Yields:



255
256
257
# File 'lib/jsonapi/configuration.rb', line 255

def self.configure
  yield(@configuration)
end