Skip to content

Instantly share code, notes, and snippets.

@Korbeil
Created September 25, 2019 12:00
Show Gist options
  • Save Korbeil/00b161408fa27f8a7a66892a5e513b2c to your computer and use it in GitHub Desktop.
Save Korbeil/00b161408fa27f8a7a66892a5e513b2c to your computer and use it in GitHub Desktop.
Reference in Model
<?php
namespace Jane\OpenApi\Tests\Expected\Model;
class Model
{
/**
*
*
* @var string
*/
protected $foo;
/**
*
*
* @var string
*/
protected $bar;
/**
*
*
* @return string
*/
public function getFoo() : string
{
return $this->foo;
}
/**
*
*
* @param string $foo
*
* @return self
*/
public function setFoo(string $foo) : self
{
$this->foo = $foo;
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;
}
}
{
"openapi": "3.0.0",
"info": {
"version": "",
"title": ""
},
"paths": {},
"components": {
"schemas": {
"Model": {
"type": "object",
"properties": {
"foo": {
"$ref": "#/components/schemas/Foo"
},
"bar": {
"type": "string"
}
}
},
"Foo": {
"type": "string"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment