CLARIAH / grlc

grlc builds Web APIs using shared SPARQL queries
http://grlc.io
MIT License
137 stars 32 forks source link

"No API definition provided." for subdirectory in github #460

Closed bherr2 closed 8 months ago

bherr2 commented 8 months ago

We have hosted SPARQL queries in github in subdirectories in a repo for a while now, but in the last few days it is erroring out. Going to http://grlc.io/api/hubmapconsortium/ccf-grlc/hra-pop/ shows "No API definition provided.". The subdirectory on github is here: https://github.com/hubmapconsortium/ccf-grlc/tree/main/hra-pop. I see in the console it tries to use this url http://grlc.io/api/hubmapconsortium/ccf-grlc/hra-pop/swagger but returns 404 with this message: "Couldn't find a SPARQL, RDF dump, or TPF query with the requested name". Not sure how to fix or address this.

c-martinez commented 8 months ago

Hi @bherr2 -- thanks for reporting this. Is this by any chance happening after the latest release (v1.3.9, on 28th Feb)?

It might be that we broke something for subdirs in the latest release... I will look into it.

c-martinez commented 8 months ago

Update

I just tested v1.3.8 locally, and it seems like your old api paths worked just fine. So indeed it is something that broke with release v1.3.9.

I also see in your repo (https://github.com/hubmapconsortium/ccf-grlc), that you already have updated working links.

I think that your current api path (https://grlc.io/api-git/hubmapconsortium/ccf-grlc/subdir/hra-pop/) are actually more consistent with the behaviour that is documented for the subdir functionality.

So, unless this causes a problem for you, I would be in favour of leaving it as it is and closing this issue. But of course if this is a problem for you, we could discuss this further.

(I'll close this issue for now, but feel free to re-open it if you feel it is necessary)

bherr2 commented 8 months ago

HI @c-martinez , thanks for looking into this. We're happy to update our URL patterns to the ones that work in v1.3.9. I have seen others with the same issue on a slack channel I'm on. It might be a good idea to add this to the subdir documentation, but otherwise I'll point them to this issue if I see it come up again.

c-martinez commented 8 months ago

Thanks @bherr2 if you can point people to this issue that would be great.