Skip to content

Commit

Permalink
Merge pull request #164 from dataware-tools/feat/make-kind-and-api_ve…
Browse files Browse the repository at this point in the history
…rsion-optional

feat: make _kind and _api_version to be optional
  • Loading branch information
yusukefs authored Jun 28, 2023
2 parents e0487eb + 5c106c0 commit 2249c5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pydtk/db/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import pathlib
from importlib.util import spec_from_file_location
from typing import Optional

from pydantic import BaseModel, Field, constr

Expand Down Expand Up @@ -59,12 +60,12 @@ def decorator():
class BaseSchema(BaseModel):
"""BaseSchema."""

api_version: constr(min_length=1, strict=True) = Field(
api_version: Optional[constr(min_length=1, strict=True)] = Field(
...,
description="Schema version information.",
alias="_api_version",
)
kind: constr(min_length=1, strict=True) = Field(
kind: Optional[constr(min_length=1, strict=True)] = Field(
...,
description="Kind of information",
alias="_kind",
Expand Down

0 comments on commit 2249c5e

Please sign in to comment.