OpenAPI (OAS) — Quick Reference
Short, practical rules for working with OpenAPI specs in ValkyrAI/ThorAPI.
Why it matters
- OpenAPI specs are the canonical blueprint for codegen, APIs, and developer workflows.
- Keep specs clean of internal audit fields to avoid leaking sensitive data and breaking codegen.
Fields to always filter
Remove these audit/system fields from specs before saving or exporting:
- id
- ownerId
- createdDate
- keyHash
- lastAccessedById
- lastAccessedDate
- lastModifiedById
- lastModifiedDate
- trashed
Where to filter
- Importers (frontend + backend) — strip audit fields before persist or display
- Exporters — ensure exported files don't contain internal metadata
- Designer UI — always show a cleaned view to users
Commands & checks (examples)
- Frontend: filterIgnoredFields(spec) before saving or showing
- Backend: OpenAPISpecUtils.filterIgnoredFields(spec) on import/export
See also: OAS Spec Implementation Guide