Apache OpenMeetings · API Governance Rules

Apache OpenMeetings API Rules

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

17 Rules error 4 warn 9 info 4
View Rules File View on GitHub

Rule Categories

info no operation operationid path paths query response schema servers

Rules

error
info-title-required
API must have a title
$.info
warn
info-description-required
API must have a description
$.info
error
operation-summary-required
Operations must have summaries
$.paths[*][*]
error
operation-operationId-required
Operations must have operationIds
$.paths[*][*]
warn
operation-tags-required
Operations must have tags
$.paths[*][*]
warn
paths-kebab-case
Path segments should use kebab-case
$.paths[*]~
info
operation-summary-apache-prefix
Operation summaries should start with Apache OpenMeetings
$.paths[*][get,post,put,delete,patch].summary
warn
servers-https
Servers should use HTTPS
$.servers[*].url
error
response-success-required
Operations must have a success response
$.paths[*][*].responses
info
schema-properties-described
Schema properties should have descriptions
$.components.schemas[*].properties[*]
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')]
info
operationid-casing
Operation IDs should be snake_case (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
operation-documents-500
Operations should document a 500 response (documented on 98% 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-openmeetings — 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:
#   - servers-https-only: 100% of servers already https (error)
#   - path-params-casing: snake @ 97% (n=60)
#   - query-params-casing: snake @ 100% (n=61)
#   - operationid-casing: snake @ 50% (n=56)
#   - schema-names-casing: pascal @ 100% (n=32)
#   - schema-properties-casing: snake @ 57% (n=159)
#   - operation-documents-500: 98% adherence
#   - pagination params observed: ['size']
#   - merge: kept 10 existing, added 7 measured, upgraded 0
#   - added: path-params-casing, query-params-casing, operationid-casing, schema-names-casing, schema-properties-casing, operation-documents-500, no-empty-descriptions
extends:
  - spectral:oas
rules:
  info-title-required:
    description: API must have a title
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  info-description-required:
    description: API must have a description
    severity: warn
    given: $.info
    then:
      field: description
      function: truthy
  operation-summary-required:
    description: Operations must have summaries
    severity: error
    given: $.paths[*][*]
    then:
      field: summary
      function: truthy
  operation-operationId-required:
    description: Operations must have operationIds
    severity: error
    given: $.paths[*][*]
    then:
      field: operationId
      function: truthy
  operation-tags-required:
    description: Operations must have tags
    severity: warn
    given: $.paths[*][*]
    then:
      field: tags
      function: truthy
  paths-kebab-case:
    description: Path segments should use kebab-case
    severity: warn
    given: $.paths[*]~
    then:
      function: pattern
      functionOptions:
        match: ^(/[a-z0-9{}-]+)+$
  operation-summary-apache-prefix:
    description: Operation summaries should start with Apache OpenMeetings
    severity: info
    given: $.paths[*][get,post,put,delete,patch].summary
    then:
      function: pattern
      functionOptions:
        match: ^Apache OpenMeetings
  servers-https:
    description: Servers should use HTTPS
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: ^https://
  response-success-required:
    description: Operations must have a success response
    severity: error
    given: $.paths[*][*].responses
    then:
      function: schema
      functionOptions:
        schema:
          anyOf:
          - required:
            - '200'
          - required:
            - '201'
          - required:
            - '204'
  schema-properties-described:
    description: Schema properties should have descriptions
    severity: info
    given: $.components.schemas[*].properties[*]
    then:
      field: description
      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
  operationid-casing:
    description: Operation IDs should be snake_case (the dominant convention in this API).
    severity: info
    given: $.paths[*][get,post,put,patch,delete].operationId
    then:
      function: casing
      functionOptions:
        type: snake
  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: pattern
      functionOptions:
        match: ^[A-Z][A-Za-z0-9]*$
  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
  operation-documents-500:
    description: Operations should document a 500 response (documented on 98% of this API's operations).
    severity: warn
    given: $.paths[*][get,post,put,patch,delete].responses
    then:
      field: '500'
      function: truthy
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy