SS&C Geneva · API Governance Rules

SS&C Geneva API Rules

Spectral linting rules defining API design standards and conventions for SS&C Geneva.

8 Rules error 2 warn 5
View Rules File View on GitHub

Rule Categories

ssc

Rules

warn
ssc-geneva-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
warn
ssc-geneva-operationid-camel-case
operationId must use camelCase
$.paths[*][*].operationId
error
ssc-geneva-tags-required
Every operation must have at least one tag
$.paths[*][*]
warn
ssc-geneva-description-required
All operations must have a description
$.paths[*][*].description
warn
ssc-geneva-portfolio-id-path-param
Portfolio paths must include portfolioId as a path parameter
$.paths[~/portfolios/{portfolioId}*]
warn
ssc-geneva-date-format-query-params
Date query parameters should use ISO 8601 date format
$.paths[*][*].parameters[?(@.in == 'query' && @.name =~ /[Dd]ate$/)]
error
ssc-geneva-response-200-required
All GET operations must define a 200 response
$.paths[*].get
hint
ssc-geneva-financial-enum-uppercase
Financial status and type enumerations should use SCREAMING_SNAKE_CASE
$.components.schemas[*].properties[?(@.enum)]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  ssc-geneva-operation-summary-title-case:
    description: All operation summaries must use Title Case
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-z0-9]*\\s?)+$"

  ssc-geneva-operationid-camel-case:
    description: operationId must use camelCase
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  ssc-geneva-tags-required:
    description: Every operation must have at least one tag
    severity: error
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  ssc-geneva-description-required:
    description: All operations must have a description
    severity: warn
    given: "$.paths[*][*].description"
    then:
      function: truthy

  ssc-geneva-portfolio-id-path-param:
    description: Portfolio paths must include portfolioId as a path parameter
    severity: warn
    given: "$.paths[~/portfolios/{portfolioId}*]"
    then:
      function: truthy

  ssc-geneva-date-format-query-params:
    description: Date query parameters should use ISO 8601 date format
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in == 'query' && @.name =~ /[Dd]ate$/)]"
    then:
      field: schema.format
      function: enumeration
      functionOptions:
        values:
          - date
          - date-time

  ssc-geneva-response-200-required:
    description: All GET operations must define a 200 response
    severity: error
    given: "$.paths[*].get"
    then:
      field: responses.200
      function: truthy

  ssc-geneva-financial-enum-uppercase:
    description: Financial status and type enumerations should use SCREAMING_SNAKE_CASE
    severity: hint
    given: "$.components.schemas[*].properties[?(@.enum)]"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            enum:
              type: array
              items:
                type: string
                pattern: "^[A-Z_]+$"