JsonCodeParam
Param for json code. It shows a simple json IDE in the interface to provide code for json. The value of this param is a dict.
It can also handle comments in the JSON code. It supports only single-line comments. Valid example: { // This is a comment "key": "value" }
Unvalid example: { /* This is a comment */ "key": "value" }
Unvalid example: { "key": "value" // This is a comment }
:param ParamSpec: description :type ParamSpec: type
PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: dict | Noneai_catalog_member: booldefault_value: Optionalhuman_name: str | Noneinvalid_reason: str | Noneis_valid: booloptional: boolshort_description: str | Nonevisibility: LiteralOptionalbool - FalseLiteral - publicstr | Nonestr | NoneValidate the json code.
Anydict | list | NoneAnyParamSpecDTOParamSpecSimpleDTOValidate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.
AnyAnyMaps this type's AI-relevant additional_info constraint keys to a
human explanation. Default: none. Override on types that expose
constraints (min/max, lengths, multiple, ...).
dictA representative, valid instance of this type used as the example in
:meth:describe_for_ai. Override to show meaningful constraints
(e.g. min/max). The default is a bare instance with a human_name.
JsonCodeParamOne-line description of what this field type is for. Override per type.
strSelf-describe this param type for an AI form-builder.
Returns the type tag, a one-line summary, the meaning of each
AI-relevant additional_info key, and a real example spec serialized
exactly as ConfigSpecs.from_json expects. Built from
:meth:ai_example_spec / :meth:ai_summary / :meth:ai_additional_info_doc
so a type only overrides the small pieces it cares about. Keeping this on
the type (not in the AI service) means a new param type ships its own
catalog entry.
str - example_fieldParamSpecAiDescriptionDTOSelfThe :class:ParamSpecCategory this type was registered with by the
@param_spec_decorator. None if the class was never decorated.
gws_core.config.param.param_spec_decorator.ParamSpecCategory | NoneParamSpecTypeParamSpecDTObool - FalseSelf