ehn-dcc-development / eu-dcc-schema

Schema for the ehn DCC payload
Apache License 2.0
165 stars 59 forks source link

404 when downloading https://id.uvci.eu/DCC.ValueSets.schema.json #114

Closed ioggstream closed 3 years ago

ioggstream commented 3 years ago

Reproduce

  1. curl -Li https://id.uvci.eu/DCC.ValueSets.schema.json

I expect

The json file

Instead

curl -Li https://id.uvci.eu/DCC.ValueSets.schema.json

HTTP/1.1 302 Found
Date: Tue, 29 Jun 2021 10:42:05 GMT
Server: Apache/2.4.46 (FreeBSD) OpenSSL/1.1.1d-freebsd
Location: https://raw.githubusercontent.com/ehn-digital-green-development/ehn-dgc-schema/release/1.0.1/DCC.ValueSets.schema.json
Content-Length: 302
Content-Type: text/html; charset=iso-8859-1

HTTP/2 404 
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
content-type: text/plain; charset=utf-8
x-github-request-id: A5D0:7966:22784A:24800C:60DAF8D6
accept-ranges: bytes
date: Tue, 29 Jun 2021 10:42:05 GMT
via: 1.1 varnish
x-served-by: cache-mxp6959-MXP
x-cache: HIT
x-cache-hits: 1
x-timer: S1624963326.579278,VS0,VE0
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
x-fastly-request-id: 0f7f4011d8d84a6862cc80b958d18fd822924d5b
expires: Tue, 29 Jun 2021 10:47:05 GMT
source-age: 39
content-length: 14

404: Not Found
dslmeinte commented 3 years ago

The redirect (302) should point to https://raw.githubusercontent.com/ehn-dcc-development/ehn-dcc-schema/release/1.3.0/DCC.ValueSets.schema.json

gabywh commented 3 years ago

I guess you could try reading the FAQ https://github.com/ehn-dcc-development/ehn-dcc-schema/wiki/FAQ#schema-location which begins with "I get a 404 when trying to download the Schema from the URI."

ioggstream commented 3 years ago

@gabywh thanks for your reply.

The observable behaviour though is that:

The behavior described in the FAQ should have been a straight 404 then, not a 302. Another correct behavior could have been linking the FAQ in the 404 content.

gabywh commented 3 years ago

id.uvci,eu - also there as a dev stop-gap (with no strong guarantees) until a DCC Gateway endpoint for retrievable valuesets was made available.

You should be getting the valuesets from the DCC Gateway in any case - there is an explicit API made available to obtain them. Please talk to T-Systems if you don't know the details of this.

HTH, Gaby.

gabywh commented 3 years ago

Another correct behavior could have been linking the FAQ in the 404 content.

Another correct behavior would be to understand that id.uvci.eu is a URI and not a URL, as per the JSON Schema spec etc.

Backing of that URI to a resolvable URL was a termporary stop-gap. The DCC Gateway should now be providing the valuesets. The DCC Schema itself you should retrieve from here (https://github.com/ehn-dcc-development/ehn-dcc-schema) - but note that the DCC Schema contains a URI that does not need to be resolvable (e.g. id.uvci.eu).