Subversion · API Governance Rules

Subversion API Rules

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

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

Rule Categories

svn

Rules

warn
svn-operations-have-tags
All SVN WebDAV operations must have at least one tag
$.paths[*][get,put,post,delete,patch]
error
svn-operations-have-summaries
All SVN WebDAV operations must have a summary
$.paths[*][get,put,post,delete,patch]
error
svn-operations-have-operation-ids
All SVN WebDAV operations must have an operationId
$.paths[*][get,put,post,delete,patch]
warn
svn-summaries-title-case
SVN operation summaries must use Title Case
$.paths[*][get,put,post,delete,patch].summary
warn
svn-operations-have-descriptions
All SVN WebDAV operations must have a description
$.paths[*][get,put,post,delete,patch]
warn
svn-responses-have-descriptions
All response objects must have a description
$.paths[*][*].responses[*]
error
svn-path-parameters-required
All path parameters must be marked as required
$.paths[*][*].parameters[?(@.in == 'path')]
warn
svn-components-schemas-described
All component schemas must have a description
$.components.schemas[*]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:

  svn-operations-have-tags:
    description: All SVN WebDAV operations must have at least one tag
    severity: warn
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: tags
      function: truthy

  svn-operations-have-summaries:
    description: All SVN WebDAV operations must have a summary
    severity: error
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: summary
      function: truthy

  svn-operations-have-operation-ids:
    description: All SVN WebDAV operations must have an operationId
    severity: error
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: operationId
      function: truthy

  svn-summaries-title-case:
    description: SVN operation summaries must use Title Case
    severity: warn
    given: "$.paths[*][get,put,post,delete,patch].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9]*([ ][A-Z][a-zA-Z0-9]*)*$"

  svn-operations-have-descriptions:
    description: All SVN WebDAV operations must have a description
    severity: warn
    given: "$.paths[*][get,put,post,delete,patch]"
    then:
      field: description
      function: truthy

  svn-responses-have-descriptions:
    description: All response objects must have a description
    severity: warn
    given: "$.paths[*][*].responses[*]"
    then:
      field: description
      function: truthy

  svn-path-parameters-required:
    description: All path parameters must be marked as required
    severity: error
    given: "$.paths[*][*].parameters[?(@.in == 'path')]"
    then:
      field: required
      function: truthy

  svn-components-schemas-described:
    description: All component schemas must have a description
    severity: warn
    given: "$.components.schemas[*]"
    then:
      field: description
      function: truthy