WordPress / WordPress/php-toolkit

Autogenerate JSON Schema and Documentation

Open
#4 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Architecture documentation
Dominant language
PHP
Stars
61
Forks
21
Avg merge
19h 34m
Merged PRs (30d)
7

Description

Typescript Blueprints shipped a JSON Schema and documentation generated from the TypeScript source:

https://github.com/WordPress/wordpress-playground/blob/ef1eb3f57ee251ec98f6075ff7e83d22add188e0/packages/playground/blueprints/public/blueprint-schema.json

The PHP version could do the same to ensure the schema and the documentation are always up to date with the code. This may require taking specific design choices, such as shipping steps arguments as classes:

class WriteFileStepArgs implements StepArgs {
	public $file;
	public string $toPath;

	/**
	 * @param $file
	 * @param string $toPath
	 */
	public function __construct( $file, string $toPath ) {
		$this->file   = $file;
		$this->toPath = $toPath;
	}

}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the TypeScript generator in packages/playground/blueprints/bin/generate-schema.js with the checked-in public/blueprint-schema.json linked in the issue, then inspect the PHP blueprint source and its step argument definitions. Define how PHP arguments should be represented before implementing generation; done means the PHP schema and documentation are generated from the code and remain up to date.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, typescript
Domain
documentation, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.