WSO2 · Schema
RulesetInput
Detailed information about a ruleset.
API ManagementGatewaysOpen SourceAPI LifecycleGraphQLSOAPREST
Properties
| Name | Type | Description |
|---|---|---|
| name | string | Name of the ruleset. |
| description | string | A brief description of the ruleset. |
| rulesetContent | string | The content of the ruleset file (YAML or JSON). |
| ruleCategory | string | Category the rules included in ruleset. |
| ruleType | string | Context or area to which the ruleset applies. |
| artifactType | string | The type of artifact that the ruleset validates. |
| documentationLink | string | URL to the documentation related to the ruleset. |
| provider | string | Entity or individual providing the ruleset. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/api-evangelist/wso2/refs/heads/main/json-schema/governance-api-ruleset-input-schema.json",
"title": "RulesetInput",
"description": "Detailed information about a ruleset.",
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 256,
"description": "Name of the ruleset.",
"example": "API Security Ruleset"
},
"description": {
"type": "string",
"maxLength": 1024,
"description": "A brief description of the ruleset.",
"example": "A ruleset designed to enforce security standards for APIs."
},
"rulesetContent": {
"type": "string",
"description": "The content of the ruleset file (YAML or JSON).",
"format": "binary",
"example": "rules:\n oas2-always-use-https:\n given:\n - '$.schemes[*]'\n severity: error\n then:\n function: enumeration\n functionOptions:\n values:\n - https\n description: >-\n Host schemes must use the HTTPS protocol. Applies to: OpenAPI 2.0`\n message: API host schemes must use the HTTPS protocol.\n formats:\n - oas2\n"
},
"ruleCategory": {
"type": "string",
"description": "Category the rules included in ruleset.",
"enum": [
"SPECTRAL"
],
"example": "SPECTRAL",
"default": "SPECTRAL"
},
"ruleType": {
"type": "string",
"description": "Context or area to which the ruleset applies.",
"enum": [
"API_METADATA",
"API_DEFINITION",
"API_DOCUMENTATION"
],
"example": "API_DEFINITION",
"x-enum-varnames": [
"API_METADATA",
"API_DEFINITION",
"API_DOCUMENTATION"
]
},
"artifactType": {
"type": "string",
"description": "The type of artifact that the ruleset validates.",
"enum": [
"REST_API",
"ASYNC_API",
"MCP"
],
"example": "REST_API"
},
"documentationLink": {
"type": "string",
"description": "URL to the documentation related to the ruleset.",
"example": "https://example.com/docs/api-security-ruleset"
},
"provider": {
"type": "string",
"description": "Entity or individual providing the ruleset.",
"example": "TechWave"
}
},
"required": [
"name",
"rulesetContent",
"ruleType",
"artifactType"
]
}