Thanks for your feedback!
EDIT
.yaml
de JavaScriptInterceptor (comando apply
)apiVersion: api-management.sensedia.com/v1 kind: JavaScriptInterceptor metadata: # Descrição de texto aberto apenas com valores de exemplo type: production owner: engineering spec: # Campos de identificação name: "My Interceptor" # Outros 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: # Descrição de texto aberto apenas com valores de exemplo type: production owner: engineering spec: # Campos de identificação name: "My Interceptor" # Outros 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]