2515 Commits

Author SHA1 Message Date
Fionn O'Connor
e131d52ad0
[kotlin-spring] Handle arrays of files correctly using MultipartFile (#20108)
* [kotlin-spring] Fix no List being used for an array of files using multipart/form-data

* [kotlin-spring] Use Spring's MultipartFile class for incoming Files instead of Spring's Resource class.

* [kotlin-spring] Add test to ensure that return type for files is `org.springframework.core.io.Resource`

* [kotlin-spring] Ensure Array is used for lists of files in generated Api class

* Update samples

* [kotlin-spring] Move conditional usage of MultipartFile to optionalDataType.mustache. Update samples

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-12-04 15:24:47 +08:00
William Cheng
25d780ee6d
update python multipart dep to 0.0.18 (#20225) 2024-12-03 12:08:29 +08:00
Ingars Ribners
3f6c3de029
Updated README.mustache template for the Erlang server generator (#20138)
* Updated README.mustache file for the Erlang server generator. Fixed one error and updated the usage instructions

Changes made to the Erlang server generator's user instructions ("README.mustache" file):

1. Corrected the argument in section 4.1 of the user instructions.
   In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
   Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.

2. Reviewed and updated the text of the user instructions to remove any ambiguities.

3. Tested the user instructions for accuracy and completeness.

* erlang-server sample recompiled

* README fix

* Fixed README.mustache template markdown for erlang-server. Re-generated erlang-server sample.

* Update README.mustache

* Sample 'erlang-server' re-generated

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-30 17:31:56 +08:00
jops-wtakase
2aa49227b0
Bugfix: #1666: Change requestBody argument name to 'body' (#20207)
Since Connexion defaults to using 'body' as the argument name for the requestBody, the controller's argument name is adjusted accordingly.
2024-11-30 10:20:06 +08:00
Nelson Vides
f8ca36b97e
Erlang server – minor fix to return type and generated doc (#20197)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program

* erlang-server: minor fixes to return types and generated docs
2024-11-27 22:09:21 +08:00
Victoria Casasampere Fernandez
7072009ab5
[Rust-Axum] Support quotes in string literals (#20176)
* Allow quotes in string literals

* Update samples
2024-11-26 21:36:11 +08:00
Linh Tran Tuan
19e21416ed
[Rust-Axum] BugFix: handling non-lowercase Header in Request/Response (#20178) 2024-11-26 18:39:29 +08:00
Victoria Casasampere Fernandez
a7cacce30e
[Rust-Axum] Dynamically set the types of integer literals (#20133)
* Dynamically set the types of integer literals

* Change the literal limits from i32 to adaptive limits

* Remove length literal types
2024-11-26 00:24:06 +08:00
Kevin
5ae8c03e6f
Ensures a JsonCreator annotated constructor is present if there are required fields, and ensure the getters and setters are properly annotated with required=true / required=false for jaxrs-spec generator. (#19578) 2024-11-24 22:15:55 +08:00
dmnlk
c831983866
PHP8.4 comptible, php-symfony resources (#20162)
* matrix php build

* NullableTypeForNullDefaultValue

* update sample
2024-11-24 16:00:35 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
Nelson Vides
86a18bfb62
erlang-server: add jesse to app.up release (#20120)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program
2024-11-17 10:07:03 +08:00
Victoria Casasampere Fernandez
d7a23a9fcf
[Rust-Axum] Fix compilation error when validate is used on Nullable values (#20100)
* Fix compilation error when validate is used on Nullable values

* Update samples

* Switch Nullable Into Option trait implement to From

* Update samples from rebase
2024-11-15 22:03:59 +08:00
DielN
216ba30172
[JAVA] Add missing dependencies in templates (#20075)
* Add commons-lang3 dependency for useReflectionEqualsHashCode

* Fix feign-no-nullable config/sample

* Add commons-lang3 dependency to jersey2

* Add & update mutiny dependency for microprofile

* Regenerate samples
2024-11-14 14:08:26 +08:00
Linh Tran Tuan
ee698f1e6d
[Rust-Axum][Breaking Changes] Extracting Claims in Cookie/Header (#20097)
* [Rust-Axum][Breaking Changes] Extracting Claims in Cookie/Header

* Update

* Update
2024-11-14 14:05:30 +08:00
Nelson Vides
a95ea1f519
erlang-server: Extend provided return and make the type available (#20088) 2024-11-12 22:27:37 +08:00
Nelson Vides
20b5059aa5
Erlang server (#20087)
* erlang-server: Extend provided return

* Regenerate erlang-server handlers
2024-11-12 21:26:58 +08:00
William Cheng
85f711236c update scala samples 2024-11-11 18:54:20 +08:00
Aaron Pritzlaff
6792218775
Scala Cask oneOf support (#20051)
* added support for 'oneOf' types represented as unions

also updated libs and an 'errors' field rename to address
name clashes with likely/popular field names

* Created cask-specific petstore example which 
Includes a oneOf and allOf example
2024-11-11 18:46:27 +08:00
DielN
2a17134628
Add equals and hashCode methods to Microprofile (#20011)
* Add equals and hashCode methods to microprofile

* Add missing import

* Update samples

* Add missing dependency for reflection equals
2024-11-10 17:43:19 +08:00
Dennis Ameling
13b11d7706
kotlin-server: Fix required + nullable combination for properties (#20054)
* kotlin-server: Fix required + nullable combination

* Update FILES

* Updated generated code
2024-11-09 22:35:11 +08:00
Julian Vennen
6bd3d53eee
[PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582) (#19529)
* [PHP/Dart/Python] Correctly escape strings in single quotes (Fixes #17582)

* Move escapeTextInSingleQuotes method to DefaultCodegen, add docblock
2024-11-09 16:50:12 +08:00
Dennis Ameling
a7a86398d0
[kotlin-server] Bump Kotlin/Gradle versions and improve CI triggers/config (#20061)
* [kotlin-server] Bump Kotlin versions to latest

* Run tests on more samples

* Fix typo in workflow definitions

* Update samples

* Bump Gradle to 7.6.4

* Some further tweaks

* Bump Gradle versions

* Fix Gradle version syntax
2024-11-09 13:39:20 +08:00
William Cheng
28e02fc1a2 update aspnet samples 2024-11-07 20:33:49 +08:00
Julien Tschäppät
7deecdc569
[csharp] Add a server generator for FastEndpoints (#19690)
* Add of a first working generator for FastEndpoints framework

Generator that support the basics of a FastEndpoints project
https://fast-endpoints.com/

* Add respose code documentation support

* Add an option to enable use of problem details

* Clean enum and model

* Add an option to generate record for requests/models

* Update sample

* Add support of nullable types

* Add option to enable authentication

* Add option to generate validators

* Clean readme.md file

* Add option to enable response caching

* update readme template

* Add missing files references

* Update generated sample

* Add link to documentation

* Add generator documentation

* correctly support packageName

supportingFiles additions moved to processOpts()

* improve useAuthentication option handling

Avoid to copy an empty file

* processOpts, move call to parent at the end

* Update generated sample

* Refactor and fix super.processOpts(); call order

* Handle the case of multi-line description

* Rename field to match naming conventions

* Add useApiVersioning option

* Update generated sample

* Add generator documentation

* Fix record when model contains optional properties

* Add configuration files for each option

* Add sample project for each configuration

* Add GitHub Action workflow for sample projects

* Add FastEndpoints BindFrom attribute on path, query and form params

* Update sample generated projects

* Fix validator template

* fix alphabetical order

* Use fully qualified name for FastEndpoints

* Add options to set GUID to be used in sln file

* update sample projects

* Update generators.md

* Fix path in github workflow

* Put readme, gitignore and solution file at the root of generated project

* update sample projects

* Remove the projectGuid option

This Guid need to be constant, it is related to project type

* update sample projects
2024-11-07 20:28:29 +08:00
Linh Tran Tuan
cfef948c11
[Rust-Axum] [Breaking Changes] Prevent Operation response with internal Error (#20047)
* [Rust-Axum] Fix: prevent Operation returns Internal Server Error

* Update
2024-11-07 18:39:51 +08:00
Aaron Pritzlaff
b51b18e3ca
Scala cask api effects (#19936)
* Scala-cask improvements:

 * fixe for grouped methods which have routes containing dashes.

Previously our OperationGroup work-around would potentially
Create methods like ‘foo-bar’, which isn’t a valid function name

 * Fix to not import some.package.Array[Byte] when binary format is specified

 * Fix for grouped operations which contain duplicate query parameters

 * Fix for binary response fields. This can come up with the following example

        "responses" : {
          "200" : {
            "content" : {
              "application/json" : {
                "schema" : {
                  "format" : "binary",
                  "type" : "string"
                }
              }
            },
            "description" : "data"
          },

 * Fix for enum model classes
Extracted complex logic for ‘asData’ and ‘asModel’ transformations for properties

 * Introduced a generic effect F[_] for services

This was done to support composable services
(Service A calls Service B) by using monadic
Effect types (ones which can flatMap)

 * Fixed unique union types for responses, asModel and asData fixes for non-model types

* scala-cask: regenerated samples

* Fix for reserved-word properties in the API

* Fix for null imports and reserved-word enum types

* Fixes for api methods with backticked params

* Fix for duplicate (by name) grouped params

* small syntax fix

* logging response type

* Regenerated samples

* String.format fix
2024-11-06 16:14:31 +08:00
Linh Tran Tuan
cded99c3fc
[Rust-Axum] Support Authentication (Cookie, API Key In Header) (#20017)
* [Rust-Axum] Support Cookie Authentication & API Key In Header

* Fix

* Fix

* Fix Header Params & Responses
2024-11-06 16:13:00 +08:00
Tanmay Mohapatra
06547b7b82
[julia] improve enum support (#20016)
* [julia] improve enum support

Improved enum support. Added an override for `postProcessModels` method in julia code generator to do enum post processing. Added an override for `toEnumValue` method in julia code generator to generate enum values correctly based on julia types. Updated templates to use `#enumVars` for generating enum values.

* generated samples
2024-11-06 16:04:15 +08:00
Chirag Jain
67af02ccc8
python-pydantic-v1: Keep trailing commas for enum validation tuples (#19985)
* python-pydantic-v1: Keep trailing commas for tuples when enum has just single member

* Update samples

* Add test for single member enums

* Refactor test name
2024-11-02 15:26:19 +08:00
Linh Tran Tuan
52610e026e
[BugFix] [Rust*] model-name-prefix causing invalid generated code (#19922)
* [BugFix] [Rust*] model-name-prefix causing invalid generated code]

* Update

* Fix

* Update

* Update
2024-10-21 18:10:16 +08:00
Linh Tran Tuan
cfdb00a14c
[Improvement] [Rust-Axum] Fix clippy warning (#19920) 2024-10-20 14:09:25 +08:00
William Cheng
21a8e4e623
[python-fastapi] Update fastapi, starlette to newer versions (#19880)
* update fastapi, starlette dep to newer verions

* update samples
2024-10-16 14:17:38 +08:00
Peter Storch
b1dd6b262e
fix Api Interface for kotlin-spring with spring-cloud library (#19877) 2024-10-15 18:41:48 +01:00
Leonid Stashevsky
7f899dff97
[Kotlin Server] Update Ktor to latest version; move config to kts (#19727)
* [Kotlin Server] Update Ktor to latest version; move config to kts

* Bump gradle version for kotlin server samples

* Replace deprecated gradle API

* Bump gradle to 7.6.4
2024-10-11 11:44:53 +08:00
Marvin Sommer
a84946bdb3
[Java Spring] Fix copyOf inheritance using empty object instead of passed value (#19426)
* Fix copyOf inheritance using empty object instead of passed value

* Generate new samples
2024-10-10 16:52:38 +08:00
William Cheng
b357744048
Fix python-fastapi signature of parameters for method (#19830)
* Fix python-fastapi signature of parameters for method

* update

---------

Co-authored-by: Diorcet Yann <diorcet.yann@gmail.com>
2024-10-10 15:36:22 +08:00
jops-wtakase
43fd18935c
[python-flask] Fix #19487 SyntaxWarning (#19489)
* Bugfix: #19487: Fix SyntaxWarning

* Fix a bug which generates SyntaxWarning

* Chore: #19487: Generate sample
2024-10-10 14:48:02 +08:00
Aaron Pritzlaff
31be9b9207
scala-cask fix: Added support for 'additionalProperties:true' (#19767)
* Added support for 'additionalProperties:true' to scala-cask generator

additionalProperties means the request can contain arbitrary
additional properties, and so this change adds an 'additionalProperties'
field to request objects which is a json type.

* fixed warning in example scala-cli project

* updated samples

* addressed codegen comments
2024-10-09 11:15:25 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
Nelson Vides
77e8346fd7
[Erlang Server] Add more type information and fix minor bugs (#19792)
* Add type information about classes and operation-ids

* Remove unused logger included header

* Bugfix badmatch in delete_resource handler

* Bugfix: respect original indentation of operation_ids

* Bugfix json schema correct refs

* Add a bit more documentation

* Regenerate erlang-server handlers
2024-10-07 15:28:14 +08:00
William Cheng
577483c2e2 update rust axum samples 2024-10-03 16:10:27 +08:00
Nelson Vides
83f6d592a2
Erlang server validation bugfixes and capability extensions (#19750)
* Bugfix: exclusiveMinimum/Maximum must be booleans

* Add support for validating and decoding base64 byte strings

* Add support for validating RFC3339 datetime

* Simplify validate function for performance

* Regenerate erlang-server handlers
2024-10-03 14:24:00 +08:00
William Cheng
5f39bd230e
update undertown to 2.3.17.FINAL (#19734) 2024-10-01 16:54:49 +08:00
Nelson Vides
7e1ebe6404
Erlang server (#19722)
* Add documentation to server and handlers

* Respond to at least one path-server

* Let url servers override base path

* Handle reading bigger bodies in cowboy

* Improve json error handling

* Regenerate erlang-server handlers

* Rework API module for performance and completion

* Regenerate erlang-server handlers
2024-10-01 14:51:12 +08:00
winkler-pixop
2551689ec6
Fix #19683 : Generated code fails to build with x86_64-linux-gnu-g++-13 (#19684)
* Add C++ header for cpp-pistache-server to fix breaking CMake build of generated code.

* Sort includes of system C++ headers for cpp-pistache-server.

* Add samples generated from fixing bug #19683.
2024-10-01 14:00:38 +08:00
Stefan Koppier
df22ca6dcc
[BUG] Kotlin wiremock query params are incorrect (#19720) 2024-09-30 11:44:08 +01:00
Joscha Feth
0b32c5025e
chore: update github workflow checkput plugin references (#19676) 2024-09-29 21:23:02 +08:00
Louis Sullivan
e370b8130a
Updated pyyaml and httptools in requirements template (#19666)
Co-authored-by: Louis Sullivan <Louis.Sullivan1@ibm.com>
2024-09-24 23:35:15 +08:00
William Cheng
b42027da5d update aspnetcore samples 2024-09-23 02:00:54 +08:00