Apache Guacamole · API Governance Rules

Apache Guacamole API Rules

Spectral linting rules defining API design standards and conventions for Apache Guacamole.

16 Rules error 4 warn 10 info 2
View Rules File View on GitHub

Rule Categories

info no operation operationid parameter path response schema security

Rules

error
info-title-required
Info title must be defined
$.info
error
info-version-required
API version must be specified
$.info
error
operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,delete,patch]
warn
operation-summary-apache-guacamole-prefix
Operation summaries should start with Apache Guacamole
$.paths[*][get,post,put,delete,patch].summary
error
operation-operationId-required
All operations must have an operationId
$.paths[*][get,post,put,delete,patch]
warn
operation-tags-required
Operations should have tags
$.paths[*][get,post,put,delete,patch]
warn
security-token-required
All session operations require Guacamole-Token header
$.paths./api/session[*][get,post,put,delete].parameters[?(@.name=='Guacamole-Token')]
warn
response-description-required
All responses must have descriptions
$.paths[*][get,post,put,delete,patch].responses[*]
warn
parameter-description-required
All parameters must have descriptions
$.paths[*][get,post,put,delete,patch].parameters[*]
info
schema-description-recommended
Schemas should have descriptions
$.components.schemas[*]
warn
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
operationid-casing
Operation IDs should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# apache-guacamole — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
#   - path-params-casing: camel @ 84% (n=19)
#   - operationid-casing: camel @ 100% (n=14)
#   - schema-names-casing: pascal @ 100% (n=7)
#   - schema-properties-casing: snake @ 53% (n=32)
#   - security: neither global nor consistently per-op — schemes-defined only
#   - merge: kept 10 existing, added 6 measured, upgraded 0
#   - added: path-params-casing, operationid-casing, schema-names-casing, schema-properties-casing, security-schemes-defined, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-required:
    description: Info title must be defined
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  info-version-required:
    description: API version must be specified
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  operation-summary-required:
    description: All operations must have a summary
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: summary
      function: truthy
  operation-summary-apache-guacamole-prefix:
    description: Operation summaries should start with Apache Guacamole
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].summary
    then:
      function: pattern
      functionOptions:
        match: ^Apache Guacamole
  operation-operationId-required:
    description: All operations must have an operationId
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: operationId
      function: truthy
  operation-tags-required:
    description: Operations should have tags
    severity: warn
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: tags
      function: truthy
  security-token-required:
    description: All session operations require Guacamole-Token header
    severity: warn
    given: $.paths./api/session[*][get,post,put,delete].parameters[?(@.name=='Guacamole-Token')]
    then:
      field: required
      function: truthy
  response-description-required:
    description: All responses must have descriptions
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].responses[*]
    then:
      field: description
      function: truthy
  parameter-description-required:
    description: All parameters must have descriptions
    severity: warn
    given: $.paths[*][get,post,put,delete,patch].parameters[*]
    then:
      field: description
      function: truthy
  schema-description-recommended:
    description: Schemas should have descriptions
    severity: info
    given: $.components.schemas[*]
    then:
      field: description
      function: truthy
  path-params-casing:
    description: Path parameters should be camelCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: camel
  operationid-casing:
    description: Operation IDs should be camelCase (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: casing
      functionOptions:
        type: camel
  schema-names-casing:
    description: Component schema names should be PascalCase (the dominant convention in this API).
    severity: warn
    given: $.components.schemas
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: pascal
  schema-properties-casing:
    description: Schema properties should be snake_case (the dominant convention in this API).
    severity: info
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: snake
  security-schemes-defined:
    description: Security schemes should be defined in components.
    severity: warn
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy