Gadjah Mada University · API Governance Rules
Gadjah Mada University API Rules
Spectral linting rules defining API design standards and conventions for Gadjah Mada University.
11 Rules
error 6
warn 5
Rule Categories
ugm
Rules
error
ugm-info-contact-required
UGM ID declares no info.contact. There is no route for a consumer of this API to reach the team that runs it - the only addresses anywhere on the estate belong to the library and to journal administration.
$.info
warn
ugm-info-license-required
No licence is attached to the specification, and no terms of service govern use of the API.
$.info
warn
ugm-info-terms-of-service-required
No info.termsOfService on a contract that fronts institutional identity data.
$.info
warn
ugm-operation-responses-must-have-examples
No operation in UGM ID carries a response example. The schemas are well formed, but a consumer cannot see a single real payload without first obtaining credentials that are not self-service.
$.paths[*][get,post,put,patch,delete].responses[*].content[*]
error
ugm-error-responses-must-be-json
Live probes show /api/me, /user/me, /userinfo and /user/username/{username} returning a 4559-byte branded HTML page on 401 rather than the ErrorResponse schema the contract declares. Every declared error response must be application/json so the declaration matches behaviour.
$.paths[*][get,post,put,patch,delete].responses[?(@property >= '400')].content
warn
ugm-security-scheme-none-must-not-be-advertised
The authorization server advertises `none` as a client authentication method and the specification's own description marks it as legacy, to be removed. Until it is removed, any client can present itself unauthenticated at the token endpoint.
$.info.description
error
ugm-server-urls-must-be-absolute
Both discovery documents this API publishes emit scheme-less URLs ("oauth.simaster.ugm.ac.id/oauth/token"). OIDC Discovery and RFC 8414 both require absolute URLs. servers[] in the OpenAPI is correct; the discovery documents are not, and this rule guards the property that must not regress.
$.servers[*].url
error
ugm-operations-must-declare-security
Resource operations must declare their security requirement so an agent knows a token is needed before it calls and gets an HTML 401.
$.paths[*][get,post,put,patch,delete][?(@.tags && @.tags.indexOf('API') !== -1)]
error
ugm-operation-must-have-operation-id
UGM ID already passes this on all twenty operations. The rule is kept to hold the property.
$.paths[*][get,post,put,patch,delete]
warn
ugm-operation-must-have-summary
UGM ID passes this on all twenty operations; the rule holds the property.
$.paths[*][get,post,put,patch,delete]
error
ugm-no-write-without-scope
Every operation on this server is read-only today. If a write operation is ever added it must carry its own scope - the five scopes currently issued (openid, profile, email, user.read, userDetail.read) are all read scopes and none of them should be widened to cover a mutation.
$.paths[*][put,patch,delete]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.