-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing apimachinery::pkg::apis::meta::v1::CreateOptions
#160
Comments
"io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions": {
"description": "DeleteOptions may be provided when deleting an API object.",
"properties": { ... which in turn is because it's used as the body of some requests (notice "parameters": {
"body-2Y1dVQaQ": {
"in": "body",
"name": "body",
"schema": {
"$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions"
}
},
"parameters": [
{
"description": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"in": "query",
"name": "dryRun",
"type": "string",
"uniqueItems": true
}, "parameters": {
"fieldManager-7c6nTn1T": {
"description": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).",
"in": "query",
"name": "fieldManager",
"type": "string",
"uniqueItems": true
}, {
"description": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
"in": "query",
"name": "fieldValidation",
"type": "string",
"uniqueItems": true
} The golang client just has a made-up type for convenience, ie so that create API just has to take one parameter instead of three. k8s-openapi used to have the same made-up type for the same reason back when it contained codegen for API operations. API operations codegen was removed in v0.20.0 so types like
If you're using kube, you'd be using |
Thank you! I'm actually working on a project called Argoflows - a Rust client for Argo Workflows. I have been referring to the Argo Workflows OpenAPI spec, which happens to have the CreateOptions type definition. As of now I'm not using That being said, I truly admire your work with I'm new to Rust, and I would truly appreciate if you have any suggestions for the project I'm working on. |
Right, the Argo Workflows spec defines In any case, for arbirary OpenAPI specs like yours you would not find the types within k8s-openapi. You have a few options:
|
I'm using v0.24.0 with
v1_31
feature. I see that the type DeleteOptions is present, however, theCreateOptions
is not.Here is its Go equivalent - https://pkg.go.dev/k8s.io/[email protected]/pkg/apis/meta/v1#CreateOptions
I would really appreciate if this can be fixed. If not, what do you recommend?
The text was updated successfully, but these errors were encountered: