be35d92b52
- Updated response descriptors in various endpoints to utilize specific resource classes instead of generic JsonResponse. - Changed response types for friendship, guild, party, and support issue endpoints to their respective resource classes. - Incremented version number in manifest.json to 0.5.3 for the new changes.
1.9 KiB
1.9 KiB
Generated SDK
The generated SDK is a Java view of the control-plane route contract.
Generated files live under:
src/main/java/net/kewwbec/network/generated/api/v1
These files include:
- route names
- allowed HTTP methods
- URI templates
- required abilities
- middleware metadata
- request field descriptors
- response type descriptors
- typed domain clients and DTOs for generated API resources
Usage
Import the generated root:
import net.kewwbec.network.generated.api.v1.ControlPlaneApiV1;
Use domain APIs to inspect route descriptors:
ControlPlaneApiV1 api = ControlPlaneApiV1.INSTANCE;
String version = api.apiVersion();
int endpointCount = api.endpointCount();
Use route endpoint constants with handwritten clients or batching:
String uri = PathBuilder.resolve(
SessionProfileEndpoint.VALUE.uri(),
"player",
playerId
);
Use generated domain clients for direct typed calls:
PlayerPermissionSnapshot permissions =
NetworkPlugin.client().players().authorizationPermissionSnapshot(playerId);
AssetPackVersion activePack =
NetworkPlugin.client().assets().getActivePack(packKey);
Some generated clients include hand-friendly aliases for route-shaped names. For example, the assets domain exposes getActivePack(...) and getPackVersionFiles(...) over the generated active-pack and version-files endpoints.
Regeneration
The source of truth is ../core-control-plane.
Run from core-control-plane:
php artisan control-plane:sync-network-sdk --dry-run
php artisan control-plane:sync-network-sdk
Review generated churn carefully before committing. Broad generated diffs can happen if core-control-plane has unrelated route changes.
Rules
- Do not manually patch generated Java.
- Fix Laravel routes, requests, resources, or the generator upstream.
- Re-run the sync after route changes.
- Keep handwritten Java under
net.kewwbec.network, outsidegenerated.