interledger-deprecated / five-bells-ledger

Open-source reference ledger optimized for use with the Interledger protocol
Other
27 stars 21 forks source link

URLs returned in meta-data should use proper RFC6570 URL Templates #372

Open adrianhopebailie opened 7 years ago

adrianhopebailie commented 7 years ago

There is a standard way to represent URL templates that will work better across platforms. We've already had to do some hacking to accommodate the current URL templates when consuming them in a Java client.

This change would mean the following URL templates would go from:

"urls" : {
    "accounts" : "http://localhost/accounts",
    "account" : "http://localhost/accounts/:name",
    "transfer_fulfillment" : "http://localhost/transfers/:id/fulfillment",
  },

to this:

"urls" : {
    "accounts" : "http://localhost/accounts",
    "account" : "http://localhost/accounts/{name}",
    "transfer_fulfillment" : "http://localhost/transfers/{id}/fulfillment",
  },

See https://tools.ietf.org/html/rfc6570

emschwartz commented 7 years ago

Do you think we should change this for the Five Bells Ledger API or keep this for the Common Ledger API?

adrianhopebailie commented 7 years ago

Do you think we should change this for the Five Bells Ledger API or keep this for the Common Ledger API?

I think it makes sense to do both. For Common Ledger API there is no impact so it's easier. For five-bells we need to assess the impact on other components so could be lower priority until we can do that.

emschwartz commented 7 years ago

This change has actually already been proposed for the Common Ledger API (see here).

Unless this is causing major problems in implementing the Five Bells Ledger API I would propose not changing the variable format in that API. I think that falls into the category of API cleanup and we decided to postpone most of those types of changes until we switch to the Common Ledger API.

justmoon commented 7 years ago

Agreed.