Skip to content

Extract AbstractApiUtils static methods into lib/utils/ individual files #71

@taylortom

Description

@taylortom

Summary

Extract all pure static methods from AbstractApiUtils into individual files under lib/utils/.

Functions to extract

  • httpMethodToAction(method) — pure mapping: HTTP verb to auth action
  • httpMethodToDBFunction(method) — pure mapping: HTTP verb to DB operation
  • argsFromReq(req) — pure extraction: builds MongoDB args from Express request
  • generateApiMetadata(instance) — generates OpenAPI-style metadata for routes
  • stringifyValues(data) — pure recursive: converts Dates/ObjectIds to strings

Additional changes

  • Bump adapt-authoring-core dependency to ^2.0.0
  • Keep deprecated delegation stubs on AbstractApiUtils for backwards compatibility
  • Add tests/utils-*.spec.js for each extracted utility

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions