Skip to content
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

Incorrect type for V1HTTPGetAction-> port #466

Closed
davidsmf opened this issue Jun 19, 2020 · 1 comment
Closed

Incorrect type for V1HTTPGetAction-> port #466

davidsmf opened this issue Jun 19, 2020 · 1 comment

Comments

@davidsmf
Copy link

    /**
    * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
    */
    'port': object;

Upstream this is defined as:

        "port": {
          "$ref": "#/definitions/io.k8s.apimachinery.pkg.util.intstr.IntOrString",
          "description": "Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME."
        },

and in turn IntOrString is

    "io.k8s.apimachinery.pkg.util.intstr.IntOrString": {
      "description": "IntOrString is a type that can hold an int32 or a string.  When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type.  This allows you to have, for example, a JSON field that can accept a name or number.",
      "format": "int-or-string",
      "type": "string"
    },

Unfortunately it looks like neither a Number or a string are valid for something of type object in Typescript.

Is this the right place to report this?

@brendandburns
Copy link
Contributor

Yeah, this is a duplicate of #370, there's some weird interaction between the Kubernetes swagger/open api and the code generator. I haven't been able to debug it properly.

Closing since this is a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants