National University of Singapore · API Governance Rules
National University of Singapore API Rules
Spectral linting rules defining API design standards and conventions for National University of Singapore.
6 Rules
error 2
warn 4
Rule Categories
nus
Rules
warn
nus-info-contact-or-description
API info should carry a description so consumers understand the NUSMods data scope.
$.info
warn
nus-server-https
Prefer the HTTPS NUSMods server entry.
$.servers[*].url
error
nus-paths-end-in-json
All NUSMods resources are static JSON files; every path must end in .json (observed convention).
$.paths[*]~
error
nus-get-only
NUSMods data is read-only; only GET operations are expected.
$.paths[*][?(@property != 'get' && @property != 'summary' && @property != 'parameters' && @property != 'description')]~
warn
nus-acadyear-path-param
Year-scoped resources should declare the acadYear path parameter.
$.paths[?(@property.match(/{acadYear}/))][get].parameters
warn
nus-module-code-string
moduleCode is always a string identifier (e.g. CS2100).
$.components.schemas[*].properties.moduleCode