Skip to content

Commit

Permalink
DRIVERS-2789 Convert UUID Spec to Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Aug 1, 2024
1 parent 6017560 commit 34b9d46
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 286 deletions.
2 changes: 1 addition & 1 deletion source/client-side-encryption/client-side-encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Drivers MAY deviate the spelling of option names to conform to their language's
in an idiomatic way (e.g. keyword arguments, builder classes, etc.).

Drivers MAY use a native UUID type in place of a parameter or return type specified as a BSON binary with subtype 0x04
as described in [Handling of Native UUID Types](../uuid.rst).
as described in [Handling of Native UUID Types](../uuid.md).

### MongoClient Changes

Expand Down
10 changes: 4 additions & 6 deletions source/extended-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,9 @@ parsing JSON numbers:

#### Special rules for parsing `$uuid` fields

As per the [UUID specification](https://github.com/mongodb/specifications/blob/master/source/uuid.rst), Binary subtype 3
or 4 are used to represent UUIDs in BSON. Consequently, UUIDs are handled as per the convention described for the
`Binary` type in the [Conversion table](#conversion-table), e.g. the following document written with the MongoDB Python
Driver:
As per the [UUID specification](uuid.md), Binary subtype 3 or 4 are used to represent UUIDs in BSON. Consequently, UUIDs
are handled as per the convention described for the `Binary` type in the [Conversion table](#conversion-table), e.g. the
following document written with the MongoDB Python Driver:

```javascript
{"Binary": uuid.UUID("c8edabc3-f738-4ca3-b68d-ab92a91478a3")}
Expand All @@ -239,8 +238,7 @@ is transformed into the following (newlines and spaces added for readability):

> [!NOTE]
> The above described type conversion assumes that UUID representation is set to `STANDARD`. See the
> [UUID specification](https://github.com/mongodb/specifications/blob/master/source/uuid.rst) for more information about
> UUID representations.
> [UUID specification](uuid.md) for more information about UUID representations.
While this transformation preserves BSON subtype information (since UUIDs can be represented as BSON subtype 3 *or* 4),
base64-encoding is not the standard way of representing UUIDs and using it makes comparing these values against textual
Expand Down
1 change: 1 addition & 0 deletions source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [FaaS Automated Testing](faas-automated-testing/faas-automated-testing.md)
- [GridFS Spec](gridfs/gridfs-spec.md)
- [Handling of DBRefs](./dbref.md)
- [Handling of Native UUID Types](./uuid.md)
- [Index Management](index-management/index-management.md)
- [Initial DNS Seedlist Discovery](initial-dns-seedlist-discovery/initial-dns-seedlist-discovery.md)
- [Load Balancer Support](load-balancers/load-balancers.md)
Expand Down
Loading

0 comments on commit 34b9d46

Please sign in to comment.