Skip to content

Commit

Permalink
allows 'lint' flag in attributes
Browse files Browse the repository at this point in the history
also adds a Dockerfile to containerize the build of ocsf-validator
  • Loading branch information
dkolbly committed May 9, 2024
1 parent 72d762f commit 830259f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# a Dockerfile to containerize the build of ocsf-validator
#
# To build a container:
#
# docker build -t ocsf-validator:latest .
#
# To use it to validate a schema
#
# docker run --rm -v $PWD:/schema ocsf-validator:latest /schema
#

FROM python:3.11.9-alpine3.19

RUN apk add --no-cache poetry nodejs npm

WORKDIR /src
ADD . .

RUN poetry install
RUN poetry run black .
RUN poetry run isort .
RUN poetry run pyright ocsf_validator
RUN poetry run pytest

ENTRYPOINT ["poetry", "run", "python", "-m", "ocsf_validator"]
1 change: 1 addition & 0 deletions ocsf_validator/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class OcsfDeprecationInfo(TypedDict):
"enum": NotRequired[Dict[str, OcsfEnumMember]],
"group": NotRequired[str],
"is_array": NotRequired[bool],
"lint": NotRequired[Sequence[str]],
"max_len": NotRequired[int],
"name": NotRequired[str],
"notes": NotRequired[str],
Expand Down

0 comments on commit 830259f

Please sign in to comment.