Skip to content

Commit b630dda

Browse files
authored
Merge pull request #186 from RonasIT/163-modify-500-code-error-response-page
refactor: remove type key from trace
2 parents 0ee4859 + f3174a6 commit b630dda

File tree

43 files changed

+2
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2
-42
lines changed

src/Services/SwaggerService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,8 @@ protected function getErrorPlace(Throwable $exception): string
853853
{
854854
$firstTraceEntry = Arr::first($exception->getTrace());
855855

856+
Arr::forget($firstTraceEntry, 'type');
857+
856858
$formattedTraceEntry = Arr::map(
857859
array: $firstTraceEntry,
858860
callback: fn ($value, $key) => $key . '=' . (is_array($value) ? json_encode($value) : $value),

tests/fixtures/SwaggerServiceTest/empty_prod_documentation.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=getDocumentation
1616
class=RonasIT\AutoDoc\Drivers\LocalDriver
17-
type=->
1817
args=[]

tests/fixtures/SwaggerServiceTest/invalid_format_array_parameter_no_items.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateType
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[{"type":"array"},["array","boolean","integer","number","string","object","null","undefined"],"paths.\/users.post.parameters.0"]

tests/fixtures/SwaggerServiceTest/invalid_format_array_response_body_no_items.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateType
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[{"type":"array"},["array","boolean","integer","number","string","object","null","undefined","file"],"paths.\/users.get.responses.200.schema"]

tests/fixtures/SwaggerServiceTest/invalid_format_array_response_header_no_items.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateType
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[{"type":"array"},["array","boolean","integer","number","string","object","date","double"],"paths.\/users.get.responses.default.headers.Last-Modified"]

tests/fixtures/SwaggerServiceTest/invalid_format_body_and_form_params.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateBodyParameters
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"foo","in":"body","schema":{"type":"number"}},{"name":"bar","in":"formData","schema":{"type":"number"}}],"paths.\/users\/{username}.post"]

tests/fixtures/SwaggerServiceTest/invalid_format_duplicate_header_params.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateParamsUnique
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"foo","in":"header","schema":{"type":"string"},"required":false},{"name":"username","in":"header","schema":{"type":"string"}},{"name":"username","in":"body","schema":{"type":"string"}},{"name":"foo","in":"header","schema":{"type":"number"},"required":true}],"paths.\/users\/{username}.get"]

tests/fixtures/SwaggerServiceTest/invalid_format_duplicate_operation_id.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateOperationIdsUnique
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[]

tests/fixtures/SwaggerServiceTest/invalid_format_duplicate_path_params.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validateParamsUnique
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"bar","in":"header","schema":{"type":"string"},"required":false},{"name":"username","in":"header","schema":{"type":"string"}},{"name":"username","in":"body","schema":{"type":"string"}},{"name":"username","in":"path","schema":{"type":"number"},"required":true}],"paths.\/users\/{username}.get"]

tests/fixtures/SwaggerServiceTest/invalid_format_duplicate_path_placeholders.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@
1414
line=999
1515
function=validatePathParameters
1616
class=RonasIT\AutoDoc\Validators\SwaggerSpecValidator
17-
type=->
1817
args=[[{"name":"username","in":"path","required":true,"schema":{"type":"string"}},{"name":"img_id","in":"path","required":true,"schema":{"type":"number"}}],"\/users\/{username}\/profile\/{username}\/image\/{img_id}","paths.\/users\/{username}\/profile\/{username}\/image\/{img_id}.get"]

0 commit comments

Comments
 (0)