Apache ActiveMQ · API Governance Rules

Apache ActiveMQ API Rules

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

26 Rules error 8 warn 16 info 2
View Rules File View on GitHub

Rule Categories

delete error get info no operation parameter path query response schema security servers

Rules

warn
info-title-prefix
API title must start with "Apache ActiveMQ"
$.info.title
error
info-description-required
API must have a description of at least 50 characters.
$.info
error
info-version-required
API info must include a version.
$.info
warn
info-license-required
API must declare an Apache 2.0 license.
$.info
error
servers-defined
At least one server must be defined.
$
info
servers-https-only
Server URLs should use HTTPS in production.
$.servers[*].url
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-summary-title-case
Operation summaries must start with "Apache ActiveMQ".
$.paths[*][get,post,put,patch,delete,options,head].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete,options,head]
error
operation-operationId-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-operationId-camelCase
operationId must be camelCase.
$.paths[*][get,post,put,patch,delete,options,head].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete,options,head]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete,options,head].parameters[*]
error
response-success-required
Every operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete,options,head].responses
error
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete,options,head].responses[*]
warn
security-schemes-defined
Security schemes must be defined in components.
$.components
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body.
$.paths[*].delete
info
operation-microcks-extension
Operations should include x-microcks-operation extension for mock server compatibility.
$.paths[*][get,post,put,patch,delete]
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
operation-security-required
Every operation should declare its security requirements.
$.paths[*][get,post,put,patch,delete]
warn
error-schema-defined
A shared error schema (JolokiaError) should be defined for error payloads.
$.components.schemas
warn
operation-documents-401
Operations should document a 401 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

Raw ↑
# apache-activemq — 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: snake @ 100% (n=3)
#   - query-params-casing: snake @ 60% (n=10)
#   - operationid-casing: camel @ 100% (n=5)
#   - schema-properties-casing: snake @ 100% (n=8)
#   - operation-security-required: 5/5 ops declare per-op security
#   - error-schema-defined: JolokiaError
#   - operation-documents-401: 100% adherence
#   - merge: kept 19 existing, added 7 measured, upgraded 0
#   - added: path-params-casing, query-params-casing, schema-properties-casing, operation-security-required, error-schema-defined, operation-documents-401, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-prefix:
    description: API title must start with "Apache ActiveMQ"
    severity: warn
    given: $.info.title
    then:
      function: pattern
      functionOptions:
        match: ^Apache ActiveMQ
  info-description-required:
    description: API must have a description of at least 50 characters.
    severity: error
    given: $.info
    then:
      field: description
      function: truthy
  info-version-required:
    description: API info must include a version.
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  info-license-required:
    description: API must declare an Apache 2.0 license.
    severity: warn
    given: $.info
    then:
      field: license
      function: truthy
  servers-defined:
    description: At least one server must be defined.
    severity: error
    given: $
    then:
      field: servers
      function: truthy
  servers-https-only:
    description: Server URLs should use HTTPS in production.
    severity: info
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        notMatch: ^http://
  operation-summary-required:
    description: Every operation must have a summary.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: summary
      function: truthy
  operation-summary-title-case:
    description: Operation summaries must start with "Apache ActiveMQ".
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head].summary
    then:
      function: pattern
      functionOptions:
        match: ^Apache ActiveMQ
  operation-description-required:
    description: Every operation must have a description.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: description
      function: truthy
  operation-operationId-required:
    description: Every operation must have an operationId.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: operationId
      function: truthy
  operation-operationId-camelCase:
    description: operationId must be camelCase.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head].operationId
    then:
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  operation-tags-required:
    description: Every operation must have at least one tag.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head]
    then:
      field: tags
      function: truthy
  parameter-description-required:
    description: Every parameter must have a description.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete,options,head].parameters[*]
    then:
      field: description
      function: truthy
  response-success-required:
    description: Every operation must define at least one 2xx response.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head].responses
    then:
      function: schema
      functionOptions:
        schema:
          anyOf:
          - required:
            - '200'
          - required:
            - '201'
          - required:
            - '204'
  response-description-required:
    description: Every response must have a description.
    severity: error
    given: $.paths[*][get,post,put,patch,delete,options,head].responses[*]
    then:
      field: description
      function: truthy
  security-schemes-defined:
    description: Security schemes must be defined in components.
    severity: warn
    given: $.components
    then:
      field: securitySchemes
      function: truthy
  get-no-request-body:
    description: GET operations must not have a request body.
    severity: error
    given: $.paths[*].get
    then:
      field: requestBody
      function: falsy
  delete-no-request-body:
    description: DELETE operations should not have a request body.
    severity: warn
    given: $.paths[*].delete
    then:
      field: requestBody
      function: falsy
  operation-microcks-extension:
    description: Operations should include x-microcks-operation extension for mock server compatibility.
    severity: info
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: x-microcks-operation
      function: truthy
  path-params-casing:
    description: Path parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*].parameters[?(@.in=='path')].name
    then:
      function: casing
      functionOptions:
        type: snake
  query-params-casing:
    description: Query parameters should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
    then:
      field: name
      function: casing
      functionOptions:
        type: snake
  schema-properties-casing:
    description: Schema properties should be snake_case (the dominant convention in this API).
    severity: warn
    given: $.components.schemas[*].properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: snake
  operation-security-required:
    description: Every operation should declare its security requirements.
    severity: warn
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: security
      function: truthy
  error-schema-defined:
    description: A shared error schema (JolokiaError) should be defined for error payloads.
    severity: warn
    given: $.components.schemas
    then:
      field: JolokiaError
      function: truthy
  operation-documents-401:
    description: Operations should document a 401 response (documented on 100% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '401'
      function: truthy
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy