Commit aa087785 authored by ggelatti's avatar ggelatti

Add dict to package name in docs

Improve package GraphQL descriptions
by translating the package names.
parent 4d33351b
...@@ -2,8 +2,14 @@ ...@@ -2,8 +2,14 @@
module Types module Types
class PackageTypeEnum < BaseEnum class PackageTypeEnum < BaseEnum
PACKAGE_TYPE_NAMES = {
pypi: 'PyPI',
npm: 'NPM'
}.freeze
::Packages::Package.package_types.keys.each do |package_type| ::Packages::Package.package_types.keys.each do |package_type|
value package_type.to_s.upcase, "Packages from the #{package_type.capitalize} package manager", value: package_type.to_s type_name = PACKAGE_TYPE_NAMES.fetch(package_type.to_sym, package_type.capitalize)
value package_type.to_s.upcase, "Packages from the #{type_name} package manager", value: package_type.to_s
end end
end end
end end
...@@ -12459,7 +12459,7 @@ enum PackageTypeEnum { ...@@ -12459,7 +12459,7 @@ enum PackageTypeEnum {
MAVEN MAVEN
""" """
Packages from the Npm package manager Packages from the NPM package manager
""" """
NPM NPM
...@@ -12469,7 +12469,7 @@ enum PackageTypeEnum { ...@@ -12469,7 +12469,7 @@ enum PackageTypeEnum {
NUGET NUGET
""" """
Packages from the Pypi package manager Packages from the PyPI package manager
""" """
PYPI PYPI
} }
......
...@@ -36737,7 +36737,7 @@ ...@@ -36737,7 +36737,7 @@
}, },
{ {
"name": "NPM", "name": "NPM",
"description": "Packages from the Npm package manager", "description": "Packages from the NPM package manager",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
...@@ -36755,7 +36755,7 @@ ...@@ -36755,7 +36755,7 @@
}, },
{ {
"name": "PYPI", "name": "PYPI",
"description": "Packages from the Pypi package manager", "description": "Packages from the PyPI package manager",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
...@@ -3447,9 +3447,9 @@ Values for sorting projects. ...@@ -3447,9 +3447,9 @@ Values for sorting projects.
| `GENERIC` | Packages from the Generic package manager | | `GENERIC` | Packages from the Generic package manager |
| `GOLANG` | Packages from the Golang package manager | | `GOLANG` | Packages from the Golang package manager |
| `MAVEN` | Packages from the Maven package manager | | `MAVEN` | Packages from the Maven package manager |
| `NPM` | Packages from the Npm package manager | | `NPM` | Packages from the NPM package manager |
| `NUGET` | Packages from the Nuget package manager | | `NUGET` | Packages from the Nuget package manager |
| `PYPI` | Packages from the Pypi package manager | | `PYPI` | Packages from the PyPI package manager |
### PipelineConfigSourceEnum ### PipelineConfigSourceEnum
......
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