CodeProject · API Governance Rules
CodeProject API Rules
Spectral linting rules defining API design standards and conventions for CodeProject.
9 Rules
error 4
warn 3
info 2
Rule Categories
codeproject
Rules
error
codeproject-info-contact
API contact information must be present.
$.info
error
codeproject-public-server-https
Public CodeProject API servers must use HTTPS.
$.servers[?(@.url && @.url.indexOf('codeproject.com') > -1)].url
info
codeproject-ai-server-localhost
CodeProject.AI Server example server URL should reference localhost.
$.servers[?(@.url && @.url.indexOf('localhost') > -1)].url
error
codeproject-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
codeproject-operation-tags
Operations must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
codeproject-version-prefix
All paths must be versioned under /v1/.
$.paths
error
codeproject-oauth2-on-my
My/* operations must require oauth2 with at least one scope.
$.paths['/v1/My/Profile','/v1/My/Reputation','/v1/My/Articles','/v1/My/Answers','/v1/My/Blog','/v1/My/Bookmarks','/v1/My/Notifications','/v1/My/Tips'][get].security
warn
codeproject-error-responses
Operations should declare 4xx error responses.
$.paths[*][get,post,put,patch,delete].responses
info
codeproject-ai-multipart
CodeProject.AI Server upload endpoints should accept multipart/form-data.
$.paths[?(@property && @property.indexOf('/v1/vision/') > -1)].post.requestBody.content