salesforce-marketingcloud / SFDC-MC-REST-Style-Guide

REST style guidelines
31 stars 9 forks source link

Strongly Typed ID Values #30

Closed ncorn closed 9 years ago

ncorn commented 9 years ago

There is no MUST or SHOULD on this topic. Currently the only thing listed is an impled "MUST" because of the table under the Data Object which lists Id as a string. I think that we should allow IDs to be one of the following types:

string - ASCII characters of some maximum length. That length may or may not be defined by the developer but should be required. numeric - Integer of some length, probably 64bit. Either signed or unsigned. Guid - Global unique identifier as defined by some spec.

I believe this allows our swagger document to be more precise later and allows clients to optimize their code as well.

ncorn commented 9 years ago

Wording that needs to be added:

  1. ID MUST specify a maximum length.
  2. ID values MUST be treated as an opaque string
aroden-salesforce commented 9 years ago

Verbally there has be updates not captured here. Please make comments with current thinking