Skip to content

Commit

Permalink
fix: Change cardinality string
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Jan 24, 2025
1 parent 804eaa6 commit 8ff399c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions schema/cardinality.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
type Cardinality string

const (
ZeroOrOne Cardinality = "Zero or one"
ExactlyOne Cardinality = "Exactly one"
ZeroOrMore Cardinality = "Zero or more"
OneOrMore Cardinality = "One or more"
ZeroOrOne Cardinality = "zero_or_one"
ExactlyOne Cardinality = "exactly_one"
ZeroOrMore Cardinality = "zero_or_more"
OneOrMore Cardinality = "one_or_more"
UnknownCardinality Cardinality = ""
)

Expand All @@ -23,6 +23,13 @@ var cardinalityAliases = map[string]Cardinality{
"one or zero": ZeroOrOne,
"zero or many": ZeroOrMore,
"one or many": OneOrMore,
"zero_or_one": ZeroOrOne,
"exactly_one": ExactlyOne,
"zero_or_more": ZeroOrMore,
"one_or_more": OneOrMore,
"one_or_zero": ZeroOrOne,
"zero_or_many": ZeroOrMore,
"one_or_many": OneOrMore,
"many(0)": ZeroOrMore,
"many(1)": OneOrMore,
"0+": ZeroOrMore,
Expand Down

0 comments on commit 8ff399c

Please sign in to comment.