any endpoint | api:uriTemplate | "/path/with/{var}" | This endpoint is invoked when the URI path matches the template. The variable var is bound to the last segment of the path. |
Is there an alternative mechanism to achieve the same result?
Thanks
Regards
--
You received this message because you are subscribed to the Google Groups "linked-data-api-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linked-data-api-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Epimorphics Ltd www.epimorphics.com Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Tel: 01275 399069 Epimorphics Ltd. is a limited company registered in England (number 7016688) Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT, UK
However, take care. Think of each of those {varname} segments being replaced with a .* regex. It is very easy to write multiple pattern with different variable names and not spot that they capture the same URI. You need enough 'hard' coding in the templates so as to ensure that a given inbound URI matches as given template. BTW most specific match wins.
HTHIs there an alternative mechanism to achieve the same result?
Thanks
Regards
Stuart
--
You received this message because you are subscribed to the Google Groups "linked-data-api-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linked-data-api-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm using the same mapping that works with only mapping the last segment, but it doesn't work if the variables are used in the inner part of the URI:
; api:uriTemplate "/id/{sector}/{dominio}/{clase}/{identificador}"; api:itemTemplate "http://opendata.euskadi.eus/id/{sector}/{dominio}/{clase}/{identificador}"
However, take care. Think of each of those {varname} segments being replaced with a .* regex. It is very easy to write multiple pattern with different variable names and not spot that they capture the same URI. You need enough 'hard' coding in the templates so as to ensure that a given inbound URI matches as given template. BTW most specific match wins.
Thanks
Regards
However, take care. Think of each of those {varname} segments being replaced with a .* regex. It is very easy to write multiple pattern with different variable names and not spot that they capture the same URI. You need enough 'hard' coding in the templates so as to ensure that a given inbound URI matches as given template. BTW most specific match wins.
Thanks
Regards
Stuart
-- Epimorphics Ltd www.epimorphics.com Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Tel: 01275 399069 Epimorphics Ltd. is a limited company registered in England (number 7016688) Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT, UK
However, take care. Think of each of those {varname} segments being replaced with a .* regex. It is very easy to write multiple pattern with different variable names and not spot that they capture the same URI. You need enough 'hard' coding in the templates so as to ensure that a given inbound URI matches as given template. BTW most specific match wins.
Thanks
Regards
Stuart
-- Epimorphics Ltd www.epimorphics.com Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT Tel: 01275 399069 Epimorphics Ltd. is a limited company registered in England (number 7016688) Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 6PT, UK
--
BR
Beware of `api:select` I don't think it plays nice with other selector.