extends: [[spectral:oas, off]] formats: [oas3] documentationUrl: https://guides.dataverse.org/en/latest/api/ rules: uchile-info-title: description: The OpenAPI document should declare an info.title. severity: error given: $.info then: field: title function: truthy uchile-info-version: description: The OpenAPI document should declare an info.version. severity: error given: $.info then: field: version function: truthy uchile-servers-https: description: Public Dataverse server URLs should use HTTPS, not internal hostnames. severity: warn given: $.servers[*].url then: function: pattern functionOptions: match: "^https://" uchile-paths-versioned: description: Dataverse native API paths are versioned under /api/v1. severity: info given: $.paths[*]~ then: function: pattern functionOptions: match: "^/api/(v1/|info|search|access|dataverses|datasets|files)" uchile-operation-id: description: Every operation should carry an operationId for tooling and SDK generation. severity: warn given: $.paths[*][get,post,put,delete,patch] then: field: operationId function: truthy uchile-get-responses: description: GET operations should document at least one response. severity: warn given: $.paths[*].get then: field: responses function: truthy