Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 91ed51b

Browse files
authored
Fixes const data access in template (#443)
1 parent 01f0f1b commit 91ed51b

File tree

1 file changed

+3
-3
lines changed
  • src/main/resources/python/components/schemas/schema_cls/validate

1 file changed

+3
-3
lines changed

src/main/resources/python/components/schemas/schema_cls/validate/validate.hbs

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def validate(
134134
{{#if ../constInfo}}
135135
) -> typing.Literal[
136136
{{#each ../constInfo.typeToValues.string}}
137-
"{{{value}}}",
137+
"{{{@key.value}}}",
138138
{{/each}}
139139
]:
140140
{{else}}
@@ -156,7 +156,7 @@ def validate(
156156
{{#if ../constInfo}}
157157
) -> typing.Literal[
158158
{{#each ../constInfo.typeToValues.integer}}
159-
{{{value}}},
159+
{{{@key.value}}},
160160
{{/each}}
161161
]:
162162
{{else}}
@@ -198,7 +198,7 @@ def validate(
198198
{{#eq this "string"}}
199199
return typing.cast(typing.Literal[
200200
{{#each ../constInfo.typeToValues.string}}
201-
"{{{value}}}",
201+
"{{{@key.value}}}",
202202
{{/each}}
203203
],
204204
validated_arg

0 commit comments

Comments
 (0)