mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
virtcontainers: clh: Upgrade to openapi-generator v5.3.0
The latest release of openapi-generator v5.3.0 contains the fix for `dropping err` bug [1]. This patch also re-generated the client code of Cloud Hypervisor to have the bug fixed. [1] https://github.com/OpenAPITools/openapi-generator/pull/10275 Fixes: #3201 Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
d02a0932d6
commit
995300260e
@ -13,7 +13,7 @@ YQ := $(shell command -v yq 2> /dev/null)
|
|||||||
generate-client-code: clean-generated-code
|
generate-client-code: clean-generated-code
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--user $$(id -u):$$(id -g) \
|
--user $$(id -u):$$(id -g) \
|
||||||
-v $${PWD}:/local openapitools/openapi-generator-cli:v5.2.1 generate \
|
-v $${PWD}:/local openapitools/openapi-generator-cli:v5.3.0 generate \
|
||||||
-i /local/cloud-hypervisor.yaml \
|
-i /local/cloud-hypervisor.yaml \
|
||||||
-g go \
|
-g go \
|
||||||
-o /local/client
|
-o /local/client
|
||||||
|
@ -1 +1 @@
|
|||||||
5.2.1
|
5.3.0
|
@ -58,7 +58,7 @@ Note, enum values are always validated and all unused variables are silently ign
|
|||||||
### URLs Configuration per Operation
|
### URLs Configuration per Operation
|
||||||
|
|
||||||
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
|
||||||
An operation is uniquely identifield by `"{classname}Service.{nickname}"` string.
|
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
|
||||||
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
|
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -366,6 +366,9 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
_, err = (*f).Write(b)
|
_, err = (*f).Write(b)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
_, err = (*f).Seek(0, io.SeekStart)
|
_, err = (*f).Seek(0, io.SeekStart)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
#
|
#
|
||||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
||||||
|
|
||||||
git_user_id=$1
|
git_user_id=$1
|
||||||
git_repo_id=$2
|
git_repo_id=$2
|
||||||
@ -38,14 +38,14 @@ git add .
|
|||||||
git commit -m "$release_note"
|
git commit -m "$release_note"
|
||||||
|
|
||||||
# Sets the new remote
|
# Sets the new remote
|
||||||
git_remote=`git remote`
|
git_remote=$(git remote)
|
||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
else
|
else
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@ -55,4 +55,3 @@ git pull origin master
|
|||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
||||||
git push origin master 2>&1 | grep -v 'To https'
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user