extends: - spectral:oas - spectral:asyncapi documentationUrl: https://info.arxiv.org/help/api/user-manual.html functions: [] rules: arxiv-info-contact: description: arXiv specs must declare an info.contact pointing to help@arxiv.org. severity: error given: $.info then: - field: contact function: truthy - field: contact.url function: truthy arxiv-info-license: description: arXiv specs must point at the API Terms of Use as their license link. severity: error given: $.info.license then: - field: name function: truthy - field: url function: pattern functionOptions: match: "info\\.arxiv\\.org\\/help\\/api\\/tou" arxiv-server-https: description: arXiv servers must be HTTPS (export.arxiv.org or oaipmh.arxiv.org). severity: error given: $.servers[*].url then: function: pattern functionOptions: match: "^https:\\/\\/(export|oaipmh)\\.arxiv\\.org" arxiv-summary-title-case: description: All operation summaries must use Title Case. severity: warn given: $.paths[*][*].summary then: function: pattern functionOptions: match: "^[A-Z][A-Za-z0-9]*(\\s[A-Za-z0-9\\-:]+)*$" arxiv-operation-id-required: description: Every operation must declare an operationId. severity: error given: $.paths[*][get,post,put,patch,delete] then: field: operationId function: truthy arxiv-atom-response: description: Query API responses should advertise application/atom+xml or text/xml content. severity: warn given: $.paths[*][*].responses[*].content then: function: schema functionOptions: schema: type: object anyOf: - required: ["application/atom+xml"] - required: ["text/xml"] arxiv-tag-title-case: description: Tags must use Title Case. severity: warn given: $.tags[*].name then: function: pattern functionOptions: match: "^[A-Z][A-Za-z0-9\\-]*(\\s[A-Z][A-Za-z0-9\\-]*)*$|^OAI-PMH$"