Skip to content

Operation tags

OpenAPI tags on operations are behavioral contracts, not documentation labels. Only the tags below are allowed. Package / resource grouping is inferred from which *-spec package owns the route — do not invent grouping tags.

Enforced by:

  • assertOpenApiOperationTags when createOpenApiValidator / jobs buildOperationMap load a document (startup)
  • assertOpenApiRouteFileTags in each spec package’s tests
TagEffectEnforced by
no-authSkip session auth and CSRF@saflib/express auth + csrf
csrf-exemptSkip CSRF on unsafe methods@saflib/express csrf
email-verifiedRequire verified email@saflib/express auth
mfa-requiredRequire MFA when enforcement is on@saflib/express auth
site-admin-onlyRequire site admin (+ verified email + MFA)@saflib/express auth
backgroundJob queue may invoke this operationId@saflib/jobs-http

Import constants from @saflib/openapi (OPENAPI_TAG_*) in middleware — do not hard-code tag strings elsewhere.