panel
panel copied to clipboard
Replace Fractal with Laravel Data
This change ensure that Scramble docs can read the Request & Response (input/outputs), making easier for new developers to onboard over the current API implementations.
Replacing Fractal with Laravel Data comes with the following benefits:
- Improvements over current maintability for long term
- OpenAPI & Typescript Schema's (3rd party integrations)
This change will be backward compatible with Pterodactyl (1.X) for a mid-term period, to let developers adapt to the new ecosystem changes.
Current plan for development:
- Make our own Data class that extends the original. Add a
setFractal(bool $value = true)andbool $isFractalproperty to it. - Override the generation of the array return to put it into the same shape as a Fractal collection and resources if $isFractal is true.
- Replace all old array $params and returns with Data classes for the old api.
- Optionally create a new V2 api that has none of the Fractal shenanigans.
Adding the package in #1065