anukat2015 / elda

Automatically exported from code.google.com/p/elda
0 stars 0 forks source link

Feature Request: Per API entry page #137

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
imagine a server with 5 running configs (all in seperate URI spaces)
/api/config1/functions*
/api/config2/functions*
/api/config3/functions*
/api/config4/functions*
/api/config5/functions*

I would like to put a 'entry page' for each running config. If they dont call a 
'function' provided by the config (ie /api/config1/ they would get a static 
page describing the API (completely customisable by us, or just plain html - 
take your pick.)

Is this possible?

Original issue reported on code.google.com by terry.ra...@gmail.com on 10 Feb 2012 at 11:30

GoogleCodeExporter commented 8 years ago
It's not possible at present, I think. The spec explicitly calls for a 404 if 
the request doesn't match any endpoint, but I think it would be an allowable 
extension to provide a revised front page, probably by redirecting to a 
configured page that would be specified in the config. It would involve changes 
to RouterRestlet.nomatchFound.

Original comment by ehog.he...@googlemail.com on 24 Feb 2012 at 2:04

GoogleCodeExporter commented 8 years ago
A well established convention on the web is that if you ask for a path, rather 
than a page, the server delivers the "index.html" page, or a directory listing. 
This should be the equivalent in LDA space. 

(In practice the page is likely to be a form to help a human user build a valid 
URI.) 

Original comment by dr.short...@gmail.com on 1 Mar 2012 at 6:57

GoogleCodeExporter commented 8 years ago
The other option here looks like this in sudo code...

api:uriTemplate "/api/config1/"
elda:loadStatic "resources/config1/static/index.html"

a part of elda capable of returning static resources at a uriTemplate.

Original comment by terry.ra...@gmail.com on 7 Mar 2012 at 6:50

GoogleCodeExporter commented 8 years ago
Bump - did this ever get any traction?
The 'index page' concept would be quite handy.

Original comment by terry.ra...@gmail.com on 12 Jun 2012 at 2:46

GoogleCodeExporter commented 8 years ago
Bump again....

we have started using 'meta-data' about the source document in the repository 
and mapping it to a page directly (regardless of how wrong it is....)

[code]
svoc:LandingPage a api:ItemEndpoint
        ; rdfs:comment "Landing Page for this resource"
        ; api:uriTemplate  "/isc2010"
        ; api:exampleRequestPath  "/isc2010"
        ; api:itemTemplate  "http://resource.geosciml.org/vocabulary/timescale/isc-2010"
        ; api:defaultViewer  api:labelledDescribeViewer
        ; api:viewer  api:basicViewer,api:labelledDescribeViewer
        .
[code]

Original comment by terry.ra...@gmail.com on 3 Dec 2012 at 2:17