fix(go-client): fix openapi generation

This commit is contained in:
Ruben Fiszel
2022-11-02 10:55:35 +01:00
parent f7572ba2f3
commit 589cf023b2
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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