Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added unit test for describe #521

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"id": "00000000-0000-0000-0000-000000000000",
"schemaVersion": "core.meshery.io/v1beta1",
"displayName": "Composite Resource Definition",
"description": "",
"format": "JSON",
"model": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "crossplane-types",
"displayName": "crossplane-types",
"description": "",
"status": "",
"hostID": "00000000-0000-0000-0000-000000000000",
"registrant": {
"hostname": ""
},
"category": {
"name": "",
"metadata": null
},
"subCategory": "",
"metadata": {
"source_uri": "https://charts.crossplane.io/master/crossplane-types-0.13.0-rc.191.g3a18fb7.tgz"
},
"model": {},
"components": null,
"relationships": null
},
"metadata": {
"isNamespaced": false
},
"component": {
"kind": "CompositeResourceDefinition",
"version": "apiextensions.crossplane.io/v1alpha1",
"schema": "{\n \"description\": \"An CompositeResourceDefinition defines a new kind of composite infrastructure resource. The new resource is composed of other composite or managed infrastructure resources.\",\n \"properties\": {\n \"spec\": {\n \"description\": \"CompositeResourceDefinitionSpec specifies the desired state of the definition.\",\n \"properties\": {\n \"claimNames\": {\n \"description\": \"ClaimNames specifies the names of an optional composite resource claim. When claim names are specified Crossplane will create a namespaced 'composite resource claim' CRD that corresponds to the defined composite resource. This composite resource claim acts as a namespaced proxy for the composite resource; creating, updating, or deleting the claim will create, update, or delete a corresponding composite resource. You may add claim names to an existing CompositeResourceDefinition, but they cannot be changed once they have been set.\",\n \"properties\": {\n \"categories\": {\n \"description\": \"categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"kind\": {\n \"description\": \"kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.\",\n \"type\": \"string\"\n },\n \"listKind\": {\n \"description\": \"listKind is the serialized kind of the list for this resource. Defaults to \\\"`kind`List\\\".\",\n \"type\": \"string\"\n },\n \"plural\": {\n \"description\": \"plural is the plural name of the resource to serve. The custom resources are served under `/apis/\\u003cgroup\\u003e/\\u003cversion\\u003e/.../\\u003cplural\\u003e`. Must match the name of the CustomResourceDefinition (in the form `\\u003cnames.plural\\u003e.\\u003cgroup\\u003e`). Must be all lowercase.\",\n \"type\": \"string\"\n },\n \"shortNames\": {\n \"description\": \"shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get \\u003cshortname\\u003e`. It must be all lowercase.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"singular\": {\n \"description\": \"singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"kind\",\n \"plural\"\n ],\n \"type\": \"object\"\n },\n \"connectionSecretKeys\": {\n \"description\": \"ConnectionSecretKeys is the list of keys that will be exposed to the end user of the defined kind.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"crdSpecTemplate\": {\n \"description\": \"CRDSpecTemplate is the base CRD template. The final CRD will have additional fields to the base template to accommodate Crossplane machinery.\",\n \"properties\": {\n \"additionalPrinterColumns\": {\n \"description\": \"additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.\",\n \"items\": {\n \"description\": \"CustomResourceColumnDefinition specifies a column for server side printing.\",\n \"properties\": {\n \"JSONPath\": {\n \"description\": \"JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.\",\n \"type\": \"string\"\n },\n \"description\": {\n \"description\": \"description is a human readable description of this column.\",\n \"type\": \"string\"\n },\n \"format\": {\n \"description\": \"format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\",\n \"type\": \"string\"\n },\n \"name\": {\n \"description\": \"name is a human readable name for the column.\",\n \"type\": \"string\"\n },\n \"priority\": {\n \"description\": \"priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.\",\n \"format\": \"int32\",\n \"type\": \"integer\"\n },\n \"type\": {\n \"description\": \"type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"JSONPath\",\n \"name\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"group\": {\n \"description\": \"group is the API group of the defined custom resource. The custom resources are served under `/apis/\\u003cgroup\\u003e/...`. Must match the name of the CustomResourceDefinition (in the form `\\u003cnames.plural\\u003e.\\u003cgroup\\u003e`).\",\n \"type\": \"string\"\n },\n \"names\": {\n \"description\": \"names specify the resource and kind names for the custom resource.\",\n \"properties\": {\n \"categories\": {\n \"description\": \"categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). This is published in API discovery documents, and used by clients to support invocations like `kubectl get all`.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"kind\": {\n \"description\": \"kind is the serialized kind of the resource. It is normally CamelCase and singular. Custom resource instances will use this value as the `kind` attribute in API calls.\",\n \"type\": \"string\"\n },\n \"listKind\": {\n \"description\": \"listKind is the serialized kind of the list for this resource. Defaults to \\\"`kind`List\\\".\",\n \"type\": \"string\"\n },\n \"plural\": {\n \"description\": \"plural is the plural name of the resource to serve. The custom resources are served under `/apis/\\u003cgroup\\u003e/\\u003cversion\\u003e/.../\\u003cplural\\u003e`. Must match the name of the CustomResourceDefinition (in the form `\\u003cnames.plural\\u003e.\\u003cgroup\\u003e`). Must be all lowercase.\",\n \"type\": \"string\"\n },\n \"shortNames\": {\n \"description\": \"shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like `kubectl get \\u003cshortname\\u003e`. It must be all lowercase.\",\n \"items\": {\n \"type\": \"string\"\n },\n \"type\": \"array\"\n },\n \"singular\": {\n \"description\": \"singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"kind\",\n \"plural\"\n ],\n \"type\": \"object\"\n },\n \"validation\": {\n \"description\": \"validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.\",\n \"properties\": {\n \"openAPIV3Schema\": {\n \"description\": \"openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.\",\n \"type\": \"object\"\n }\n },\n \"type\": \"object\"\n },\n \"version\": {\n \"description\": \"version is the API version of the defined custom resource. The custom resources are served under `/apis/\\u003cgroup\\u003e/\\u003cversion\\u003e/...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"group\",\n \"names\"\n ],\n \"type\": \"object\"\n },\n \"defaultCompositionRef\": {\n \"description\": \"DefaultCompositionRef refers to the Composition resource that will be used in case no composition selector is given.\",\n \"properties\": {\n \"name\": {\n \"description\": \"Name of the referenced object.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"name\"\n ],\n \"type\": \"object\"\n },\n \"enforcedCompositionRef\": {\n \"description\": \"EnforcedCompositionRef refers to the Composition resource that will be used by all composite instances whose schema is defined by this definition.\",\n \"properties\": {\n \"name\": {\n \"description\": \"Name of the referenced object.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"name\"\n ],\n \"type\": \"object\"\n }\n },\n \"type\": \"object\"\n }\n },\n \"title\": \"Composite Resource Definition\",\n \"type\": \"object\"\n}"
}
}
37 changes: 37 additions & 0 deletions generators/artifacthub/crossplane-types/Composition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"id": "00000000-0000-0000-0000-000000000000",
"schemaVersion": "core.meshery.io/v1beta1",
"displayName": "Composition",
"description": "",
"format": "JSON",
"model": {
"id": "00000000-0000-0000-0000-000000000000",
"name": "crossplane-types",
"displayName": "crossplane-types",
"description": "",
"status": "",
"hostID": "00000000-0000-0000-0000-000000000000",
"registrant": {
"hostname": ""
},
"category": {
"name": "",
"metadata": null
},
"subCategory": "",
"metadata": {
"source_uri": "https://charts.crossplane.io/master/crossplane-types-0.13.0-rc.191.g3a18fb7.tgz"
},
"model": {},
"components": null,
"relationships": null
},
"metadata": {
"isNamespaced": false
},
"component": {
"kind": "Composition",
"version": "apiextensions.crossplane.io/v1alpha1",
"schema": "{\n \"description\": \"Composition defines the group of resources to be created when a compatible type is created with reference to the composition.\",\n \"properties\": {\n \"spec\": {\n \"description\": \"CompositionSpec specifies the desired state of the definition.\",\n \"properties\": {\n \"compositeTypeRef\": {\n \"description\": \"CompositeTypeRef specifies the type of composite resource that this composition is compatible with.\",\n \"properties\": {\n \"apiVersion\": {\n \"description\": \"APIVersion of the type.\",\n \"type\": \"string\"\n },\n \"kind\": {\n \"description\": \"Kind of the type.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"apiVersion\",\n \"kind\"\n ],\n \"type\": \"object\"\n },\n \"resources\": {\n \"description\": \"Resources is the list of resource templates that will be used when a composite resource referring to this composition is created.\",\n \"items\": {\n \"description\": \"ComposedTemplate is used to provide information about how the composed resource should be processed.\",\n \"properties\": {\n \"base\": {\n \"description\": \"Base is the target resource that the patches will be applied on.\",\n \"type\": \"object\"\n },\n \"connectionDetails\": {\n \"description\": \"ConnectionDetails lists the propagation secret keys from this target resource to the composition instance connection secret.\",\n \"items\": {\n \"description\": \"ConnectionDetail includes the information about the propagation of the connection information from one secret to another.\",\n \"properties\": {\n \"fromConnectionSecretKey\": {\n \"description\": \"FromConnectionSecretKey is the key that will be used to fetch the value from the given target resource.\",\n \"type\": \"string\"\n },\n \"name\": {\n \"description\": \"Name of the connection secret key that will be propagated to the connection secret of the composition instance. Leave empty if you'd like to use the same key name.\",\n \"type\": \"string\"\n },\n \"value\": {\n \"description\": \"Value that will be propagated to the connection secret of the composition instance. Typically you should use FromConnectionSecretKey instead, but an explicit value may be set to inject a fixed, non-sensitive connection secret values, for example a well-known port. Supercedes FromConnectionSecretKey when set.\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"patches\": {\n \"description\": \"Patches will be applied as overlay to the base resource.\",\n \"items\": {\n \"description\": \"Patch is used to patch the field on the base resource at ToFieldPath after piping the value that is at FromFieldPath of the target resource through transformers.\",\n \"properties\": {\n \"fromFieldPath\": {\n \"description\": \"FromFieldPath is the path of the field on the upstream resource whose value to be used as input.\",\n \"type\": \"string\"\n },\n \"toFieldPath\": {\n \"description\": \"ToFieldPath is the path of the field on the base resource whose value will be changed with the result of transforms. Leave empty if you'd like to propagate to the same path on the target resource.\",\n \"type\": \"string\"\n },\n \"transforms\": {\n \"description\": \"Transforms are the list of functions that are used as a FIFO pipe for the input to be transformed.\",\n \"items\": {\n \"description\": \"Transform is a unit of process whose input is transformed into an output with the supplied configuration.\",\n \"properties\": {\n \"map\": {\n \"additionalProperties\": {\n \"type\": \"string\"\n },\n \"description\": \"Map uses the input as a key in the given map and returns the value.\",\n \"type\": \"object\"\n },\n \"math\": {\n \"description\": \"Math is used to transform the input via mathematical operations such as multiplication.\",\n \"properties\": {\n \"multiply\": {\n \"description\": \"Multiply the value.\",\n \"format\": \"int64\",\n \"type\": \"integer\"\n }\n },\n \"type\": \"object\"\n },\n \"string\": {\n \"description\": \"String is used to transform the input into a string or a different kind of string. Note that the input does not necessarily need to be a string.\",\n \"properties\": {\n \"fmt\": {\n \"description\": \"Format the input using a Go format string. See https://golang.org/pkg/fmt/ for details.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fmt\"\n ],\n \"type\": \"object\"\n },\n \"type\": {\n \"description\": \"Type of the transform to be run.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"fromFieldPath\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"readinessChecks\": {\n \"description\": \"ReadinessChecks allows users to define custom readiness checks. All checks have to return true in order for resource to be considered ready. The default readiness check is to have the \\\"Ready\\\" condition to be \\\"True\\\".\",\n \"items\": {\n \"description\": \"ReadinessCheck is used to indicate how to tell whether a resource is ready for consumption\",\n \"properties\": {\n \"fieldPath\": {\n \"description\": \"FieldPath shows the path of the field whose value will be used.\",\n \"type\": \"string\"\n },\n \"matchInteger\": {\n \"description\": \"MatchInt is the value you'd like to match if you're using \\\"MatchInt\\\" type.\",\n \"format\": \"int64\",\n \"type\": \"integer\"\n },\n \"matchString\": {\n \"description\": \"MatchString is the value you'd like to match if you're using \\\"MatchString\\\" type.\",\n \"type\": \"string\"\n },\n \"type\": {\n \"description\": \"Type indicates the type of probe you'd like to use.\",\n \"enum\": [\n \"MatchString\",\n \"MatchInteger\",\n \"NonEmpty\"\n ],\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"fieldPath\",\n \"type\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n }\n },\n \"required\": [\n \"base\"\n ],\n \"type\": \"object\"\n },\n \"type\": \"array\"\n },\n \"writeConnectionSecretsToNamespace\": {\n \"description\": \"WriteConnectionSecretsToNamespace specifies the namespace in which the connection secrets of composite resource dynamically provisioned using this composition will be created.\",\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"compositeTypeRef\",\n \"resources\"\n ],\n \"type\": \"object\"\n }\n },\n \"title\": \"Composition\",\n \"type\": \"object\"\n}"
}
}
Loading
Loading