epimorphics / elda

Epimorphics implementation of the Linked Data API
Other
53 stars 27 forks source link

How to "unpublish"? Just removing spec file isn't enough #142

Open rwalkerands opened 9 years ago

rwalkerands commented 9 years ago

I have the initialSpecFile context-param configured as /some/path/*.ttl, and adding a new spec file, or updating a spec file, works well enough, i.e., the new/modified endpoints show up correctly.

But I want also to be able to "unpublish", i.e., to be able to remove a spec file from the directory, and for the endpoints defined in that file to go away.

This doesn't seem to be supported at present.

Is there even a workaround, or do I have to reload the webapp after removing a spec file?

ehedgehog commented 9 years ago

On 5 June 2015 at 01:30, Richard Walker notifications@github.com wrote:

I have the initialSpecFile context-param configured as /some/path/*.ttl,

(Parenthetical: if you don't otherwise want to tinker with web.xml, you could use elda-common rather than a DIY webapp and put your config(s) in /etc/elda/conf.d/webappname/specname.ttl,where elda-common looks for them.)

and adding a new spec file, or updating a spec file, works well enough, i.e., the new/modified endpoints show up correctly.

But I want also to be able to "unpublish", i.e., to be able to remove a spec file from the directory, and for the endpoints defined in that file to go away.

This doesn't seem to be supported at present.

I think you're right.

Is there even a workaround, or do I have to reload the webapp after removing a spec file?

My first (untested) thought is that you could update the spec file to a spec with no endpoints. The spec will still show in /api-config (with no endpoints) but all queries to that webapp will 404.

I'll add an issue.

Chris

Chris "allusive" Dollin

ehedgehog commented 9 years ago

Ha! I hadn't seen that the email arose from an issue you (Richard) had added..

Thanks.

Chris

On 5 June 2015 at 09:14, chris dollin ehog.hedge@googlemail.com wrote:

On 5 June 2015 at 01:30, Richard Walker notifications@github.com wrote:

I have the initialSpecFile context-param configured as /some/path/*.ttl,

(Parenthetical: if you don't otherwise want to tinker with web.xml, you could use elda-common rather than a DIY webapp and put your config(s) in /etc/elda/conf.d/webappname/specname.ttl,where elda-common looks for them.)

and adding a new spec file, or updating a spec file, works well enough, i.e., the new/modified endpoints show up correctly.

But I want also to be able to "unpublish", i.e., to be able to remove a spec file from the directory, and for the endpoints defined in that file to go away.

This doesn't seem to be supported at present.

I think you're right.

Is there even a workaround, or do I have to reload the webapp after removing a spec file?

My first (untested) thought is that you could update the spec file to a spec with no endpoints. The spec will still show in /api-config (with no endpoints) but all queries to that webapp will 404.

I'll add an issue.

Chris

Chris "allusive" Dollin

Chris "allusive" Dollin

rwalkerands commented 9 years ago

Uh, yeah ... as no doubt you can guess, this is not really what I had in mind.

Easiest for me to test your suggestion was just truncating the file to zero. All the endpoints still appear in /api-config, but (as you predicted) they no longer work. (Hmm, I find this combination of behaviours "unexpected".)

This is probably good enough, but I do look forward to a fix.