fix(go-client): fix openapi generation
This commit is contained in:
@@ -5,9 +5,10 @@ mkdir openapi
|
||||
cp ../backend/windmill-api/openapi.yaml openapi/openapi.yaml
|
||||
|
||||
sed -z 's/ extra_params:\n additionalProperties:\n type: string/ extra_params: {}/' openapi/openapi.yaml > openapi/openapi1.yaml
|
||||
sed -z 's/ enum: \[script, failure, trigger, command\]//' openapi/openapi1.yaml > openapi/openapi2.yaml
|
||||
sed -z 's/ enum: \[script, failure, trigger, command, approval\]//' openapi/openapi1.yaml > openapi/openapi2.yaml
|
||||
sed -z 's/ enum: \[deno, python3, go\]//' openapi/openapi2.yaml > openapi/openapi3.yaml
|
||||
|
||||
npx @redocly/openapi-cli@latest bundle openapi/openapi2.yaml --ext json > openapi-bundled.json
|
||||
npx @redocly/openapi-cli@latest bundle openapi/openapi3.yaml --ext json > openapi-bundled.json
|
||||
|
||||
rm -rf api/ || true
|
||||
mkdir -p api
|
||||
|
||||
@@ -53,7 +53,7 @@ func GetVariable(path string) (string, error) {
|
||||
return *res.JSON200.Value, nil
|
||||
}
|
||||
|
||||
func GetResource(path string) (map[string]interface{}, error) {
|
||||
func GetResource(path string) (interface{}, error) {
|
||||
client, err := GetClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user