Skip to content

Commit

Permalink
Update documentation according to changes in the regex
Browse files Browse the repository at this point in the history
Signed-off-by: Yannic Klem <Yannic.Klem@bosch.io>
  • Loading branch information
Yannic92 committed Mar 24, 2022
1 parent 557124a commit 6a97f32
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The namespace must conform to the following notation:
* underscore may be used

When writing a Java application, you can use the following regex to validate your namespaces:
``(?<ns>|(?:(?:[a-zA-Z]\w*+)(?:([.\-])[a-zA-Z]\w*+)*+))``
``(?<ns>|(?:(?:[a-zA-Z]\w*+)(?:[.-][a-zA-Z]\w*+)*+))``
(see [RegexPatterns#NAMESPACE_REGEX](https://github.com/eclipse/ditto/blob/master/base/model/src/main/java/org/eclipse/ditto/base/model/entity/id/RegexPatterns.java)).

Examples for valid namespaces:
Expand Down Expand Up @@ -52,7 +52,7 @@ A namespaced ID must conform to the following expectations:
* have a maximum length of 256 characters

When writing a Java application, you can use the following regex to validate your namespaced IDs:
``(?<ns>|(?:(?:[a-zA-Z]\w*+)(?:([.\-])[a-zA-Z]\w*+)*+)):(?<name>[^\x00-\x1F\x7F-\xFF/]++)``
``(?<ns>|(?:(?:[a-zA-Z]\w*+)(?:[.-][a-zA-Z]\w*+)*+)):(?<name>[^\x00-\x1F\x7F-\xFF/]++)``
(see [RegexPatterns#ID_REGEX](https://github.com/eclipse/ditto/blob/master/base/model/src/main/java/org/eclipse/ditto/base/model/entity/id/RegexPatterns.java)).

Examples for valid IDs:
Expand Down

0 comments on commit 6a97f32

Please sign in to comment.