Coder Social home page Coder Social logo

Comments (3)

chinglinwen avatar chinglinwen commented on August 17, 2024

retried with latest version(v1.16.3)

        "github_com_rook_rook_pkg_apis_ceph_rook_io_v1.Condition": {
            "type": "object",
            "properties": {
                "lastHeartbeatTime": {
                    "type": "string"
                },
                "lastTransitionTime": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "reason": {
                    "$ref": "#/definitions/github_com_rook_rook_pkg_apis_ceph_rook_io_v1.ConditionReason"
                },
                "status": {
                    "$ref": "#/definitions/k8s_io_api_core_v1.ConditionStatus"
                },
                "type": {
                    "$ref": "#/definitions/github_com_rook_rook_pkg_apis_ceph_rook_io_v1.ConditionType"
                }
            }
        },
        "github_com_rook_rook_pkg_apis_ceph_rook_io_v1.ConditionType": {
            "type": "string",
            "enum": [
                "Connecting",
                "Connected",
                "Progressing",
                "Ready",
                "Failure",
                "Deleting",
                "DeletionIsBlocked"
            ],
            "x-enum-varnames": [
                "ConditionConnecting",
                "ConditionConnected",
                "ConditionProgressing",
                "ConditionReady",
                "ConditionFailure",
                "ConditionDeleting",
                "ConditionDeletionIsBlocked"
            ]
        },
        "github_com_rook_rook_pkg_apis_ceph_rook_io_v1.NetworkSpec": {
            "type": "object",
            "properties": {
                "connections": {
                    "description": "Settings for network connections such as compression and encryption across the\nwire.\n+nullable\n+optional",
                    "allOf": [
                        {
                            "$ref": "#/definitions/v1.ConnectionsSpec"
                        }
                    ]
                },
                "dualStack": {
                    "description": "DualStack determines whether Ceph daemons should listen on both IPv4 and IPv6\n+optional",
                    "type": "boolean"
                },
                "hostNetwork": {
                    "description": "HostNetwork to enable host network\n+optional",
                    "type": "boolean"
                },
                "ipFamily": {
                    "description": "IPFamily is the single stack IPv6 or IPv4 protocol\n+kubebuilder:validation:Enum=IPv4;IPv6\n+nullable\n+optional",
                    "allOf": [
                        {
                            "$ref": "#/definitions/v1.IPFamilyType"
                        }
                    ]
                },
                "multiClusterService": {
                    "description": "Enable multiClusterService to export the Services between peer clusters\n+optional",
                    "allOf": [
                        {
                            "$ref": "#/definitions/v1.MultiClusterServiceSpec"
                        }
                    ]
                },
                "provider": {
                    "description": "Provider is what provides network connectivity to the cluster e.g. \"host\" or \"multus\"\n+nullable\n+optional",
                    "type": "string"
                },
                "selectors": {
                    "description": "Selectors string values describe what networks will be used to connect the cluster.\nMeanwhile the keys describe each network respective responsibilities or any metadata\nstorage provider decide.\n+nullable\n+optional",
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                }
            }
        },

why it doesn't generate #/definitions/github_com_rook_rook_pkg_apis_ceph_rook_io_v1.ConnectionsSpec, instead it generate #/definitions/v1.ConnectionsSpec

but the "#/definitions/k8s_io_api_core_v1.ConditionStatus" is ok, with full path.

api (generate swagger.json)
github.com/rook/rook/pkg/apis ( import by api, type CephCluster = rookv1.CephCluster )

above referenced two different type

NetworkSpec
https://github.com/rook/rook/blob/master/pkg/apis/ceph.rook.io/v1/types.go#L2391-L2458


Condition
https://github.com/rook/rook/blob/master/pkg/apis/ceph.rook.io/v1/types.go#L498-L505

from swag.

sdghchj avatar sdghchj commented on August 17, 2024

If there are definitions with the same name, also from different packages with the same package name, full package path will be used to distinguish them. Otherwise, the package name will be used.

from swag.

chinglinwen avatar chinglinwen commented on August 17, 2024

Can we have a flag etc to turn it always using 'full package path' ?

from swag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.