https://prefect.io logo
d

Deceivious

07/21/2023, 9:29 AM
Hello, I am trying to edit the
parameter_openapi_schema
of an existing deployment.
1
https://github.com/PrefectHQ/prefect/blob/eeb9e219bc2fee05be23ebd3086bf6e3e97ed026/src/prefect/client/schemas/actions.py#L171 In fact the class variables in DeploymentUpdate ActionBaseModel does not even mention the open api params.
j

Jake Kaplan

07/21/2023, 2:43 PM
I'm not sure if you can modify that field manually and things will work as expected if it is different then the parameters for the flow that it's deploying
however if you do want to update it, the create endpoint is an upsert, you'd have to use
client.create_deployment()
yourself or hit the endpoint directly (theres no cli command outside the deploy command, which infers from your flow code I believe)
d

Deceivious

07/21/2023, 2:47 PM
My flows take in a string variable. I want the UI to have a drop down which I specify in the open api. These selection changes time and again and I want to make changes to those.
👍 1
j

Jake Kaplan

07/21/2023, 2:57 PM
I can't guarantee what will happen, but if you do want to modify it for existing deployment using,
client.create_deployment()
to upsert the deployment is the way to go.
d

Deceivious

07/21/2023, 3:10 PM
Yup I've tested it. The open api Param doesn't need to be the same as the flow param. Thanks I'll test create deployment
🙌 2
👍 1