# statsd — AsyncAPI Spectral ruleset (strengthened) # Plain Spectral. Rules measured from this provider's own AsyncAPI event # conventions by strengthen_asyncapi.py, then self-validated against the spec. # # Provenance: # - channel-key-casing: camel @ 100% (n=4) # - message-name-casing: pascal @ 100% (n=15) # - operation-id-casing: camel @ 100% (n=4, v3) # - message-contenttype-defined: 100% adherence # - message-payload-defined: 100% adherence extends: - spectral:asyncapi rules: channel-key-casing: description: Channel names should be camelCase (the dominant convention in this API). severity: warn given: $.channels then: field: '@key' function: casing functionOptions: type: camel message-name-casing: description: Message names should be PascalCase (the dominant convention in this API). severity: warn given: $.components.messages then: field: '@key' function: casing functionOptions: type: pascal operation-id-casing: description: Operation names should be camelCase (the dominant convention in this API). severity: warn given: $.operations then: field: '@key' function: casing functionOptions: type: camel message-contenttype-defined: description: Messages should declare a contentType (set on 100% of this API's messages). severity: warn given: $.components.messages[*] then: field: contentType function: truthy message-payload-defined: description: Messages should define a payload schema (set on 100% of this API's messages). severity: warn given: $.components.messages[*] then: field: payload function: truthy no-empty-descriptions: description: Descriptions must not be empty strings. severity: warn given: $..description then: function: truthy