camaraproject / EdgeCloud

Repository to describe, develop, document and test the EdgeCloud API family
Apache License 2.0
16 stars 43 forks source link

EAM API: only UUID format for IDs is too strict #303

Open gainsley opened 2 weeks ago

gainsley commented 2 weeks ago

Problem description

AppId, EdgeCloudZoneId, etc IDs are currently defined as strings with format UUID. Our platform currently uses ULIDs. It's not really feasible for us to convert to use UUIDs because of existing deployments. We would like to add ULID as an additional allowed format for IDs.

Possible evolution

New IDs would have the following type definition:

type: string
anyOf:
- format: uuid
- format: ulid 

Alternative solution

An alternative would be to remove the format requirement completely. As long as the platform can guarantee that the IDs it generates are unique, then any format should be ok.

In particular, platforms using an SQL database will likely have IDs of type uint64.

An argument that IDs must be unique outside of the Edge Cloud Platform (i.e. for federation) does not seem like good practice, it would better to scope foreign IDs to the partner federation so there is no possibility of conflicts with our own IDs.

Additional context

gainsley commented 2 weeks ago

See also #259: For federation EWBI API, AppId cannot be a UUID.