Skip to content

Commit

Permalink
Update regex for sql-name (#163)
Browse files Browse the repository at this point in the history
* Update regex for sql-name

* Update input/fsh/models.fsh

Allow single-character names

* Update input/fsh/models.fsh

Allow single-character names
  • Loading branch information
bkaney authored Oct 11, 2023
1 parent 8c086e0 commit 48c1e0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions input/fsh/models.fsh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Invariant: sql-name
Description: """
Name is limited to letters, numbers, or underscores and cannot start with an
underscore -- i.e. with a regular expression of: ^[^_][A-Za-z][A-Za-z0-9_]+$
underscore -- i.e. with a regular expression of: ^[A-Za-z][A-Za-z0-9_]*$


This makes it usable as table names in a wide variety of databases.
"""
Severity: #error
Expression: "empty() or matches('^[^_][A-Za-z][A-Za-z0-9_]+$')"
Expression: "empty() or matches('^[A-Za-z][A-Za-z0-9_]*$')"


Invariant: sql-expressions
Expand Down
7 changes: 5 additions & 2 deletions input/ignoreWarnings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
# (And include comments like this justifying why)
# See https://github.com/FHIR/sample-ig/blob/master/input/ignoreWarnings.txt for examples

# Potential publisher bug?
Error in constraint 'sql-expressions' with expression '(path | forEach | forEachOrNull | union).count() = 1': Cannot assign field "sourceDefinition" because "res" is null
# Publisher bug?
Error in constraint 'sql-expressions' with expression '(path | forEach | forEachOrNull | union).count() = 1': Cannot assign field "sourceDefinition" because "res" is null

# Not a real HL7 project
When HL7 is publishing a resource, the owning committee must be stated using the http://hl7.org/fhir/StructureDefinition/structuredefinition-wg extension

0 comments on commit 48c1e0b

Please sign in to comment.