Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Support/Generator/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Dedoc\Scramble\Support\Generator;

use Dedoc\Scramble\Support\Generator\Types\StringType;

class Operation
{
use WithAttributes;
Expand Down Expand Up @@ -38,6 +40,18 @@ class Operation
public function __construct(string $method)
{
$this->method = $method;
$this->addParameters([
Parameter::make('id', 'header')
->required(true)
->setName('Content-Type')
->example('application/json')
->setSchema(Schema::fromType(new StringType())),
Parameter::make('id', 'header')
->required(true)
->setName('Accept')
->example('application/json')
->setSchema(Schema::fromType(new StringType())),
]);
}

public static function make(string $method)
Expand Down