Skip to content

Commit

Permalink
feat: payload response type
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Sep 26, 2024
1 parent b426bbd commit e4b2518
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/SDK/Language/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public function getTypeName(array $parameter, array $method = []): string
if (!empty($parameter['enumValues'])) {
return \ucfirst($parameter['name']);
}
if ($parameter['name'] === 'responseBody') {
return 'Payload';
}
switch ($parameter['type']) {
case self::TYPE_INTEGER:
case self::TYPE_NUMBER:
Expand Down
3 changes: 3 additions & 0 deletions src/SDK/Language/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ public function getTypeName(array $parameter, array $method = []): string
if (!empty($parameter['enumValues'])) {
return \ucfirst($parameter['name']);
}
if ($parameter['name'] === 'responseBody') {
return 'Payload';
}
switch ($parameter['type']) {
case self::TYPE_INTEGER:
case self::TYPE_NUMBER:
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2100,7 +2100,7 @@
"x-example": null
},
"responseBody": {
"type": "payload",
"type": "string",
"description": "Sample file param",
"default": null,
"x-example": null
Expand Down

0 comments on commit e4b2518

Please sign in to comment.