gsloneG
Windmillโ€ข2y agoโ€ข
10 replies
gslone

Script to hub: How to pass in Ressources?

Hey, I was thinking about publishing a python script to Hub. My scripts need a config in the form of a ressource (for authentication etc.).

I've seen how python scripts do this on the hub - they pass in a dict and the metadata states that this dict is of format "resource-<resource_type>" (also documented here: https://www.windmill.dev/docs/core_concepts/json_schema_and_parsing#script-parameters-to-json-schema).

I can't get it to work. In my Script, I go to "Settings" -> Autogenerated UI -> "Customize" my parameter, and choose a ressource type.

When I save this, it reverts back to just being an object. All other changes (like parameter descriptions etc.) persist. Could this be a bug or am I doing it wrong?
JSON Schema is a key component in Windmill for defining the structure and validation rules of JSON data. Windmill uses the JSON Schema standard (2020-12 version) for specifying the schema.
Was this page helpful?