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

eddRequestable isn't serialized in response sometimes #68

Open
nodanaonlyzuul opened this issue Jul 25, 2017 · 2 comments
Open

eddRequestable isn't serialized in response sometimes #68

nodanaonlyzuul opened this issue Jul 25, 2017 · 2 comments

Comments

@nodanaonlyzuul
Copy link
Contributor

nodanaonlyzuul commented Jul 25, 2017

@ktp242 told me that:

Responses like the one to http://localhost:3000/api/v0.1/request/deliveryLocationsByBarcode?barcodes[]=33433062317023 have NO eddRequestable property in the response.
I've confirmed that, before jsonld serialization the item does have eddRequestable: false...and one can see as much in the logger.debug() statement in ItemResourceSerializer#serialize.

I haven't done any digging yet but my instinct is that something in the JSONLD serializers is stripping out that property. Here's the API's response as of writing.

{
  "@context": "http://127.0.0.1:3000/api/v0.1/discovery/context_all.jsonld",
  "@type": "itemList",
  "itemListElement": [
    {
      "@type": "bf:Item",
      "@id": "res:i15400083",
      "identifier": [
        "urn:bnum:b15990082",
        "urn:barcode:33433062317023"
      ],
      "uri": "i15400083",
      "holdingLocation": [
        {
          "@id": "loc:mal82",
          "prefLabel": "SASB M1 - General Research - Room 315"
        }
      ],
      "deliveryLocation": [
        {
          "@id": "loc:mab",
          "prefLabel": "SASB - Art & Architecture Rm 300"
        },
        {
          "@id": "loc:maf",
          "prefLabel": "SASB - Dorot Jewish Division Rm 111"
        },
        {
          "@id": "loc:map",
          "prefLabel": "SASB - Map Division - Rm 117"
        },
        {
          "@id": "loc:mag",
          "prefLabel": "SASB - Milstein Division Rm 121"
        },
        {
          "@id": "loc:mai",
          "prefLabel": "SASB - Periodicals and Microforms Rm 119"
        },
        {
          "@id": "loc:mal",
          "prefLabel": "SASB - Service Desk Rm 315"
        }
      ],
      "idBarcode": [
        "33433062317023"
      ]
    }
  ]
}
@nodanaonlyzuul nodanaonlyzuul changed the title eddDeliverable isn't serialized in response sometimes eddRequestable isn't serialized in response sometimes Jul 25, 2017
@nodanaonlyzuul
Copy link
Contributor Author

nodanaonlyzuul commented Jul 25, 2017

This is happening in JsonLdSerializer#format() when it calls this.statements().

this.statements() is dropping the key.

@nodanaonlyzuul
Copy link
Contributor Author

We should let the front end team know when this is fixed so they can remove some defensive code they've built around this bug.

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

1 participant