Thanks for your feedback!
EDIT
.yaml de JavaScriptInterceptor (comando apply)apiVersion: api-management.sensedia.com/v1
kind: JavaScriptInterceptor
metadata:
# Descripción de texto libre que sólo incluye valores de ejemplo
type: production
owner: engineering
spec:
# Campos de identificación
name: "My Interceptor"
# Otros campos
source:
script: |
console.log('Welcome To Sensedia');
console.log('This is a demo interceptor');
visibility:
type: Team
teamRef:
name: "MyTeam"
users: ["user1", "user2"]
tags: ["tag1", "tag2"]
abortRequestOnFailure: true
apiVersion: api-management.sensedia.com/v1
kind: JavaScriptInterceptor
metadata:
# Descripción de texto libre que sólo incluye valores de ejemplo
type: production
owner: engineering
spec:
# Campos de identificación
name: "My Interceptor"
# Otros campos
source:
file: /scripts/myinterceptor.js
visibility:
type: Organization
tags: ["tag1", "tag2"]
abortRequestOnFailure: true
apply){
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://sensedia.com/cli/api-management/javascript-interceptor/apply",
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"api-management.sensedia.com/v1"
]
},
"kind": {
"type": "string",
"enum": [
"JavaScriptInterceptor"
]
},
"metadata": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"spec": {
"additionalProperties": false,
"type": "object",
"required": [
"name",
"source"
],
"properties": {
"name": {
"type": "string"
},
"source": {
"$ref": "#/$defs/source"
},
"visibility": {
"$ref": "#/$defs/visibility"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
},
"abortRequestOnFailure": {
"type": "boolean",
"default": false
}
}
}
},
"required": [
"apiVersion",
"kind",
"spec"
],
"$defs": {
"namedRef": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
},
"source": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"script": {
"type": "string"
}
}
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
}
}
]
},
"visibility": {
"additionalProperties": false,
"type": "object",
"default": {
"type": "Organization"
},
"properties": {
"type": {
"type": "string",
"enum": [
"Team",
"Organization",
"Me"
],
"default": "Organization"
},
"teamRef": {
"$ref": "#/$defs/namedRef"
},
"users": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"uniqueItems": true
}
}
}
}
}
Share your suggestions with us!
Click here and then [+ Submit idea]