Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
821468a6
Commit
821468a6
authored
Mar 25, 2020
by
Rajendra Kadam
Committed by
Rémy Coutable
Mar 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor nuget entities into own class files
parent
38703248
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
147 additions
and
73 deletions
+147
-73
ee/changelogs/unreleased/refactoring-ee-entities-16.yml
ee/changelogs/unreleased/refactoring-ee-entities-16.yml
+5
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+0
-73
ee/lib/ee/api/entities/nuget/package_metadata.rb
ee/lib/ee/api/entities/nuget/package_metadata.rb
+15
-0
ee/lib/ee/api/entities/nuget/package_metadata_catalog_entry.rb
...b/ee/api/entities/nuget/package_metadata_catalog_entry.rb
+19
-0
ee/lib/ee/api/entities/nuget/packages_metadata.rb
ee/lib/ee/api/entities/nuget/packages_metadata.rb
+14
-0
ee/lib/ee/api/entities/nuget/packages_metadata_item.rb
ee/lib/ee/api/entities/nuget/packages_metadata_item.rb
+17
-0
ee/lib/ee/api/entities/nuget/packages_versions.rb
ee/lib/ee/api/entities/nuget/packages_versions.rb
+13
-0
ee/lib/ee/api/entities/nuget/search_result.rb
ee/lib/ee/api/entities/nuget/search_result.rb
+21
-0
ee/lib/ee/api/entities/nuget/search_result_version.rb
ee/lib/ee/api/entities/nuget/search_result_version.rb
+15
-0
ee/lib/ee/api/entities/nuget/search_results.rb
ee/lib/ee/api/entities/nuget/search_results.rb
+14
-0
ee/lib/ee/api/entities/nuget/service_index.rb
ee/lib/ee/api/entities/nuget/service_index.rb
+14
-0
No files found.
ee/changelogs/unreleased/refactoring-ee-entities-16.yml
0 → 100644
View file @
821468a6
---
title
:
Separate nuget package entities into own class files
merge_request
:
27898
author
:
Rajendra Kadam
type
:
added
ee/lib/ee/api/entities.rb
deleted
100644 → 0
View file @
38703248
# frozen_string_literal: true
module
EE
module
API
module
Entities
########################
# EE-specific entities #
########################
module
Nuget
class
ServiceIndex
<
Grape
::
Entity
expose
:version
expose
:resources
end
class
PackageMetadataCatalogEntry
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:authors
expose
:dependencies
,
as: :dependencyGroups
expose
:package_name
,
as: :id
expose
:package_version
,
as: :version
expose
:archive_url
,
as: :packageContent
expose
:summary
end
class
PackageMetadata
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:archive_url
,
as: :packageContent
expose
:catalog_entry
,
as: :catalogEntry
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackageMetadataCatalogEntry
end
class
PackagesMetadataItem
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:lower_version
,
as: :lower
expose
:upper_version
,
as: :upper
expose
:packages_count
,
as: :count
expose
:packages
,
as: :items
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackageMetadata
end
class
PackagesMetadata
<
Grape
::
Entity
expose
:count
expose
:items
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackagesMetadataItem
end
class
PackagesVersions
<
Grape
::
Entity
expose
:versions
end
class
SearchResultVersion
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:version
expose
:downloads
end
class
SearchResult
<
Grape
::
Entity
expose
:type
,
as: :@type
expose
:authors
expose
:name
,
as: :id
expose
:name
,
as: :title
expose
:summary
expose
:total_downloads
,
as: :totalDownloads
expose
:verified
expose
:version
expose
:versions
,
using:
EE
::
API
::
Entities
::
Nuget
::
SearchResultVersion
end
class
SearchResults
<
Grape
::
Entity
expose
:total_count
,
as: :totalHits
expose
:data
,
using:
EE
::
API
::
Entities
::
Nuget
::
SearchResult
end
end
end
end
end
ee/lib/ee/api/entities/nuget/package_metadata.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
PackageMetadata
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:archive_url
,
as: :packageContent
expose
:catalog_entry
,
as: :catalogEntry
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackageMetadataCatalogEntry
end
end
end
end
end
ee/lib/ee/api/entities/nuget/package_metadata_catalog_entry.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
PackageMetadataCatalogEntry
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:authors
expose
:dependencies
,
as: :dependencyGroups
expose
:package_name
,
as: :id
expose
:package_version
,
as: :version
expose
:archive_url
,
as: :packageContent
expose
:summary
end
end
end
end
end
ee/lib/ee/api/entities/nuget/packages_metadata.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
PackagesMetadata
<
Grape
::
Entity
expose
:count
expose
:items
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackagesMetadataItem
end
end
end
end
end
ee/lib/ee/api/entities/nuget/packages_metadata_item.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
PackagesMetadataItem
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:lower_version
,
as: :lower
expose
:upper_version
,
as: :upper
expose
:packages_count
,
as: :count
expose
:packages
,
as: :items
,
using:
EE
::
API
::
Entities
::
Nuget
::
PackageMetadata
end
end
end
end
end
ee/lib/ee/api/entities/nuget/packages_versions.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
PackagesVersions
<
Grape
::
Entity
expose
:versions
end
end
end
end
end
ee/lib/ee/api/entities/nuget/search_result.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
SearchResult
<
Grape
::
Entity
expose
:type
,
as: :@type
expose
:authors
expose
:name
,
as: :id
expose
:name
,
as: :title
expose
:summary
expose
:total_downloads
,
as: :totalDownloads
expose
:verified
expose
:version
expose
:versions
,
using:
EE
::
API
::
Entities
::
Nuget
::
SearchResultVersion
end
end
end
end
end
ee/lib/ee/api/entities/nuget/search_result_version.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
SearchResultVersion
<
Grape
::
Entity
expose
:json_url
,
as: :@id
expose
:version
expose
:downloads
end
end
end
end
end
ee/lib/ee/api/entities/nuget/search_results.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
SearchResults
<
Grape
::
Entity
expose
:total_count
,
as: :totalHits
expose
:data
,
using:
EE
::
API
::
Entities
::
Nuget
::
SearchResult
end
end
end
end
end
ee/lib/ee/api/entities/nuget/service_index.rb
0 → 100644
View file @
821468a6
# frozen_string_literal: true
module
EE
module
API
module
Entities
module
Nuget
class
ServiceIndex
<
Grape
::
Entity
expose
:version
expose
:resources
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment