Skip to content

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

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  

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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