lrstanley / entrest

Extension that generates a compliant OpenAPI spec and server implementation
https://lrstanley.github.io/entrest/
MIT License
11 stars 2 forks source link

UUID as ID key for entities #70

Open akeelnazir opened 1 month ago

akeelnazir commented 1 month ago

πŸš€ Changes proposed by this PR

The extension does not work for schema files that use uuid.UUID for ID fields. This fix checks for the flag AllowClientUUIDs and takes necessary action.

πŸ”— Related bug reports/feature requests

🧰 Type of change

πŸ“ Notes to reviewer

🀝 Requirements

jordanfowler commented 3 weeks ago

Given there is a concrete definition for what a UUID actually is defined by RFC 4122, it seems like ogen or this extension should know how to marshal [16]byte regardless of which library is being used to actually generate UUIDs. For reference:

// A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC
// 4122.
type UUID [16]byte