Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add configurable schema validation, default disabled

+13 -1
+12
config/client.php
··· 117 117 118 118 /* 119 119 |-------------------------------------------------------------------------- 120 + | Schema Validation 121 + |-------------------------------------------------------------------------- 122 + | 123 + | Enable or disable response validation against AT Protocol lexicon schemas. 124 + | When enabled, responses are validated and ValidationException is thrown 125 + | if the response doesn't match the expected schema. 126 + | 127 + */ 128 + 'schema_validation' => env('ATP_SCHEMA_VALIDATION', false), 129 + 130 + /* 131 + |-------------------------------------------------------------------------- 120 132 | Scope Enforcement 121 133 |-------------------------------------------------------------------------- 122 134 |
+1 -1
src/Http/HasHttp.php
··· 45 45 default => throw new InvalidArgumentException("Unsupported method: {$method}"), 46 46 }; 47 47 48 - if (Schema::exists($endpoint)) { 48 + if (config('atp-client.schema_validation') && Schema::exists($endpoint)) { 49 49 $this->validateResponse($endpoint, $response); 50 50 } 51 51