UNPKG

@apistudio/apim-cli

Version:

CLI for API Management Products

1,621 lines (1,620 loc) 319 kB
{ "api.ibm.com_v1_api.json": { "type": "object", "required": [ "kind", "apiVersion", "metadata", "spec" ], "additionalProperties": false, "properties": { "kind": { "enum": [ "API" ], "type": "string" }, "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "required": [ "api-spec" ], "additionalProperties": false, "properties": { "api-spec": { "type": "object", "required": [ "$path" ], "additionalProperties": false, "properties": { "$path": { "description": "Field 'path' with JSON name '$path' accepts the value of either 'path' or '$path' from the YAML file. If both are specified, the value of '$path' takes priority.\n", "type": "string" } } }, "rest-def": { "type": "object", "required": [ "$path" ], "additionalProperties": false, "properties": { "$path": { "description": "Field 'path' with JSON name '$path' accepts the value of either 'path' or '$path' from the YAML file. If both are specified, the value of '$path' takes priority.\n", "type": "string" } } }, "uriSchemes": { "type": "object", "required": [ "$ref" ], "additionalProperties": false, "properties": { "$ref": { "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.\n", "type": "string" } } }, "properties": { "type": "object", "required": [ "$ref" ], "additionalProperties": false, "properties": { "$ref": { "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.\n", "type": "string" } } }, "cors": { "type": "object", "required": [ "$ref" ], "additionalProperties": false, "properties": { "$ref": { "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.\n", "type": "string" } } }, "scopes": { "type": "array", "items": { "type": "object", "required": [ "$ref" ], "additionalProperties": false, "properties": { "$ref": { "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.\n", "type": "string" } } } }, "policy-sequence": { "type": "array", "items": { "type": "object", "required": [ "$ref" ], "additionalProperties": false, "properties": { "$ref": { "description": "Field 'ref' with JSON name '$ref' accepts the value of either 'ref' or '$ref' from the YAML file. If both 'ref' and '$ref' are specified, the value of '$ref' takes priority.\n", "type": "string" } } } } } } } }, "api.ibm.com_v1_cors.json": { "description": "The CORS related information is captured in the message CORS", "type": "object", "required": [ "kind", "apiVersion", "metadata", "spec" ], "additionalProperties": false, "properties": { "kind": { "enum": [ "CORS" ], "type": "string" }, "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "additionalProperties": false, "required": [ "rules" ], "properties": { "rules": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "action", "originList" ], "additionalProperties": false, "properties": { "action": { "type": "string", "enum": [ "allow", "deny" ] }, "originList": { "description": "Multiple instances of allowed origins can be given", "type": "array", "minItems": 1, "items": { "type": "string" } }, "allowCredentials": { "description": "Credential can be allowed or not allowed", "type": "boolean" }, "allowMethods": { "description": "Multiple instances allowed methods can be given", "type": "array", "minItems": 1, "items": { "type": "string" }, "uniqueItems": true }, "allowHeaders": { "description": "Multiple instances of allowed headers can be given", "type": "array", "minItems": 1, "items": { "type": "string" } }, "maxAge": { "description": "Single instance of maximum age can be given", "maximum": 4294967295, "minimum": 0, "type": "integer" }, "exposeHeaders": { "type": "object", "additionalProperties": false, "properties": { "predefined": { "type": "boolean" }, "custom": { "type": "string" }, "backend": { "type": "boolean" } } } } } } } } } }, "api.ibm.com_v1_countlimit.json": { "type": "object", "required": [ "kind", "apiVersion", "metadata", "spec" ], "properties": { "kind": { "type": "string", "enum": [ "CountLimit" ] }, "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "required": [ "limits" ], "properties": { "limits": { "type": "array", "items": { "type": "object", "required": [ "limitDef" ], "properties": { "limitDef": { "type": "object", "required": [ "name", "definition" ], "properties": { "name": { "type": "string", "description": "Unique name for the rate limit" }, "definition": { "type": "object", "required": [ "$ref" ], "properties": { "$ref": { "type": "string", "description": "Reference to the limit definition" } } } } } } } }, "extensions": { "type": "object", "properties": { "dp-nano-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "spec": { "type": "object", "properties": { "limits": { "type": "array", "items": { "type": "object", "oneOf": [ { "type": "object", "required": [ "globalLimit" ], "properties": { "globalLimit": { "type": "object", "required": [ "name", "operation" ] } } } ] } } } } } } } } } } } }, "api.ibm.com_v1_countlimitdef.json": { "type": "object", "required": [ "kind", "apiVersion", "metadata", "spec" ], "properties": { "kind": { "type": "string", "enum": [ "CountLimitDef" ] }, "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "required": [ "max", "autoDecrement" ], "properties": { "max": { "type": "integer", "description": "Size of the rate limit bucket" }, "autoDecrement": { "type": "boolean", "description": "Whether the count should auto-decrement" }, "extensions": { "type": "object", "properties": { "dp-nano-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "spec": { "type": "object", "properties": { "weightExpr": { "type": "string", "description": "Optional dynamic string expression" }, "dynamicValue": { "type": "string", "description": "Optional dynamic key to apply the rate limit to" } } } } } } } } } } }, "api.ibm.com_v1_quota.json": { "type": "object", "properties": { "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "kind": { "enum": [ "Quota" ], "type": "string" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "properties": { "maxRequest": { "type": "integer", "description": "Size of the rate limit bucket" }, "interval": { "type": "string", "description": "Time interval for the rate limit (e.g., 1s, 1m, 1h)" }, "extensions": { "type": "object", "properties": { "dp-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "api.ibm.com/v1" ] }, "spec": { "type": "object", "properties": { "onLimitReach": { "type": "string", "enum": [ "block", "allow" ] } } } } }, "dp-nano-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "api.ibm.com/v1" ] }, "spec": { "type": "object", "properties": { "weightExpr": { "type": "string", "description": "Optional dynamic string expression" }, "exceedAction": { "type": "string", "enum": [ "continue", "return429", "return500" ] }, "intervalOffset": { "type": "integer" }, "dynamicValue": { "type": "string", "description": "Optional dynamic key expression" } } } } }, "webm-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "api.ibm.com/v1" ] }, "spec": { "type": "object", "properties": { "alertMessage": { "type": "string" }, "alertFrequency": { "type": "string", "enum": [ "always", "once" ] }, "onLimitReach": { "type": "string", "enum": [ "block", "allow" ] }, "notification": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "notifyAfter": { "type": "string" }, "message": { "type": "string" }, "email": { "type": "array", "items": { "type": "string" } } } } } } } } } } } } }, "required": [ "kind", "apiVersion", "metadata", "spec" ] }, "api.ibm.com_v1_product.json": { "type": "object", "properties": { "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "kind": { "enum": [ "Product" ], "type": "string" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "properties": { "info": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "string" } }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "url": { "type": "string" } } }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } } }, "termsOfService": { "type": "string" }, "summary": { "type": "string" } } }, "apis": { "type": "array", "items": { "type": "object", "properties": { "$ref": { "type": "string" } } } }, "plans": { "type": "array", "items": { "type": "object", "properties": { "$ref": { "type": "string" } } } }, "extensions": { "type": "object", "properties": { "portal-config": { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "api.ibm.com/v1" ] }, "spec": { "type": "object", "properties": { "visibility": { "type": "object", "properties": { "view": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "authenticated", "public", "custom" ] }, "orgs": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" } } }, "subscribe": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "authenticated", "custom" ] }, "orgs": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" } } } } } } } } }, "dp-nano-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string", "enum": [ "api.ibm.com/v1" ] }, "spec": { "type": "object", "properties": { "properties": { "type": "object", "additionalProperties": { "type": "object", "properties": { "value": { "type": "string" }, "description": { "type": "string" }, "encoded": { "type": "boolean" } } } }, "env": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" }, "valueFrom": { "type": "object", "properties": { "configMapKeyRef": { "type": "object", "properties": { "name": { "type": "string" }, "key": { "type": "string" } } }, "secretKeyRef": { "type": "object", "properties": { "name": { "type": "string" }, "key": { "type": "string" } } }, "fieldRef": { "type": "object", "properties": { "fieldPath": { "type": "string" } } }, "resourceFieldRef": { "type": "object", "properties": { "resource": { "type": "string" } } } } } } } }, "hostAliases": { "type": "array", "items": { "type": "object", "properties": { "ip": { "type": "string" }, "hostnames": { "type": "array", "items": { "type": "string" } } } } }, "logLevel": { "type": "object", "properties": { "all": { "type": "string", "enum": [ "trace", "debug", "info", "warn", "error", "off" ] } } }, "quotaService": { "type": "object", "properties": { "cache": { "type": "object", "properties": { "capacity": { "type": "integer" }, "maxAgeMilliseconds": { "type": "integer" }, "maxPercent": { "type": "integer" }, "fallback": { "type": "object", "additionalProperties": false, "properties": { "enabled": { "type": "boolean" } } } } }, "responseHeaders": { "type": "string" }, "updateInterval": { "type": "integer" } } }, "replicas": { "type": "integer" }, "resources": { "type": "object", "properties": { "limits": { "type": "object", "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } } }, "requests": { "type": "object", "properties": { "cpu": { "type": "string" }, "memory": { "type": "string" } } } } }, "sqlInjectionFilters": { "type": "object", "properties": { "commands": { "type": "string" }, "escapeSequence": { "type": "string" }, "keywordInjection": { "type": "string" }, "likeMatch": { "type": "string" }, "metacharacters": { "type": "string" }, "msSqlCommands": { "type": "string" }, "andOrAttack": { "type": "string" }, "oracleBufferOverflow": { "type": "string" }, "simpleMetacharacters": { "type": "string" }, "custom": { "type": "object", "additionalProperties": { "type": "string" } } } } } } } } } } } } }, "required": [ "kind", "apiVersion", "metadata", "spec" ] }, "api.ibm.com_v1_plan.json": { "type": "object", "properties": { "apiVersion": { "type": "string", "default": "api.ibm.com/v1" }, "kind": { "enum": [ "Plan" ], "type": "string" }, "metadata": { "description": "Defines a message named Metadata", "type": "object", "required": [ "name", "version" ], "additionalProperties": false, "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "namespace": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "type": { "type": "string", "enum": [ "REST", "SWAGGER", "SOAP", "GRAPHQL", "ODATA" ] }, "version": { "type": "string" }, "labels": { "type": "object", "additionalProperties": true, "properties": { "gatewayTypes": { "type": "array", "items": { "type": "string" } } } } } }, "spec": { "type": "object", "properties": { "qos": { "type": "object", "required": [ "withQuota" ], "properties": { "withQuota": { "type": "object", "properties": { "unlimited": { "type": "object" } }, "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "$ref" ], "properties": { "$ref": { "type": "string" } } } } } } }, "extensions": { "type": "object", "properties": { "webm-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string" }, "spec": { "type": "object", "properties": { "pricing": { "type": "object", "properties": { "value": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "value", "currency" ] }, "withRateLimit": { "type": "array", "items": { "type": "object", "properties": { "maxRequest": { "type": "integer" }, "interval": { "type": "string" }, "alertMessage": { "type": "string" }, "alertFrequency": { "type": "string" }, "name": { "type": "string" } }, "required": [ "maxRequest", "interval", "name" ] } } } } } }, "dp-nano-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string" }, "spec": { "type": "object", "properties": { "isApprovalRequired": { "type": "boolean" }, "apis": { "type": "array", "items": { "type": "object", "properties": { "$ref": { "type": "string" }, "operations": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "path": { "type": "string" }, "method": { "type": "string" }, "withQuota": { "type": "object", "properties": { "unlimited": { "type": "object" } }, "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "$ref" ], "properties": { "$ref": { "type": "string" } } } } } } } } }, "required": [ "$ref" ] } }, "withAssemblyCountLimit": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "object", "required": [ "$ref" ], "properties": { "$ref": { "type": "string" } } } } }, "properties": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Arbitrary key-value pairs for custom properties" }, "telemetry": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "dp-gateway": { "type": "object", "properties": { "apiVersion": { "type": "string" }, "spec": { "type": "object", "properties": { "isApprovalRequired": { "type": "boolean" }, "withRateLimit": { "type": "array", "items": { "type": "object", "properties": { "maxRequest": { "type": "integer" }, "interval": { "type": "string" }, "name": { "type": "string" } }, "required": [ "maxRequest", "interval", "name" ] } }, "withAssemblyCountLimit": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "maxRequest": { "oneOf": [ { "type": "integer" }, { "type": "string" } ] }, "hard-limit": { "type": "boolean" }, "cache-only": { "type": "boolean" }, "is-client": { "type": "boolean" }, "use-api-name": { "type": "boolean" }, "use-app-id": { "type": "boolean" }, "use-client-id": { "type": "boolean" }, "dynamic-value": { "type": "integer" }, "weight": { "type": "integer" }, "auto-decrement": { "type": "boolean" } }, "required": [ "name", "maxRequest" ] } }, "withAssemblyRateLimit": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "maxRequest": { "type": "integer" }, "interval": { "type": "string" }, "cache-only": { "type": "boolean" }, "is-client": { "type": "boolean" }, "use-api-name": { "type": "boolean" },