johnbillion / wp-json-schemas

JSON schemas for WordPress PHP objects and REST API responses
https://www.npmjs.com/package/wp-json-schemas
MIT License
147 stars 8 forks source link

Add a test for identifying new REST API routes #45

Closed johnbillion closed 2 years ago

johnbillion commented 2 years ago

The wp json-dump routes command reads all the routes registered with the REST API and dumps their schemas to files in the tests/data/rest-api/routes directory. These files aren't actually used during tests, the intention was to use them to implement a test which fails when a new endpoint is registered in a new version of WordPress so I can be alerted when a schema for it needs to be created.

johnbillion commented 2 years ago

Implemented in 362033825d9fdce3945837cdac3cc6ca964fd587.