readium / mobile

📱 Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.
https://readium.org/mobile
BSD 3-Clause "New" or "Revised" License
104 stars 6 forks source link

Support for URI templates #2

Closed mickael-menu closed 4 years ago

mickael-menu commented 4 years ago

LCP relies on URI templates for LSD operations, and soon Publication Services will need them as well.

Unfortunately, the implementation is subpar in both Swift and Kotlin toolkits.

The URI Template specification being quite complex, it might be worth adding an external dependency for this, instead of implementing it ourselves. We need to make sure the dependency is at least being tested using the official test suite.

Alternatively, we could support only a subset of the specification, which would be much more manageable. But it depends on the usage made of Link objects.

mickael-menu commented 4 years ago

We ended up implementing a lightweight parser for URI templates which handles a subset of the spec, in Swift and Kotlin.