Skip to content

Commit

Permalink
Add CSV text file output (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
apogadaev committed May 12, 2023
1 parent 4556f70 commit c7f9b13
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Model/Path/Output/FileOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public static function forZip(): self
return new self('application/zip');
}

public static function forCsvText(): self
{
return new self('text/csv');
}

/**
* {@inheritDoc}
*/
Expand Down
6 changes: 6 additions & 0 deletions tests/Integration/Expected/testSchemaGeneration.json
Original file line number Diff line number Diff line change
Expand Up @@ -7502,6 +7502,12 @@
"format": "binary"
}
},
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
},
"application/json": {
"schema": {
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
Model\Path\Output\FileOutput::forPlainText(),
Model\Path\Output\FileOutput::forPng(),
Model\Path\Output\FileOutput::forZip(),
Model\Path\Output\FileOutput::forCsvText(),
Model\Path\Output\ScalarOutput::json(Type::Integer),
),
new Response(
Expand Down

0 comments on commit c7f9b13

Please sign in to comment.