dunglas / vulcain

Fast and idiomatic client-driven REST APIs.

Home Page:https://vulcain.rocks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regression since 0.4.1

bpolaszek opened this issue · comments

Hello,

I upgraded Caddy on my staging env yesterday (using xcaddy --with github.com/dunglas/vulcain/caddy) and observed that responses from unchanged requests are now broken.

Request (basically, fetch + preload all IRIs of an Hydra Collection):

GET /api/books
fields: "@type", "/hydra:member/*/@id", "/hydra:totalItems"
preload: "/hydra:member/*/@id"

Produced (using v0.0.0-20220906084821-705c1113298e built on Sept 27, 2022):

{
  "hydra:member": [
    {
      "@id": "\/api\/books\/01FT5VZY5HPGXGTJFMERMZ8E01"
    }
  ],
  "@type": "hydra:Collection",
  "hydra:totalItems": 1
}

Now(v0.4.1):

{
  "hydra:member": [
    {}
  ],
  "hydra:totalItems": 1
}

Did something changed I'm not aware of? I couldn't find any info in the changelog nor in the documentation.
At first glance it just looks like Vulcain doesn't like @ properties anymore.

Thanks,
Ben

Could you check which version of sjson you use? This looks similar to tidwall/sjson#66

./caddy list-modules --versions | grep sjson

returns nothing - where am I supposed to find that information?

In your go.sum file.