Commit 883c82d9 authored by Stan Hu's avatar Stan Hu

Merge branch 'refactoring-entities-file-32' into 'master'

Separate cluster entities into own class files

See merge request gitlab-org/gitlab!25121
parents d887cda0 f519ddbf
---
title: Separate cluster entities into own class files
merge_request: 25121
author: Rajendra Kadam
type: added
......@@ -265,23 +265,6 @@ module API
end
end
class Cluster < Grape::Entity
expose :id, :name, :created_at, :domain
expose :provider_type, :platform_type, :environment_scope, :cluster_type
expose :user, using: Entities::UserBasic
expose :platform_kubernetes, using: Entities::Platform::Kubernetes
expose :provider_gcp, using: Entities::Provider::Gcp
expose :management_project, using: Entities::ProjectIdentity
end
class ClusterProject < Cluster
expose :project, using: Entities::BasicProjectDetails
end
class ClusterGroup < Cluster
expose :group, using: Entities::BasicGroupDetails
end
module InternalPostReceive
class Message < Grape::Entity
expose :message
......
# frozen_string_literal: true
module API
module Entities
class Cluster < Grape::Entity
expose :id, :name, :created_at, :domain
expose :provider_type, :platform_type, :environment_scope, :cluster_type
expose :user, using: Entities::UserBasic
expose :platform_kubernetes, using: Entities::Platform::Kubernetes
expose :provider_gcp, using: Entities::Provider::Gcp
expose :management_project, using: Entities::ProjectIdentity
end
end
end
# frozen_string_literal: true
module API
module Entities
class ClusterGroup < Entities::Cluster
expose :group, using: Entities::BasicGroupDetails
end
end
end
# frozen_string_literal: true
module API
module Entities
class ClusterProject < Entities::Cluster
expose :project, using: Entities::BasicProjectDetails
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment