Skip to content

Commit

Permalink
Merge pull request #4 from Squidex/fix-headers
Browse files Browse the repository at this point in the history
Improve header names.
  • Loading branch information
SebastianStehle authored Sep 1, 2024
2 parents 901ae10 + 9f440f1 commit 73c5c16
Show file tree
Hide file tree
Showing 241 changed files with 1,230 additions and 2,346 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- name: Test - Start Compose
run: docker compose up -d
working-directory: tests
working-directory: tests/docker

- name: Test - RUN
uses: php-actions/phpunit@master
Expand All @@ -35,4 +35,4 @@ jobs:
- name: Test - Cleanup
if: always()
run: docker compose down
working-directory: tests
working-directory: tests/docker
21 changes: 1 addition & 20 deletions .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,6 @@
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
/local/docs/*.*
/local/test/*.*

Expand All @@ -27,7 +11,4 @@ git_push.sh
# We use github actions
.travis.yml

README.md

# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
README.md
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.8.0
7.9.0-SNAPSHOT
1 change: 0 additions & 1 deletion generate-config.ps1

This file was deleted.

4 changes: 2 additions & 2 deletions generate.ps1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli config-help -g php
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/openapi.json -g php --template-dir /local/templates -o /local/ -c /local/openapi-config.yml
# docker run --rm -v ${PWD}:/local squidex/openapi-generator-cli config-help -g php
docker run --rm -v ${PWD}:/local squidex/openapi-generator-cli generate -i /local/openapi.json -g php --template-dir /local/templates -o /local/ -c /local/openapi-config.yml
48 changes: 24 additions & 24 deletions lib/Api/AppsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.8.0
* Generator version: 7.9.0-SNAPSHOT
*/

/**
Expand Down Expand Up @@ -11066,17 +11066,17 @@ public function putAppTeamRequest($transfer_to_team_dto, string $contentType = s
* Upload the app image.
*
* @param \SplFileObject $file file (optional)
* @param string $file_url file_url (optional)
* @param string $file_name file_name (optional)
* @param string $url url (optional)
* @param string $name name (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation
*
* @throws \Squidex\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto
*/
public function uploadImage($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0])
public function uploadImage($file = null, $url = null, $name = null, string $contentType = self::contentTypes['uploadImage'][0])
{
list($response) = $this->uploadImageWithHttpInfo($file, $file_url, $file_name, $contentType);
list($response) = $this->uploadImageWithHttpInfo($file, $url, $name, $contentType);
return $response;
}

Expand All @@ -11086,17 +11086,17 @@ public function uploadImage($file = null, $file_url = null, $file_name = null, s
* Upload the app image.
*
* @param \SplFileObject $file (optional)
* @param string $file_url (optional)
* @param string $file_name (optional)
* @param string $url (optional)
* @param string $name (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation
*
* @throws \Squidex\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \Squidex\Client\Model\AppDto|\Squidex\Client\Model\ErrorDto|\Squidex\Client\Model\ErrorDto, HTTP status code, HTTP response headers (array of strings)
*/
public function uploadImageWithHttpInfo($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0])
public function uploadImageWithHttpInfo($file = null, $url = null, $name = null, string $contentType = self::contentTypes['uploadImage'][0])
{
$request = $this->uploadImageRequest($file, $file_url, $file_name, $contentType);
$request = $this->uploadImageRequest($file, $url, $name, $contentType);

try {
$options = $this->createHttpClientOption();
Expand Down Expand Up @@ -11234,16 +11234,16 @@ public function uploadImageWithHttpInfo($file = null, $file_url = null, $file_na
* Upload the app image.
*
* @param \SplFileObject $file (optional)
* @param string $file_url (optional)
* @param string $file_name (optional)
* @param string $url (optional)
* @param string $name (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function uploadImageAsync($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0])
public function uploadImageAsync($file = null, $url = null, $name = null, string $contentType = self::contentTypes['uploadImage'][0])
{
return $this->uploadImageAsyncWithHttpInfo($file, $file_url, $file_name, $contentType)
return $this->uploadImageAsyncWithHttpInfo($file, $url, $name, $contentType)
->then(
function ($response) {
return $response[0];
Expand All @@ -11257,17 +11257,17 @@ function ($response) {
* Upload the app image.
*
* @param \SplFileObject $file (optional)
* @param string $file_url (optional)
* @param string $file_name (optional)
* @param string $url (optional)
* @param string $name (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function uploadImageAsyncWithHttpInfo($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0])
public function uploadImageAsyncWithHttpInfo($file = null, $url = null, $name = null, string $contentType = self::contentTypes['uploadImage'][0])
{
$returnType = '\Squidex\Client\Model\AppDto';
$request = $this->uploadImageRequest($file, $file_url, $file_name, $contentType);
$request = $this->uploadImageRequest($file, $url, $name, $contentType);

return $this->client
->sendAsync($request, $this->createHttpClientOption())
Expand Down Expand Up @@ -11309,14 +11309,14 @@ function ($exception) {
* Create request for operation 'uploadImage'
*
* @param \SplFileObject $file (optional)
* @param string $file_url (optional)
* @param string $file_name (optional)
* @param string $url (optional)
* @param string $name (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadImage'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function uploadImageRequest($file = null, $file_url = null, $file_name = null, string $contentType = self::contentTypes['uploadImage'][0])
public function uploadImageRequest($file = null, $url = null, $name = null, string $contentType = self::contentTypes['uploadImage'][0])
{


Expand Down Expand Up @@ -11352,12 +11352,12 @@ public function uploadImageRequest($file = null, $file_url = null, $file_name =
}
}
// form params
if ($file_url !== null) {
$formParams['fileUrl'] = ObjectSerializer::toFormValue($file_url);
if ($url !== null) {
$formParams['url'] = ObjectSerializer::toFormValue($url);
}
// form params
if ($file_name !== null) {
$formParams['fileName'] = ObjectSerializer::toFormValue($file_name);
if ($name !== null) {
$formParams['name'] = ObjectSerializer::toFormValue($name);
}

$headers = $this->headerSelector->selectHeaders(
Expand Down
Loading

0 comments on commit 73c5c16

Please sign in to comment.