Youki · API Governance Rules

Youki API Rules

Spectral linting rules defining API design standards and conventions for Youki.

3 Rules warn 1 info 2
View Rules File View on GitHub

Rule Categories

definition no property

Rules

info
property-name-casing
Schema properties should be snake_case (the dominant convention in this API).
$..properties
info
definition-name-casing
Schema definitions names should be PascalCase (the dominant convention in this API).
$..definitions
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description

Spectral Ruleset

youki-jsonschema-spectral-rules.yml Raw ↑
# youki — JSON Schema Spectral ruleset (strengthened)
# Plain Spectral. Rules measured from this provider's own JSON Schema
# conventions by strengthen_jsonschema.py, then self-validated against them.
#
# Provenance:
#   - property-name-casing: snake @ 67% (n=379)
#   - def-name-casing: pascal @ 54% (n=80)
rules:
  property-name-casing:
    description: Schema properties should be snake_case (the dominant convention in this API).
    severity: info
    given: $..properties
    then:
      field: '@key'
      function: casing
      functionOptions:
        type: snake
  definition-name-casing:
    description: Schema definitions names should be PascalCase (the dominant convention in this API).
    severity: info
    given: $..definitions
    then:
      field: '@key'
      function: pattern
      functionOptions:
        match: ^[A-Z][A-Za-z0-9]*$
  no-empty-descriptions:
    description: Descriptions must not be empty strings.
    severity: warn
    given: $..description
    then:
      function: truthy