...

Text file src/github.com/go-openapi/validate/fixtures/bugs/1621/definitions.yaml

Documentation: github.com/go-openapi/validate/fixtures/bugs/1621

     1definitions:
     2
     3  # Generic response model
     4  V4GenericResponse:
     5    type: object
     6    properties:
     7      message:
     8        type: string
     9        description: A human readable message
    10      code:
    11        type: string
    12        description: |
    13          A machine readable [response code](https://github.com/giantswarm/api-spec/blob/master/details/RESPONSE_CODES.md) like e. g. `INVALID_CREDENTIALS`
    14
    15  # Info resposne
    16  V4InfoResponse:
    17    type: object
    18    properties:
    19      general:
    20        description: General information
    21        type: object
    22        properties:
    23          installation_name:
    24            description: Unique name of the installation
    25            type: string
    26          provider:
    27            description: The technical provider used in this installation. Either "kvm", "aws", or "azure".
    28            type: string
    29          datacenter:
    30            description: Identifier of the datacenter or cloud provider region, e. g. "eu-west-1"
    31            type: string
    32      workers:
    33        description: Information related to worker nodes
    34        type: object
    35        properties:
    36          count_per_cluster:
    37            description: Number of workers per cluster
    38            type: object
    39            properties:
    40              max:
    41                description: Maximum number of worker a cluster can have
    42                type: number
    43              default:
    44                description: Default number of workers in a new cluster will have, if not specifiec otherwise
    45                type: number
    46          instance_type:
    47            description: Instance types to be used for worker nodes. Only available for AWS clusters.
    48            type: object
    49            properties:
    50              options:
    51                description: List of available instance types
    52                type: array
    53                items:
    54                  type: string
    55              default:
    56                description: The instance type used in new cluster, if not specified
    57                type: string
    58          vm_size:
    59            description: Azure Virtual Machine size to be used for worker nodes. Only available for Azure clusters.
    60            type: object
    61            properties:
    62              options:
    63                description: List of available instance types
    64                type: array
    65                items:
    66                  type: string
    67              default:
    68                description: The instance type used in new cluster, if not specified
    69                type: string
    70
    71  # Request to create a new cluster
    72  V4AddClusterRequest:
    73    type: object
    74    required:
    75      - owner
    76    description: Request model for creating a new cluster
    77    properties:
    78      owner:
    79        type: string
    80        description: Name of the organization owning the cluster
    81      name:
    82        type: string
    83        description: Cluster name
    84      release_version:
    85        type: string
    86        description: |
    87          The [release](https://docs.giantswarm.io/api/#tag/releases) version
    88          to use in the new cluster
    89      kubernetes_version:
    90        type: string
    91        description: |
    92          Kubernetes version number (deprecated). Doesn't have any effect.
    93          This attribute is going to be removed in future API versions.
    94      workers:
    95        type: array
    96        items:
    97          $ref: '#/definitions/V4NodeDefinition'
    98
    99  V4ModifyClusterRequest:
   100    type: object
   101    required: []
   102    description: Request body for cluster modification
   103    properties:
   104      name:
   105        type: string
   106        description: Name for the cluster
   107      owner:
   108        type: string
   109        description: Name of the organization owning the cluster
   110      release_version:
   111        type: string
   112        description: Release version to use after an upgrade
   113      workers:
   114        type: array
   115        description: Worker node array
   116        items:
   117          $ref: '#/definitions/V4NodeDefinition'
   118
   119  # Details on existing cluster
   120  V4ClusterDetailsResponse:
   121    type: object
   122    description: Response model showing details of a cluster
   123    properties:
   124      id:
   125        type: string
   126        description: Unique cluster identifier
   127      api_endpoint:
   128        type: string
   129        description: URI of the Kubernetes API endpoint
   130      create_date:
   131        type: string
   132        description: Date/time of cluster creation
   133      owner:
   134        type: string
   135        description: Name of the organization owning the cluster
   136      name:
   137        type: string
   138        description: Cluster name
   139      release_version:
   140        type: string
   141        description: |
   142          The [release](https://docs.giantswarm.io/api/#tag/releases) version
   143          currently running this cluster.
   144      kubernetes_version:
   145        type: string
   146        description: Deprecated. Will be removed in a future API version.
   147      workers:
   148        type: array
   149        items:
   150          $ref: '#/definitions/V4NodeDefinition'
   151      kvm:
   152        type: object
   153        description: Attributes specific to clusters running on KVM (on-prem) installations.
   154        properties:
   155          port_mappings:
   156            type: array
   157            description: |
   158              Reveals the ports on the host cluster that are mapped to this guest cluster's ingress
   159              and which protocol that port supports. Only shown and relevant on our on-prem KVM clusters.
   160            items:
   161              type: object
   162              properties:
   163                port:
   164                  description: |
   165                    The port on the host cluster that will forward traffic to the guest cluster
   166                  type: integer
   167                protocol:
   168                  description: |
   169                    The protocol this port mapping is made for.
   170                  type: string
   171
   172  # Definition of a cluster node
   173  V4NodeDefinition:
   174    type: object
   175    properties:
   176      aws:
   177        type: object
   178        description: |
   179          Attributes specific to nodes running on Amazon Web Services (AWS)
   180        properties:
   181          instance_type:
   182            type: string
   183            description: |
   184              EC2 instance type name. Must be the same for all worker nodes
   185              of a cluster.
   186      azure:
   187        type: object
   188        description: |
   189          Attributes specific to nodes running on Microsoft Azure
   190        properties:
   191          vm_size:
   192            type: string
   193            description: |
   194              Azure Virtual Machine size. Must be the same for all worker nodes
   195              of a cluster.
   196      memory:
   197        type: object
   198        properties:
   199          size_gb:
   200            type: number
   201            description: RAM size in GB. Can be an integer or float.
   202      storage:
   203        type: object
   204        properties:
   205          size_gb:
   206            type: number
   207            description: Node storage size in GB. Can be an integer or float.
   208      cpu:
   209        type: object
   210        properties:
   211          cores:
   212            type: integer
   213            description: Number of CPU cores
   214      labels:
   215        type: object
   216        additionalProperties: true
   217
   218  # List of key pairs
   219  V4GetKeyPairsResponse:
   220    type: array
   221    description: Array of sparse key pair objects
   222    items:
   223      type: object
   224      properties:
   225        id:
   226          type: string
   227          description: Unique identifier of the key pair
   228        description:
   229          type: string
   230          description: Free text information about the key pair
   231        ttl_hours:
   232          type: integer
   233          description: Expiration time (from creation) in hours
   234        create_date:
   235          type: string
   236          description: Date/time of creation
   237        common_name:
   238          type: string
   239          description: The common name of the certificate subject.
   240        certificate_organizations:
   241          type: string
   242          description: The certificate subject's `organization` fields.
   243
   244  # Add key pair request
   245  V4AddKeyPairRequest:
   246    type: object
   247    required:
   248      - description
   249    properties:
   250      description:
   251        type: string
   252        description: Free text information about the key pair
   253      ttl_hours:
   254        type: integer
   255        format: int32
   256        description: Expiration time (from creation) in hours
   257      cn_prefix:
   258        type: string
   259        description: The common name prefix of the certificate subject. This only allows characters that are usable in domain names (`a-z`, `0-9`, and `.-`, where `.-` must not occur at either the start or the end).
   260      certificate_organizations:
   261        type: string
   262        description: |
   263          This will set the certificate subject's `organization` fields.
   264          Use a comma seperated list of values.
   265
   266  V4AddKeyPairResponse:
   267    type: object
   268    properties:
   269      id:
   270        type: string
   271        description: Unique identifier of the key pair
   272      description:
   273        type: string
   274        description: Free text information about the key pair
   275      ttl_hours:
   276        type: integer
   277        description: Expiration time (from creation) in hours
   278      create_date:
   279        type: string
   280        description: Date/time of creation
   281      certificate_authority_data:
   282        type: string
   283        description: PEM-encoded CA certificate of the cluster
   284      client_key_data:
   285        type: string
   286        description: PEM-encoded RSA private key
   287      client_certificate_data:
   288        type: string
   289        description: PEM-encoded certificate
   290
   291  # cluster metrics
   292  V4GetClusterMetricsResponse:
   293    description: Response for the getClusterMetrics operation
   294    type: object
   295    properties:
   296      workers:
   297        description: Group of metrics regarding workers
   298        type: array
   299        items:
   300          $ref: '#/definitions/V4NodeMetrics'
   301
   302  V4NodeMetrics:
   303    type: object
   304    properties:
   305      id:
   306        description: String identifying the node
   307        type: string
   308      metrics:
   309        description: Container object for all metrics available for the node
   310        type: object
   311        properties:
   312          container_count:
   313            type: object
   314            properties:
   315              timestamp:
   316                description: Time when the given value has been recorded
   317                type: string
   318              value:
   319                description: The value for the metric. Can be an integer or float.
   320                type: number
   321          pod_count:
   322            type: object
   323            properties:
   324              timestamp:
   325                description: Time when the given value has been recorded
   326                type: string
   327              value:
   328                description: The value for the metric. Can be an integer or float.
   329                type: number
   330          cpu_used:
   331            type: object
   332            properties:
   333              timestamp:
   334                description: Time when the given value has been recorded
   335                type: string
   336              value:
   337                description: The value for the metric. Can be an integer or float.
   338                type: number
   339          ram_free:
   340            type: object
   341            properties:
   342              timestamp:
   343                description: Time when the given value has been recorded
   344                type: string
   345              value:
   346                description: The value for the metric. Can be an integer or float.
   347                type: number
   348          ram_available:
   349            type: object
   350            properties:
   351              timestamp:
   352                description: Time when the given value has been recorded
   353                type: string
   354              value:
   355                description: The value for the metric. Can be an integer or float.
   356                type: number
   357          ram_cached:
   358            type: object
   359            properties:
   360              timestamp:
   361                description: Time when the given value has been recorded
   362                type: string
   363              value:
   364                description: The value for the metric. Can be an integer or float.
   365                type: number
   366          ram_buffers:
   367            type: object
   368            properties:
   369              timestamp:
   370                description: Time when the given value has been recorded
   371                type: string
   372              value:
   373                description: The value for the metric. Can be an integer or float.
   374                type: number
   375          ram_mapped:
   376            type: object
   377            properties:
   378              timestamp:
   379                description: Time when the given value has been recorded
   380                type: string
   381              value:
   382                description: The value for the metric. Can be an integer or float.
   383                type: number
   384          node_storage_used:
   385            type: object
   386            properties:
   387              timestamp:
   388                description: Time when the given value has been recorded
   389                type: string
   390              value:
   391                description: The value for the metric. Can be an integer or float.
   392                type: number
   393          network_rx:
   394            type: object
   395            properties:
   396              timestamp:
   397                description: Time when the given value has been recorded
   398                type: string
   399              value:
   400                description: The value for the metric. Can be an integer or float.
   401                type: number
   402          network_tx:
   403            type: object
   404            properties:
   405              timestamp:
   406                description: Time when the given value has been recorded
   407                type: string
   408              value:
   409                description: The value for the metric. Can be an integer or float.
   410                type: number
   411          resource_cpu_requests:
   412            type: object
   413            properties:
   414              timestamp:
   415                description: Time when the given value has been recorded
   416                type: string
   417              value:
   418                description: The value for the metric. Can be an integer or float.
   419                type: number
   420          resource_cpu_limits:
   421            type: object
   422            properties:
   423              timestamp:
   424                description: Time when the given value has been recorded
   425                type: string
   426              value:
   427                description: The value for the metric. Can be an integer or float.
   428                type: number
   429          resource_ram_requests:
   430            type: object
   431            properties:
   432              timestamp:
   433                description: Time when the given value has been recorded
   434                type: string
   435              value:
   436                description: The value for the metric. Can be an integer or float.
   437                type: number
   438          resource_ram_limits:
   439            type: object
   440            properties:
   441              timestamp:
   442                description: Time when the given value has been recorded
   443                type: string
   444              value:
   445                description: The value for the metric. Can be an integer or float.
   446                type: number
   447
   448  # a complete organization object
   449  V4Organization:
   450    type: object
   451    properties:
   452      id:
   453        type: string
   454        description: Unique name/identifier of the organization
   455      members:
   456        type: array
   457        description: List of members that belong to this organization
   458        items:
   459          $ref: '#/definitions/V4OrganizationMember'
   460
   461  # An organization as returned by getOrganizations as an array item
   462  V4OrganizationListItem:
   463    type: object
   464    properties:
   465      id:
   466        type: string
   467        description: Unique name/identifier of the organization
   468
   469  # A user that belongs to an organization
   470  V4OrganizationMember:
   471    type: object
   472    properties:
   473      email:
   474        type: string
   475        description: Email address of the user
   476
   477  # One of the users in the array as returned by getUsers
   478  V4UserListItem:
   479    type: object
   480    properties:
   481      email:
   482        type: string
   483        description: Email address of the user
   484      created:
   485        type: string
   486        description: The date and time that this account was created
   487      expiry:
   488        type: string
   489        description: The date and time when this account will expire
   490
   491  # A cluster array item, as return by getClusters
   492  V4ClusterListItem:
   493    type: object
   494    properties:
   495      id:
   496        type: string
   497        description: Unique cluster identifier
   498      create_date:
   499        type: string
   500        description: Date/time of cluster creation
   501      name:
   502        type: string
   503        description: Cluster name
   504      owner:
   505        type: string
   506        description: Name of the organization owning the cluster
   507      release_version:
   508        type: string
   509        description: The semantic version number of this cluster
   510
   511  # A cluster array item, as return by getClusters
   512  V4ReleaseListItem:
   513    type: object
   514    required: ["version", "timestamp", "changelog", "components"]
   515    properties:
   516      version:
   517        type: string
   518        description: The semantic version number
   519      timestamp:
   520        type: string
   521        description: Date and time of the release creation
   522      active:
   523        type: boolean
   524        description: |
   525          If true, the version is available for new clusters and cluster
   526          upgrades. Older versions become unavailable and thus have the
   527          value `false` here.
   528      changelog:
   529        description: |
   530          Structured list of changes in this release, in comparison to the
   531          previous version, with respect to the contained components.
   532        type: array
   533        items:
   534          type: object
   535          properties:
   536            component:
   537              type: string
   538              description: |
   539                If the changed item was a component, this attribute is the
   540                name of the component.
   541            description:
   542              type: string
   543              description: Human-friendly description of the change
   544      components:
   545        description: |
   546          List of components and their version contained in the release
   547        type: array
   548        items:
   549          type: object
   550          required: ["name", "version"]
   551          properties:
   552            name:
   553              type: string
   554              description: Name of the component
   555            version:
   556              type: string
   557              description: Version number of the component
   558
   559  V4CreateUserRequest:
   560    type: object
   561    required:
   562      - password
   563    description: Request model for creating a new user
   564    properties:
   565      password:
   566        type: string
   567        description: A Base64 encoded password
   568      expiry:
   569        type: string
   570        description: The date and time when this account will expire
   571
   572  V4AddCredentialsRequest:
   573    type: object
   574    required:
   575      - provider
   576    description: Request model for adding a set of credentials
   577    properties:
   578      provider:
   579        type: string
   580      aws:
   581        type: object
   582        description: Credentials specific to an AWS account
   583        required:
   584          - roles
   585        properties:
   586          roles:
   587            type: object
   588            description: IAM roles to assume by certain entities
   589            required:
   590              - awsoperator
   591              - admin
   592            properties:
   593              admin:
   594                type: string
   595                description: ARN of the IAM role to assume by Giant Swarm support staff
   596              awsoperator:
   597                type: string
   598                description: ARN of the IAM role to assume by the software operating clusters
   599
   600  # A request for an auth token
   601  V4CreateAuthTokenRequest:
   602    type: object
   603    properties:
   604      email:
   605        type: string
   606        description: Your email address
   607      password_base64:
   608        type: string
   609        description: Your password as a base64 encoded string
   610
   611  # A response to a successful auth token request
   612  V4CreateAuthTokenResponse:
   613    type: object
   614    properties:
   615      auth_token:
   616        type: string
   617        description: The newly created API token
   618

View as plain text