Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Writes const info in schema class when a type is defined
  • Loading branch information
spacether committed Aug 21, 2023
commit a44f6da6cff1dee160a5c6b1f33b9d5d64bfabde
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ class StringConstString(

Do not edit the class manually.
"""
types: typing.FrozenSet[typing.Type] = frozenset({
str,
})
const_value_to_name: typing.Mapping[typing.Union[int, float, str, schemas.Bool, None], str] = dataclasses.field(
default_factory=lambda: {
"someVal": "SOME_VAL",
}
)
const = StringConstStringConst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class {{jsonPathPiece.camelCase}}(
{{/if}}
"""
{{/if}}
{{#or hasValidation enumInfo format defaultValue}}
{{#or hasValidation enumInfo format defaultValue constInfo}}
{{#eq types null}}
# any type
{{/eq}}
Expand Down