Skip to content

Adjust all references to root 'id' and 'type' to use Constant #63

@zarathustra323

Description

@zarathustra323

All references to the special/reserved fields of id and type should reference EntityMetadata::ID_KEY and EntityMetadata::ID_TYPE respectively.

Example FinF:

/Users/jbare/htdocs/base-platform/vendor/as3/modlr/src/Api/AbstractNormalizer.php:
   35          // @todo Should this be wrapped in an object, or is a hash fine?
   36          return [
   37:             'id'            => $this->extractId($rawPayload),
   38              'type'          => $metadata->type,
   39              'properties'    => $this->extractProperties($rawPayload, $metadata)

/Users/jbare/htdocs/base-platform/vendor/as3/modlr/src/Metadata/EntityMetadata.php:
   26       * The id key name and type.
   27       */
   28:     const ID_KEY  = 'id';
   29      const ID_TYPE = 'string';
   30  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions