diff --git a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache index 3d1a5787e382..c6eb0799686a 100644 --- a/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache +++ b/modules/openapi-generator/src/main/resources/kotlin-spring/formParams.mustache @@ -1 +1 @@ -{{#isFormParam}}{{^isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}} {{#isModel}}@RequestPart{{/isModel}}{{^isModel}}@RequestParam{{/isModel}}(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}} {{/isFile}}{{#isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "file detail"){{/swagger1AnnotationLibrary}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} \ No newline at end of file +{{#isFormParam}}{{^isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}{{#defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]{{^isContainer}}, defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{/isContainer}}){{/defaultValue}}{{/allowableValues}}{{#allowableValues}}{{^defaultValue}}, schema = Schema(allowableValues = [{{#values}}"{{{.}}}"{{^-last}}, {{/-last}}{{/values}}]){{/defaultValue}}{{/allowableValues}}{{^allowableValues}}{{#defaultValue}}{{^isContainer}}, schema = Schema(defaultValue = {{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}{{{defaultValue}}}{{^isString}}"{{/isString}}{{#isString}}{{#isEnum}}"{{/isEnum}}{{/isString}}){{/isContainer}}{{/defaultValue}}{{/allowableValues}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} {{#isModel}}@RequestPart{{/isModel}}{{^isModel}}@RequestParam{{/isModel}}(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}} {{/isFile}}{{#isFile}}{{#swagger2AnnotationLibrary}}@Parameter(description = "{{{description}}}"){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "file detail"){{/swagger1AnnotationLibrary}} {{#useBeanValidation}}@Valid{{/useBeanValidation}} @RequestPart("{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}) {{{paramName}}}: {{>optionalDataType}}{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache b/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache index 605c5d461c8a..7c2a3ef3df24 100644 --- a/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This lightweight extensible client library is [PSR-7](https://www.php-fig.org/psr/psr-7), [PSR-11](https://www.php-fig.org/psr/psr-11), [PSR-17](https://www.php-fig.org/psr/psr-17) and [PSR-18](https://www.php-fig.org/psr/psr-18) complaint and relies on: -- PHP: >=7.4 +- PHP: >=8.1 - [Data Transfer](https://github.com/Articus/DataTransfer): >=0.6 diff --git a/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache index 6a08a9cb8003..8a2c932cf485 100644 --- a/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt/composer.json.mustache @@ -18,7 +18,7 @@ "version": "{{artifactVersion}}", "type": "library", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "articus/data-transfer": "^0.6", "articus/openapi-generator-common": "^0.3", "articus/openapi-generator-apiclient": "^0.2", @@ -36,4 +36,4 @@ "nyholm/psr7": "^1.8", "symfony/http-client": "^5.4" } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-flight/composer.mustache b/modules/openapi-generator/src/main/resources/php-flight/composer.mustache index d922daab923e..fdbe33b8e348 100644 --- a/modules/openapi-generator/src/main/resources/php-flight/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-flight/composer.mustache @@ -17,7 +17,7 @@ ], "type": "library", "require": { - "php": "^8.1.0", + "php": "^8.1", "flightphp/core": "^3.5.1", "ext-json": "*" }, diff --git a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache index 82bac49894cd..0592ec1a4240 100644 --- a/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-laravel/composer.mustache @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "laravel/framework": "^10.0", "crell/serde": "^1.0" }, diff --git a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache index e6835f692223..ea6c3f4a6789 100644 --- a/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-lumen/composer.mustache @@ -24,7 +24,7 @@ ], "type": "project", "require": { - "php": "^7.2.5", + "php": "^8.1", "laravel/lumen-framework": "^7.2" }, "require-dev": { diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache index fd66369b261a..ea26b0bac4a7 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=8.0 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.3 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache index aff61e1f25cd..f7dd2832b423 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/composer.json.mustache @@ -18,7 +18,7 @@ "version": "{{artifactVersion}}", "type": "project", "require": { - "php": "^8.0", + "php": "^8.1", "ext-yaml": "^2.2", "mezzio/mezzio": "^3.3", "laminas/laminas-diactoros": "^2.5", @@ -36,4 +36,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache index a80470059016..d0fb8aebf1f7 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/README.md.mustache @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=7.3 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.2 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache index b7c25a283ce1..c4202b148762 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/composer.json.mustache @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^8.1", "ext-yaml": "^2.0", "mezzio/mezzio": "^3.2", "laminas/laminas-diactoros": "^2.1", @@ -37,4 +37,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache index dd5fb2531842..58312402e3ed 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/README.mustache @@ -20,7 +20,7 @@ This server has been generated with [Laminas (Zend) PSR-7 implementation](https: ## Requirements * Web server with URL rewriting -* PHP 7.4 or newer +* PHP 8.1 or newer This package contains `.htaccess` for Apache configuration. If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc. diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache index c2825b4f8d09..75ae6d6dac7a 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/composer.mustache @@ -22,7 +22,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "dyorg/slim-token-authentication": "dev-slim4", {{#isGuzzlePsr7}} "guzzlehttp/psr7": "^1.6.1", diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache index d75108d3a368..6709f78fcfa5 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/github_action.yml.mustache @@ -10,7 +10,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] runs-on: ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache index 8a61a5402ff4..a2ecb44c36c4 100644 --- a/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/php-slim4-server/licenseInfo.mustache @@ -2,7 +2,7 @@ {{#appName}} * {{{.}}} {{/appName}} - * PHP version 7.4 + * PHP version 8.1 * * @package {{invokerPackage}} * @author OpenAPI Generator team @@ -20,4 +20,4 @@ * Contact: {{{.}}} {{/infoEmail}} * Generated by: https://github.com/openapitools/openapi-generator.git - */ \ No newline at end of file + */ diff --git a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache index 3a061043642a..c51a6854d9be 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/modules/openapi-generator/src/main/resources/php/ApiException.mustache b/modules/openapi-generator/src/main/resources/php/ApiException.mustache index c5c3995dd540..285839e2ded7 100644 --- a/modules/openapi-generator/src/main/resources/php/ApiException.mustache +++ b/modules/openapi-generator/src/main/resources/php/ApiException.mustache @@ -1,7 +1,7 @@ =7.4 +- PHP: >=8.1 - [Data Transfer](https://github.com/Articus/DataTransfer): >=0.6 diff --git a/samples/client/petstore/php-dt/composer.json b/samples/client/petstore/php-dt/composer.json index 63ce6fcc64d6..fe01b484dd63 100644 --- a/samples/client/petstore/php-dt/composer.json +++ b/samples/client/petstore/php-dt/composer.json @@ -18,7 +18,7 @@ "version": "1.0.0", "type": "library", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "articus/data-transfer": "^0.6", "articus/openapi-generator-common": "^0.3", "articus/openapi-generator-apiclient": "^0.2", @@ -36,4 +36,4 @@ "nyholm/psr7": "^1.8", "symfony/http-client": "^5.4" } -} \ No newline at end of file +} diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md index d6f67751a753..81f5c4bf3639 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/README.md +++ b/samples/client/petstore/php/OpenAPIClient-php/README.md @@ -7,8 +7,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod ### Requirements -PHP 7.4 and later. -Should also work with PHP 8.0. +PHP 8.1 and later. ### Composer diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json index fa431b540852..f700934f4012 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index 4d359a63b348..d97d060f866c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -1,7 +1,7 @@ =7.2", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*" }, "platform-dev": [], - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.6.0" } diff --git a/samples/client/petstore/php/psr-18/lib/Configuration.php b/samples/client/petstore/php/psr-18/lib/Configuration.php index 98176a868f29..5a12a331ea86 100644 --- a/samples/client/petstore/php/psr-18/lib/Configuration.php +++ b/samples/client/petstore/php/psr-18/lib/Configuration.php @@ -1,7 +1,7 @@ { + fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "name", required = false) name: kotlin.String? , @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } @@ -110,7 +110,7 @@ interface PetApi { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } } diff --git a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt index fc44c9d500ab..3e4240107253 100644 --- a/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-spring-default/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -158,7 +158,7 @@ class PetApiController() { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } @@ -176,7 +176,7 @@ class PetApiController() { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } } diff --git a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt index 41c0da8045e0..cd920cd5bcda 100644 --- a/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-3/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -95,7 +95,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @RequestParam(value = "name", required = false) name: kotlin.String? , @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "name", required = false) name: kotlin.String? , @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -106,7 +106,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt index 737cdc1cad7d..42eeb425c721 100644 --- a/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate-nodefaults/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -179,7 +179,7 @@ interface PetApi { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return getDelegate().updatePetWithForm(petId, name, status) } @@ -199,7 +199,7 @@ interface PetApi { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return getDelegate().uploadFile(petId, additionalMetadata, file) } } diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt index 6992ef95f2a5..77e2be706299 100644 --- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -178,7 +178,7 @@ interface PetApi { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return getDelegate().updatePetWithForm(petId, name, status) } @@ -198,7 +198,7 @@ interface PetApi { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return getDelegate().uploadFile(petId, additionalMetadata, file) } } diff --git a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt index ad45a6ad8be2..84c4333e8944 100644 --- a/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-modelMutable/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -154,7 +154,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -172,7 +172,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt index f9a8789ef3d0..2934906f7d74 100644 --- a/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt +++ b/samples/server/petstore/kotlin-springboot-multipart-request-model/src/main/kotlin/org/openapitools/api/MultipartMixedApiController.kt @@ -46,7 +46,7 @@ class MultipartMixedApiController() { value = ["/multipart-mixed"], consumes = ["multipart/form-data"] ) - fun multipartMixed(@Parameter(description = "", required = true, schema = Schema(allowableValues = ["ALLOWED", "IN_PROGRESS", "REJECTED"])) @RequestParam(value = "status", required = true) status: MultipartMixedStatus ,@Parameter(description = "a file") @Valid @RequestPart("file", required = true) file: org.springframework.web.multipart.MultipartFile,@Parameter(description = "") @RequestPart(value = "marker", required = false) marker: MultipartMixedRequestMarker? ): ResponseEntity { + fun multipartMixed(@Parameter(description = "", required = true, schema = Schema(allowableValues = ["ALLOWED", "IN_PROGRESS", "REJECTED"])) @Valid @RequestParam(value = "status", required = true) status: MultipartMixedStatus ,@Parameter(description = "a file") @Valid @RequestPart("file", required = true) file: org.springframework.web.multipart.MultipartFile,@Parameter(description = "") @Valid @RequestPart(value = "marker", required = false) marker: MultipartMixedRequestMarker? ): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } } diff --git a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt index 1394293cc69a..05575e31959f 100644 --- a/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive-without-flow/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -159,7 +159,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - suspend fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + suspend fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -177,7 +177,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - suspend fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + suspend fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt index a2263f9ac22c..3a9a2760dd62 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-reactive/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -159,7 +159,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - suspend fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + suspend fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -177,7 +177,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - suspend fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + suspend fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt index a234cc63049a..1268f6c73dcc 100644 --- a/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt +++ b/samples/server/petstore/kotlin-springboot-request-cookie/src/main/kotlin/org/openapitools/api/PetApi.kt @@ -176,7 +176,7 @@ interface PetApi { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } @@ -196,7 +196,7 @@ interface PetApi { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(HttpStatus.NOT_IMPLEMENTED) } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt index c8dcb731d8ac..89a04feba590 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger1/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -156,7 +156,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -175,7 +175,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt index ad45a6ad8be2..84c4333e8944 100644 --- a/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-source-swagger2/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -154,7 +154,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@Parameter(description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@Parameter(description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -172,7 +172,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@Parameter(description = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@Parameter(description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@Parameter(description = "file to upload") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt index c8dcb731d8ac..89a04feba590 100644 --- a/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot-springfox/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -156,7 +156,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Updated name of the pet") @RequestParam(value = "name", required = false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) name: kotlin.String? ,@ApiParam(value = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -175,7 +175,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile(@ApiParam(value = "ID of pet to update", required = true) @PathVariable("petId") petId: kotlin.Long,@ApiParam(value = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? ,@ApiParam(value = "file detail") @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt index ee8089e3b344..4e393ceef9b1 100644 --- a/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt +++ b/samples/server/petstore/kotlin-springboot/src/main/kotlin/org/openapitools/api/PetApiController.kt @@ -94,7 +94,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { value = ["/pet/{petId}"], consumes = ["application/x-www-form-urlencoded"] ) - fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @RequestParam(value = "name", required = false) name: kotlin.String? , @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { + fun updatePetWithForm( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "name", required = false) name: kotlin.String? , @Valid @RequestParam(value = "status", required = false) status: kotlin.String? ): ResponseEntity { return ResponseEntity(service.updatePetWithForm(petId, name, status), HttpStatus.valueOf(405)) } @@ -105,7 +105,7 @@ class PetApiController(@Autowired(required = true) val service: PetApiService) { produces = ["application/json"], consumes = ["multipart/form-data"] ) - fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { + fun uploadFile( @PathVariable("petId") petId: kotlin.Long, @Valid @RequestParam(value = "additionalMetadata", required = false) additionalMetadata: kotlin.String? , @Valid @RequestPart("file", required = false) file: org.springframework.web.multipart.MultipartFile?): ResponseEntity { return ResponseEntity(service.uploadFile(petId, additionalMetadata, file), HttpStatus.valueOf(200)) } } diff --git a/samples/server/petstore/php-flight/composer.json b/samples/server/petstore/php-flight/composer.json index 782987a751a2..ea307467bc9a 100644 --- a/samples/server/petstore/php-flight/composer.json +++ b/samples/server/petstore/php-flight/composer.json @@ -12,7 +12,7 @@ ], "type": "library", "require": { - "php": "^8.1.0", + "php": "^8.1", "flightphp/core": "^3.5.1", "ext-json": "*" }, diff --git a/samples/server/petstore/php-laravel/composer.json b/samples/server/petstore/php-laravel/composer.json index d69644f94ed1..6b230b67e52b 100644 --- a/samples/server/petstore/php-laravel/composer.json +++ b/samples/server/petstore/php-laravel/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "laravel/framework": "^10.0", "crell/serde": "^1.0" }, diff --git a/samples/server/petstore/php-lumen/lib/composer.json b/samples/server/petstore/php-lumen/lib/composer.json index 4ef01d3f3ce7..646b22352709 100644 --- a/samples/server/petstore/php-lumen/lib/composer.json +++ b/samples/server/petstore/php-lumen/lib/composer.json @@ -21,7 +21,7 @@ ], "type": "project", "require": { - "php": "^7.2.5", + "php": "^8.1", "laravel/lumen-framework": "^7.2" }, "require-dev": { diff --git a/samples/server/petstore/php-mezzio-ph-modern/README.md b/samples/server/petstore/php-mezzio-ph-modern/README.md index fd66369b261a..ea26b0bac4a7 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/README.md +++ b/samples/server/petstore/php-mezzio-ph-modern/README.md @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=8.0 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.3 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/samples/server/petstore/php-mezzio-ph-modern/composer.json b/samples/server/petstore/php-mezzio-ph-modern/composer.json index c40d77b6e182..56f655eda679 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/composer.json +++ b/samples/server/petstore/php-mezzio-ph-modern/composer.json @@ -18,7 +18,7 @@ "version": "1.0.0", "type": "project", "require": { - "php": "^8.0", + "php": "^8.1", "ext-yaml": "^2.2", "mezzio/mezzio": "^3.3", "laminas/laminas-diactoros": "^2.5", @@ -36,4 +36,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/samples/server/petstore/php-mezzio-ph/README.md b/samples/server/petstore/php-mezzio-ph/README.md index a80470059016..d0fb8aebf1f7 100644 --- a/samples/server/petstore/php-mezzio-ph/README.md +++ b/samples/server/petstore/php-mezzio-ph/README.md @@ -5,7 +5,7 @@ Generated by the [OpenAPI Generator](https://openapi-generator.tech) project. ## Overview This server stub aims to provide light, yet comprehensive structure for your API project using: -- PHP: >=7.3 +- PHP: >=8.1 - [Laminas Mezzio](https://docs.mezzio.dev/mezzio/): >=3.2 - [Path Handler](https://github.com/Articus/PathHandler): >=0.7 diff --git a/samples/server/petstore/php-mezzio-ph/composer.json b/samples/server/petstore/php-mezzio-ph/composer.json index d335e88d2605..66a930db32f2 100644 --- a/samples/server/petstore/php-mezzio-ph/composer.json +++ b/samples/server/petstore/php-mezzio-ph/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^7.3 || ^8.0", + "php": "^8.1", "ext-yaml": "^2.0", "mezzio/mezzio": "^3.2", "laminas/laminas-diactoros": "^2.1", @@ -37,4 +37,4 @@ "": "src/" } } -} \ No newline at end of file +} diff --git a/samples/server/petstore/php-slim4/.github/workflows/main.yml b/samples/server/petstore/php-slim4/.github/workflows/main.yml index feda9a5f8f79..92860737863b 100644 --- a/samples/server/petstore/php-slim4/.github/workflows/main.yml +++ b/samples/server/petstore/php-slim4/.github/workflows/main.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['8.1'] runs-on: ${{ matrix.operating-system }} steps: - name: Checkout diff --git a/samples/server/petstore/php-slim4/README.md b/samples/server/petstore/php-slim4/README.md index f1d568cc7572..08938e454b63 100644 --- a/samples/server/petstore/php-slim4/README.md +++ b/samples/server/petstore/php-slim4/README.md @@ -9,7 +9,7 @@ This server has been generated with [Slim PSR-7](https://github.com/slimphp/Slim ## Requirements * Web server with URL rewriting -* PHP 7.4 or newer +* PHP 8.1 or newer This package contains `.htaccess` for Apache configuration. If you use another server(Nginx, HHVM, IIS, lighttpd) check out [Web Servers](https://www.slimframework.com/docs/v3/start/web-servers.html) doc. diff --git a/samples/server/petstore/php-slim4/composer.json b/samples/server/petstore/php-slim4/composer.json index 2cd44b3ef38b..12f606802713 100644 --- a/samples/server/petstore/php-slim4/composer.json +++ b/samples/server/petstore/php-slim4/composer.json @@ -22,7 +22,7 @@ } ], "require": { - "php": "^7.4 || ^8.0", + "php": "^8.1", "dyorg/slim-token-authentication": "dev-slim4", "monolog/monolog": "^2.4", "neomerx/cors-psr7": "^2.0", diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php index f7d620141c56..4aa9e5b6b7e3 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractPetApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php index 2bac5b6b2ba1..093a41836f84 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractStoreApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php index 461df8690620..a3d104a03068 100644 --- a/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php +++ b/samples/server/petstore/php-slim4/lib/Api/AbstractUserApi.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php index 83b8452fad8b..bd7550d68ede 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterDependencies.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php index 120d91dede9e..d7629a54f386 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterMiddlewares.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php index 9bb345972869..1503d7ff1a68 100644 --- a/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php +++ b/samples/server/petstore/php-slim4/lib/App/RegisterRoutes.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php index 3923fef3153c..2faeeafd8050 100644 --- a/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php +++ b/samples/server/petstore/php-slim4/lib/App/ResponseEmitter.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + declare(strict_types=1); /** diff --git a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php index b253a0f84bb7..3d01e2694c1c 100644 --- a/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php +++ b/samples/server/petstore/php-slim4/lib/Auth/AbstractAuthenticator.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/BaseModel.php b/samples/server/petstore/php-slim4/lib/BaseModel.php index b0040c1a5575..0cd93c9fe7d6 100644 --- a/samples/server/petstore/php-slim4/lib/BaseModel.php +++ b/samples/server/petstore/php-slim4/lib/BaseModel.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php index bd0edc18f10a..5f276ae63f8c 100644 --- a/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php +++ b/samples/server/petstore/php-slim4/lib/Model/ApiResponse.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Category.php b/samples/server/petstore/php-slim4/lib/Model/Category.php index 584fe5d7d3b0..bbeec5bdc2fc 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Category.php +++ b/samples/server/petstore/php-slim4/lib/Model/Category.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Order.php b/samples/server/petstore/php-slim4/lib/Model/Order.php index 1422e6efcf4b..eec2342062ff 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Order.php +++ b/samples/server/petstore/php-slim4/lib/Model/Order.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Pet.php b/samples/server/petstore/php-slim4/lib/Model/Pet.php index f249c10dfac4..3bbe551628d9 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Pet.php +++ b/samples/server/petstore/php-slim4/lib/Model/Pet.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/Tag.php b/samples/server/petstore/php-slim4/lib/Model/Tag.php index 81d7a6e26a6f..5d315a9ae398 100644 --- a/samples/server/petstore/php-slim4/lib/Model/Tag.php +++ b/samples/server/petstore/php-slim4/lib/Model/Tag.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/lib/Model/User.php b/samples/server/petstore/php-slim4/lib/Model/User.php index 68494ec67b5c..bae01519f9ed 100644 --- a/samples/server/petstore/php-slim4/lib/Model/User.php +++ b/samples/server/petstore/php-slim4/lib/Model/User.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/public/index.php b/samples/server/petstore/php-slim4/public/index.php index 1868cac95761..fa9c9777716a 100644 --- a/samples/server/petstore/php-slim4/public/index.php +++ b/samples/server/petstore/php-slim4/public/index.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-slim4/tests/BaseModelTest.php b/samples/server/petstore/php-slim4/tests/BaseModelTest.php index 33325cc198c9..75fb916cb84d 100644 --- a/samples/server/petstore/php-slim4/tests/BaseModelTest.php +++ b/samples/server/petstore/php-slim4/tests/BaseModelTest.php @@ -2,7 +2,7 @@ /** * OpenAPI Petstore - * PHP version 7.4 + * PHP version 8.1 * * @package OpenAPIServer * @author OpenAPI Generator team @@ -15,6 +15,7 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ + /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json index fdce9d5c69c3..42cd7134c0bb 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*",