Skip to content

Commit 830259f

Browse files
committed
allows 'lint' flag in attributes
also adds a Dockerfile to containerize the build of ocsf-validator
1 parent 72d762f commit 830259f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# a Dockerfile to containerize the build of ocsf-validator
2+
#
3+
# To build a container:
4+
#
5+
# docker build -t ocsf-validator:latest .
6+
#
7+
# To use it to validate a schema
8+
#
9+
# docker run --rm -v $PWD:/schema ocsf-validator:latest /schema
10+
#
11+
12+
FROM python:3.11.9-alpine3.19
13+
14+
RUN apk add --no-cache poetry nodejs npm
15+
16+
WORKDIR /src
17+
ADD . .
18+
19+
RUN poetry install
20+
RUN poetry run black .
21+
RUN poetry run isort .
22+
RUN poetry run pyright ocsf_validator
23+
RUN poetry run pytest
24+
25+
ENTRYPOINT ["poetry", "run", "python", "-m", "ocsf_validator"]

ocsf_validator/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ class OcsfDeprecationInfo(TypedDict):
5050
"enum": NotRequired[Dict[str, OcsfEnumMember]],
5151
"group": NotRequired[str],
5252
"is_array": NotRequired[bool],
53+
"lint": NotRequired[Sequence[str]],
5354
"max_len": NotRequired[int],
5455
"name": NotRequired[str],
5556
"notes": NotRequired[str],

0 commit comments

Comments
 (0)