Skip to content

Commit

Permalink
camelCase mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
GaziYucel committed Apr 30, 2024
1 parent 19a09a0 commit b2fd9ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions classes/External/OpenAlex/DataModels/Mappings.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ final class Mappings
public static function getWork(): array
{
return [
'openalex_id' => 'id',
'openAlexId' => 'id',
'title' => 'title',
'publication_year' => 'publication_year',
'publication_date' => 'publication_date',
'publicationYear' => 'publication_year',
'publicationDate' => 'publication_date',
'type' => 'type_crossref',
'volume' => ['biblio', 'volume'],
'issue' => ['biblio', 'issue'],
'first_page' => ['biblio', 'first_page'],
'last_page' => ['biblio', 'last_page'],
'journal_name' => ['locations', 0,'source', 'display_name'],
'journal_issn_l' => ['locations', 0,'source', 'issn_l'],
'journal_publisher' => ['locations', 0,'source', 'host_organization_name'],
'firstPage' => ['biblio', 'first_page'],
'lastPage' => ['biblio', 'last_page'],
'journalName' => ['locations', 0,'source', 'display_name'],
'journalIssnL' => ['locations', 0,'source', 'issn_l'],
'journalPublisher' => ['locations', 0,'source', 'host_organization_name'],
'authors' => null // [ AuthorModel, ... ]
];
}
Expand All @@ -53,11 +53,11 @@ public static function getWork(): array
public static function getAuthor(): array
{
return [
'orcid_id' => ['author', 'orcid'],
'display_name' => ['author', 'display_name'],
'given_name' => ['author', 'display_name'],
'family_name' => ['author', 'display_name'],
'openalex_id' => ['author', 'id']
'orcid' => ['author', 'orcid'],
'displayName' => ['author', 'display_name'],
'givenName' => ['author', 'display_name'],
'familyName' => ['author', 'display_name'],
'openAlexId' => ['author', 'id']
];
}
}
4 changes: 2 additions & 2 deletions classes/External/Orcid/DataModels/Mappings.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ final class Mappings
public static function getAuthor(): array
{
return [
'given_name' => ['person', 'name', 'given-names', 'value'],
'family_name' => ['person', 'name', 'family-name', 'value']
'givenName' => ['person', 'name', 'given-names', 'value'],
'familyName' => ['person', 'name', 'family-name', 'value']
];
}
}

0 comments on commit b2fd9ea

Please sign in to comment.