Skip to content

Commit 6c18365

Browse files
committed
Update model.py to allow float and int types for constraints; bump version to 1.1.1
1 parent 388f278 commit 6c18365

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "datacontract-specification"
3-
version = "1.1.0" # in sync with spec
3+
version = "1.1.1" # in sync with spec
44
description = "The Pydantic Model of the Data Contract Specification"
55
readme = "README.md"
66
authors = [

src/datacontract_specification/model.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ class Quality(pyd.BaseModel):
127127
description: str | None = None
128128
query: str | None = None
129129
dialect: str | None = None
130-
mustBe: int | None = None
131-
mustNotBe: int | None = None
132-
mustBeGreaterThan: int | None = None
133-
mustBeGreaterThanOrEqualTo: int | None = None
134-
mustBeLessThan: int | None = None
135-
mustBeLessThanOrEqualTo: int | None = None
136-
mustBeBetween: List[int] = None
137-
mustNotBeBetween: List[int] = None
130+
mustBe: float | int | None = None
131+
mustNotBe: float | int | None = None
132+
mustBeGreaterThan: float | int | None = None
133+
mustBeGreaterThanOrEqualTo: float | int | None = None
134+
mustBeLessThan: float | int | None = None
135+
mustBeLessThanOrEqualTo: float | int | None = None
136+
mustBeBetween: List[float | int] = None
137+
mustNotBeBetween: List[float | int] = None
138138
engine: str | None = None
139139
implementation: str | Dict[str, Any] | None = None
140140

@@ -162,10 +162,10 @@ class Field(pyd.BaseModel):
162162
pattern: str | None = None
163163
minLength: int | None = None
164164
maxLength: int | None = None
165-
minimum: int | None = None
166-
exclusiveMinimum: int | None = None
167-
maximum: int | None = None
168-
exclusiveMaximum: int | None = None
165+
minimum: float | int | None = None
166+
exclusiveMinimum: float | int | None = None
167+
maximum: float | int | None = None
168+
exclusiveMaximum: float | int | None = None
169169
enum: List[str] | None = []
170170
tags: List[str] | None = []
171171
links: Dict[str, str] = {}

0 commit comments

Comments
 (0)