Skip to content

Add Dummy Data Generator plugin with API routes for OJS#479

Open
munir-abbasi wants to merge 3 commits intopkp:mainfrom
munir-abbasi:main
Open

Add Dummy Data Generator plugin with API routes for OJS#479
munir-abbasi wants to merge 3 commits intopkp:mainfrom
munir-abbasi:main

Conversation

@munir-abbasi
Copy link

This PR adds the Dummy Data Generator plugin, a generic plugin for Open Journal Systems 3.5+.
The plugin extends the OJS API by adding custom routes under the /api/v1/users endpoint to generate dummy users, submissions, and issues for development and testing environments.

Plugin Details


Overview

This plugin provides a controlled way to generate test data directly through the OJS API.
It adds plugin-defined endpoints for:

  • generating users with Author role
  • generating submissions with metadata and files
  • simulating workflow progression via programmatic editorial decisions
  • creating and publishing issues
  • cleaning up generated data safely
    All routes extend the existing OJS users API handler and inherit authentication and authorization from the OJS API layer.

API Endpoints

POST   /api/v1/users/generate-users
POST   /api/v1/users/generate-submissions
POST   /api/v1/users/generate-issue
DELETE /api/v1/users/cleanup

These endpoints are implemented by the plugin and are not part of the core OJS API.

Installation & Testing

  • Plugin installs under plugins/generic/dummyDataGenerator
  • Verified on OJS 3.5.x
  • Plugin loads and registers routes successfully
  • Endpoints return JSON responses as expected
  • Role-based access enforced (Manager/Admin only)

Notes

  • Intended for development and testing environments
  • Workflow progression is simulated via internal decision APIs
  • Cleanup operation deletes only plugin-generated data within the current context
  • Package URL and MD5 checksum have been verified

Checklist

  • Clean release package (no dev artifacts)
  • version.xml matches release
  • GitHub release created (v1.0.0)
  • MD5 checksum matches package
  • Documentation included (README, API docs, installation)

Package

Release archive:
dummyDataGenerator-v1.0.0.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant