Skip to content
Merged
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
22 changes: 22 additions & 0 deletions src/api/json/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -4955,6 +4955,28 @@
"fileMatch": ["kustomization.yaml", "kustomization.yml"],
"url": "https://www.schemastore.org/kustomization.json"
},
{
"name": "replacement-transformer.yaml",
"description": "Configuration file for the Kustomize ReplacementTransformer built-in, referenced from the transformers field of a kustomization.yaml file",
"fileMatch": [
"replacement-transformer.yaml",
"replacement-transformer.yml",
"replacementtransformer.yaml",
"replacementtransformer.yml"
],
"url": "https://www.schemastore.org/replacement-transformer.json"
},
{
"name": "value-add-transformer.yaml",
"description": "Configuration file for the Kustomize ValueAddTransformer built-in, referenced from the transformers field of a kustomization.yaml file",
"fileMatch": [
"value-add-transformer.yaml",
"value-add-transformer.yml",
"valueaddtransformer.yaml",
"valueaddtransformer.yml"
],
"url": "https://www.schemastore.org/value-add-transformer.json"
},
{
"name": "label-commenter-config.yml",
"description": "A the configuration of the Label Commenter GitHub Action",
Expand Down
12 changes: 12 additions & 0 deletions src/negative_test/replacement-transformer/wrong-kind.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# yaml-language-server: $schema=../../schemas/json/replacement-transformer.json
apiVersion: builtin
kind: ValueAddTransformer
metadata:
name: notImportantHere
replacements:
- source:
kind: ConfigMap
name: example-configmap
targets:
- select:
kind: Deployment
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# yaml-language-server: $schema=../../schemas/json/value-add-transformer.json
apiVersion: builtin
kind: ValueAddTransformer
metadata:
name: notImportantHere
value: my-server
targets:
- selector:
kind: Deployment
8 changes: 8 additions & 0 deletions src/schema-validation.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,14 @@
{
"schema": "claude-code-keybindings.json",
"strict": true
},
{
"schema": "replacement-transformer.json",
"strict": true
},
{
"schema": "value-add-transformer.json",
"strict": true
}
],
"catalogEntryNoLintNameOrDescription": [
Expand Down
12 changes: 8 additions & 4 deletions src/schemas/json/nest-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"$comment": "https://github.com/nestjs/nest-cli/blob/master/commands/build.command.ts",
"default": "tsc",
"type": "string",
"enum": ["tsc", "webpack", "swc"],
"description": "Builder to be used (tsc, webpack, swc). For details on how to configure `SWC` see https://docs.nestjs.com/recipes/swc#getting-started"
"enum": ["tsc", "webpack", "swc", "rspack"],
"description": "Builder to be used (tsc, webpack, swc, rspack). For details on how to configure `SWC` see https://docs.nestjs.com/recipes/swc#getting-started"
},
{
"type": "object",
Expand All @@ -31,8 +31,8 @@
"$comment": "https://github.com/nestjs/nest-cli/blob/master/commands/build.command.ts",
"default": "tsc",
"type": "string",
"enum": ["tsc", "webpack", "swc"],
"description": "Builder to be used (tsc, webpack, swc). For details on how to configure `SWC` see https://docs.nestjs.com/recipes/swc#getting-started"
"enum": ["tsc", "webpack", "swc", "rspack"],
"description": "Builder to be used (tsc, webpack, swc, rspack). For details on how to configure `SWC` see https://docs.nestjs.com/recipes/swc#getting-started"
},
"options": {
"type": "object",
Expand Down Expand Up @@ -78,6 +78,10 @@
"swcrcPath": {
"type": "string",
"description": "Path to SWC config file to use."
},
"configPath": {
"type": "string",
"description": "Path to the builder config file (e.g. webpack.config.js or rspack.config.js) when using webpack or rspack builders."
}
}
}
Expand Down
229 changes: 229 additions & 0 deletions src/schemas/json/replacement-transformer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/replacement-transformer.json",
"title": "Kustomize ReplacementTransformer",
"description": "Configuration file for the Kustomize replacement transformer. Referenced from the `transformers` field of a kustomization.yaml file.",
"type": "object",
"required": ["kind"],
"properties": {
"apiVersion": {
"const": "builtin",
"description": "The API version of the transformer. Always `builtin` for built-in transformers"
},
"kind": {
"const": "ReplacementTransformer",
"description": "The kind of the transformer"
},
"metadata": {
"$ref": "#/definitions/Metadata",
"description": "Standard object metadata"
},
"replacements": {
"description": "Substitute field(s) in N target(s) with a field from a source",
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/definitions/ReplacementsPath"
},
{
"$ref": "#/definitions/ReplacementsInline"
}
]
}
}
},
"definitions": {
"FieldOptions": {
"type": "object",
"additionalProperties": false,
"properties": {
"create": {
"description": "If field missing, add it",
"type": "boolean"
},
"delimiter": {
"description": "Used to split/join the field",
"type": "string"
},
"index": {
"description": "Which position in the split to consider",
"type": "number"
}
}
},
"Metadata": {
"type": "object",
"additionalProperties": false,
"properties": {
"annotations": {
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
}
},
"labels": {
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
}
},
"name": {
"type": "string"
},
"namespace": {
"type": "string"
}
}
},
"ReplacementsInline": {
"oneOf": [
{
"additionalProperties": false,
"required": ["source", "targets"],
"type": "object",
"properties": {
"source": {
"$ref": "#/definitions/Source"
},
"targets": {
"description": "The N fields to write the value to",
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
},
{
"additionalProperties": false,
"required": ["sourceValue", "targets"],
"type": "object",
"properties": {
"sourceValue": {
"description": "A scalar value as source",
"type": "string"
},
"targets": {
"description": "The N fields to write the value to",
"type": "array",
"items": {
"$ref": "#/definitions/Target"
}
}
}
}
]
},
"ReplacementsPath": {
"additionalProperties": false,
"required": ["path"],
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
},
"Selector": {
"description": "Selector specifies a set of resources.\nAny resource that matches intersection of all conditions is included in this set.",
"type": "object",
"additionalProperties": false,
"properties": {
"annotationSelector": {
"description": "AnnotationSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api",
"type": "string"
},
"group": {
"description": "The group of the referent",
"type": "string"
},
"kind": {
"description": "The kind of the referent",
"type": "string"
},
"labelSelector": {
"description": "LabelSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api",
"type": "string"
},
"name": {
"description": "The name of the referent",
"type": "string"
},
"namespace": {
"description": "The namespace of the referent",
"type": "string"
},
"version": {
"description": "The version of the referent",
"type": "string"
}
}
},
"Source": {
"description": "The source of the value",
"type": "object",
"properties": {
"fieldPath": {
"description": "The structured path to the source value",
"type": "string"
},
"group": {
"description": "The group of the referent",
"type": "string"
},
"kind": {
"description": "The kind of the referent",
"type": "string"
},
"name": {
"description": "The name of the referent",
"type": "string"
},
"namespace": {
"description": "The namespace of the referent",
"type": "string"
},
"options": {
"$ref": "#/definitions/FieldOptions"
},
"version": {
"description": "The version of the referent",
"type": "string"
}
}
},
"Target": {
"additionalProperties": false,
"required": ["select"],
"type": "object",
"properties": {
"fieldPaths": {
"description": "The structured path(s) to the target nodes",
"type": "array",
"items": {
"type": "string"
}
},
"options": {
"$ref": "#/definitions/FieldOptions"
},
"reject": {
"description": "Exclude objects that match this",
"type": "array",
"items": {
"$ref": "#/definitions/Selector"
}
},
"select": {
"$ref": "#/definitions/Selector",
"description": "Include objects that match this"
}
}
}
}
}
9 changes: 8 additions & 1 deletion src/schemas/json/ruff.json
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@
]
},
"banned-api": {
"description": "Specific modules or module members that may not be imported or accessed.\nNote that this rule is only meant to flag accidental uses,\nand can be circumvented via `eval` or `importlib`.",
"description": "Specific modules or module members that may not be imported or accessed.\nThese can be extended by the\n[`extend-banned-api`](#lint_flake8-tidy-imports_extend-banned-api) option.\n\nNote that this rule is only meant to flag accidental uses,\nand can be circumvented via `eval` or `importlib`.",
"type": ["object", "null"],
"additionalProperties": {
"$ref": "#/definitions/ApiBan"
Expand All @@ -1220,6 +1220,13 @@
"type": "string"
}
},
"extend-banned-api": {
"description": "Additional modules or module members that may not be imported or accessed.\nThese entries will be added to the\n[`banned-api`](#lint_flake8-tidy-imports_banned-api) mapping and will override\nany existing entries if the two settings overlap.",
"type": ["object", "null"],
"additionalProperties": {
"$ref": "#/definitions/ApiBan"
}
},
"require-lazy": {
"description": "Specific modules that must be imported lazily in contexts where `lazy import` is legal, or\n`\"all\"` to require every lazily-convertible import to use the `lazy` keyword. Ruff ignores\ncontexts where `lazy import` is invalid, such as functions, classes, `try`/`except`\nblocks, `__future__` imports, and `from ... import *` statements. This rule is only\nenforced when targeting Python 3.15 or newer.",
"anyOf": [
Expand Down
Loading