Skip to content

Commit

Permalink
Merge pull request #208 from julianladisch/uuids
Browse files Browse the repository at this point in the history
Add guides/uuids.md
  • Loading branch information
MikeTaylor committed Jun 11, 2018
2 parents a719024 + 9922cd4 commit 67c6156
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions guides/index.md
Expand Up @@ -133,6 +133,7 @@ These are listed in the [Start](/start/) section.
- For Contextual Query Language (CQL) examples, see the [Glossary](/reference/glossary/#cql), the FOLIO [CQL to PostgreSQL JSON converter](https://github.com/folio-org/cql2pgjson-java), the [API docs](/reference/api/), and the debug output for tests in each backend module.
- Use [raml-cop](/guides/raml-cop/) to assess RAMLs, schema, and examples. A guide to its use with some explanations of its messages.
- [Conduct cross-module joins via their APIs](cross-module-joins).
- [How to check for a valid UUID](uuids).

### Tutorials

Expand Down
18 changes: 18 additions & 0 deletions guides/uuids.md
@@ -0,0 +1,18 @@
---
layout: page
title: How to check for a valid UUID
permalink: /guides/uuids/
menuInclude: no
menuTopTitle: Guides
---

The regexp
`^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$`
matches any valid UUID. This accepts v1, v2, v3, v4 and v5 UUIDs as FOLIO allows all of them,
but it excludes the Nil UUID `00000000-0000-0000-0000-000000000000` that usually serves as a
NullObject to be used for the Null Object Pattern.

A UUID has the form xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where the version M must be [1-5]
and the variant N must be [89abAB]; see
[UUID at Wikipedia](https://en.wikipedia.org/wiki/Universally_unique_identifier).

6 changes: 6 additions & 0 deletions reference/glossary.md
Expand Up @@ -259,6 +259,12 @@ is "searchRetrieve Version 1.0, OASIS Standard".

See [Stripes](#stripes) and the various [Stripes entities](#stripes-entities) explained above.

#### UUID

Universally unique identifier, a 128-bit number, see
[UUID at Wikipedia](https://en.wikipedia.org/wiki/Universally_unique_identifier)
and [How to check for a valid UUID](/guides/uuids/).

#### Vert.x

[Vert.x](http://vertx.io) is a toolkit for building scalable, reactive
Expand Down

0 comments on commit 67c6156

Please sign in to comment.