Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record serializers need to include a link to the bucket #172

Open
lnielsen opened this issue Aug 1, 2019 · 1 comment
Open

Record serializers need to include a link to the bucket #172

lnielsen opened this issue Aug 1, 2019 · 1 comment
Assignees

Comments

@lnielsen
Copy link
Member

lnielsen commented Aug 1, 2019

See how to create a record and a file: inveniosoftware/inveniosoftware.org#106

Currently when you create a record the response looks like this:

{
  "created": "2019-08-01T09:21:47.261207+00:00",
  "id": "2",
  "links": {
    "self": "https://127.0.0.1:5000/api/records/2"
  },
  "metadata": {
    "contributors": [
      {
        "name": "Doe, John"
      }
    ],
    "id": "2",
    "title": "Some title"
  },
  "revision": 0,
  "updated": "2019-08-01T09:21:47.261214+00:00"
}

It should look similar to this:

{
  "created": "2019-08-01T09:21:47.261207+00:00",
  "id": "2",
  "links": {
    "self": "https://127.0.0.1:5000/api/records/2",
    "files": "https://127.0.0.1:5000/api/records/2/files/"
  },
  "metadata": {
    "contributors": [
      {
        "name": "Doe, John"
      }
    ],
    "id": "2",
    "title": "Some title"
  },
  "revision": 0,
  "updated": "2019-08-01T09:21:47.261214+00:00"
}

Adding the links.files properties.

@lnielsen lnielsen changed the title Record serializers need to include links Record serializers need to include links and files Aug 1, 2019
@lnielsen
Copy link
Member Author

lnielsen commented Aug 1, 2019

Needs to work for both the landing page (/api/records/1 and search results /api/records/)

@lnielsen lnielsen changed the title Record serializers need to include links and files Record serializers need to include a link to the bucket Aug 1, 2019
@Glignos Glignos self-assigned this Aug 1, 2019
Glignos added a commit to Glignos/cookiecutter-invenio-instance that referenced this issue Aug 2, 2019
Glignos added a commit to Glignos/cookiecutter-invenio-instance that referenced this issue Aug 2, 2019
@kpsherva kpsherva changed the title Record serializers need to include a link to the bucket Record serializers, JSONSchema and mappings need to include a link to the bucket and support files Nov 11, 2019
@kpsherva kpsherva changed the title Record serializers, JSONSchema and mappings need to include a link to the bucket and support files Record serializers need to include a link to the bucket Nov 12, 2019
@kpsherva kpsherva changed the title Record serializers need to include a link to the bucket [ON HOLD]Record serializers need to include a link to the bucket Nov 12, 2019
@ntarocco ntarocco assigned Glignos and unassigned frankois and mvidalgarcia Nov 15, 2019
@kpsherva kpsherva changed the title [ON HOLD]Record serializers need to include a link to the bucket [Blocked by #89]Record serializers need to include a link to the bucket Nov 15, 2019
@kpsherva kpsherva changed the title [Blocked by #89]Record serializers need to include a link to the bucket [Blocked by #87]Record serializers need to include a link to the bucket Nov 18, 2019
@kpsherva kpsherva changed the title [Blocked by #87]Record serializers need to include a link to the bucket Record serializers need to include a link to the bucket Nov 18, 2019
@equadon equadon self-assigned this Nov 18, 2019
@kpsherva kpsherva removed the blocked label Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants