-
-
Save Korbeil/59ae92eb173a2304329952741e637c9b to your computer and use it in GitHub Desktop.
Reference in Resposne
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Jane\OpenApi\Tests\Expected\Model; | |
class FooGetResponse200 | |
{ | |
/** | |
* | |
* | |
* @var int | |
*/ | |
protected $id; | |
/** | |
* | |
* | |
* @var string | |
*/ | |
protected $bar; | |
/** | |
* | |
* | |
* @return int | |
*/ | |
public function getId() : int | |
{ | |
return $this->id; | |
} | |
/** | |
* | |
* | |
* @param int $id | |
* | |
* @return self | |
*/ | |
public function setId(int $id) : self | |
{ | |
$this->id = $id; | |
return $this; | |
} | |
/** | |
* | |
* | |
* @return string | |
*/ | |
public function getBar() : string | |
{ | |
return $this->bar; | |
} | |
/** | |
* | |
* | |
* @param string $bar | |
* | |
* @return self | |
*/ | |
public function setBar(string $bar) : self | |
{ | |
$this->bar = $bar; | |
return $this; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"version": "", | |
"title": "" | |
}, | |
"paths": { | |
"/foo": { | |
"get": { | |
"operationId": "foo", | |
"responses": { | |
"200": { | |
"description": "Default response", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer" | |
}, | |
"bar": { | |
"$ref": "#/components/schemas/Bar" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"Bar": { | |
"type": "string" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment