Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ced5763
Add source folder variable to fastapi fix 12118
rk0n Apr 12, 2022
ce2dbdc
Add generated sample files for python-fastapi fix 12118
rk0n Apr 12, 2022
83af2ca
[python-experimental] fixes json + charset use case (#12114)
spacether Apr 12, 2022
216ee06
Add example allOf with single ref (#10948)
kuhnroyal Apr 12, 2022
8ae7b89
Add a sample of an enum model array in query params (#12107)
kuhnroyal Apr 12, 2022
82f35b3
[typescript-fetch] drop support typescript under v4.0 (#12102)
mkusaka Apr 12, 2022
f31aab2
update samples
wing328 Apr 12, 2022
8b0e3f0
[dart] Remove old dio generator (to be replaced with dart-dio-next) (…
kuhnroyal Apr 12, 2022
5adc7ee
fix: respect configured generator URL in swagger config (#12064)
fgreinacher Apr 12, 2022
4dacc0e
[typescript*] drop support typescript below 4.0 (#12123)
mkusaka Apr 12, 2022
6d089d1
Upgrade haskell-servant to latest LTS (#12092)
7omb Apr 12, 2022
82d41d5
[C++][Qt] update petstore to 3.0 spec (#12124)
wing328 Apr 13, 2022
69440ec
update readme with onesignal (#12126)
wing328 Apr 13, 2022
d071fc5
[typescript-fetch] Removed functions that are unused when withoutRunt…
mkusaka Apr 13, 2022
d833794
[kotlin][client] fix encoding of individual parts of a multipart requ…
koscejev Apr 13, 2022
e70f243
[python-experimental] Allow response media types to omit schema (#12135)
spacether Apr 13, 2022
aaf9f83
improve errorObjectType to avoid regression (#12131)
wing328 Apr 14, 2022
fecdf0d
[php-slim4] Add monolog package as default logger (#12137)
ybelenko Apr 16, 2022
244f109
Bump async from 2.6.3 to 2.6.4 in /website (#12148)
dependabot[bot] Apr 16, 2022
6e7f2a8
do not put the invalid value of the enum to a JSON structure (#12133)
ityuhui Apr 16, 2022
e243117
[Java] Ignore return value for Java file assert classes (#12145)
borsch Apr 16, 2022
a5132bd
Add @mkusaka to TS technical committee (#12150)
wing328 Apr 16, 2022
77fc9ff
Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
typetetris Apr 16, 2022
c95ee48
[Dart][client] Adjust toJson method to use '_json' instead of 'json' …
0xNF Apr 16, 2022
ac8906a
[dart] Support/Fix sourceFolder parameter and docs (#12113)
kuhnroyal Apr 16, 2022
ce326da
[Ruby] Add support for faraday 2.x (#12112)
ykitamura-mdsol Apr 16, 2022
aaa1c26
[Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (…
cachescrubber Apr 16, 2022
ef17120
[REQ][Ruby] Ruby Allow Follow Redirect (#12047)
moorec22 Apr 16, 2022
feefaf7
set follow_location default to true
wing328 Apr 16, 2022
64ccf06
Adds UUID to python-experimental (#12153)
spacether Apr 16, 2022
899c8e1
update url to travis ci
wing328 Apr 17, 2022
59dc481
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
spacether Apr 17, 2022
1f48d76
[python-experimental] fixes bug where some singleton representations …
spacether Apr 17, 2022
cfd51ef
[swift5] Abstract away URLSession (#11651) (#12110)
leszek-s Apr 19, 2022
2e2e557
[Java][OkHTTP] fix empty request body handling (#12172)
borsch Apr 19, 2022
4b2685c
Better inline model resolver to handle inline schema in array item (#…
wing328 Apr 20, 2022
28128e6
[Inline model resolver] minor enhancements/refactoring (#12175)
wing328 Apr 20, 2022
33085f1
[python-experimental] Fixes enum is comparison (#12176)
spacether Apr 20, 2022
dd9f7b5
[php] make ObjectSerializer::toString actually return a string (#12158)
fengelniederhammer Apr 20, 2022
859bfa0
update php samples
wing328 Apr 20, 2022
0cb59fc
Allow selection of MP REST API version for MicroProfile REST client g…
aserkes Apr 20, 2022
7bacfc0
[Java][microprofile] update API test template to work with v3.0 (#12177)
wing328 Apr 20, 2022
52b8368
Return type for Azure funcs (#12115)
Abrhm7786 Apr 20, 2022
0a4b3c9
update doc
wing328 Apr 20, 2022
eb36fc7
Improvements to csharp-netcore-function generator (#12183)
wing328 Apr 20, 2022
178ca12
[java-micronaut] Support Optional for non-required properties (#12144)
auke- Apr 21, 2022
537b1a6
update java samples
wing328 Apr 21, 2022
f41e756
[typescript-fetch] allow initOverrides with async function (#12098)
mkusaka Apr 23, 2022
cce98b8
[Wsdl] Adding cli-option for generating different versions of WSDL-fi…
adessoDpd Apr 24, 2022
dcf8431
[python-flask] Fix return type too strict (#12190)
OJFord Apr 24, 2022
04ece4d
update samples, docs
wing328 Apr 24, 2022
67dc856
Fixing bug in Kotlin Client with BigDecimal default value (#12213)
sjoblomj Apr 24, 2022
ec2778f
Fix duplication of "Api" when structPrefix is set (#12128)
impl Apr 24, 2022
980975a
add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
wing328 Apr 24, 2022
54b6eb5
remove spring-mvc samples (#12222)
wing328 Apr 24, 2022
bfc9f2e
[Micronaut] Add option to describe response wrappers (#12186)
andriy-dmytruk Apr 24, 2022
10d0dbf
Emit default values for aspnetcore 3 value types (#11280)
hauntingEcho Apr 24, 2022
a1e51b3
update samples
wing328 Apr 24, 2022
38b0d9d
Merge branch 'master' into add-source-folder-variable-to-fastapi-fix-…
rk0n Apr 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Java][microprofile] update API test template to work with v3.0 (#12177)
* update microprofile api test to work with 3.0

* minor format change

* update samples
  • Loading branch information
wing328 authored and rk0n committed Apr 24, 2022
commit 7bacfc008b4964685e0c1f28faeefdd4d0786608
1 change: 1 addition & 0 deletions .github/workflows/samples-java-client-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- samples/client/petstore/java/rest-assured
- samples/client/petstore/java/rest-assured-jackson
- samples/client/petstore/java/microprofile-rest-client
- samples/client/petstore/java/microprofile-rest-client-3.0
- samples/client/petstore/java/apache-httpclient
- samples/client/petstore/java/feign
- samples/client/petstore/java/jersey1
Expand Down
9 changes: 9 additions & 0 deletions bin/configs/java-microprofile-rest-client-3.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
generatorName: java
outputDir: samples/client/petstore/java/microprofile-rest-client-3.0
library: microprofile
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: microprofile-rest-client-3
configKey: petstore
microprofileRestClientVersion: "3.0"
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void processOpts() {
additionalProperties.put(MICROPROFILE_REST_CLIENT_VERSION, MICROPROFILE_REST_CLIENT_DEFAULT_VERSION);
} else {
String mpRestClientVersion = (String) additionalProperties.get(MICROPROFILE_REST_CLIENT_VERSION);
if (!mpRestClientVersions.containsKey(mpRestClientVersion)){
if (!mpRestClientVersions.containsKey(mpRestClientVersion)) {
throw new IllegalArgumentException(
String.format(Locale.ROOT,
"Version %s of MicroProfile Rest Client is not supported or incorrect. Supported versions are %s",
Expand Down Expand Up @@ -601,6 +601,10 @@ public void processOpts() {
supportingFiles.add(new SupportingFile("kumuluzee.config.yaml.mustache", "src/main/resources", "config.yaml"));
supportingFiles.add(new SupportingFile("kumuluzee.beans.xml.mustache", "src/main/resources/META-INF", "beans.xml"));
}

if ("3.0".equals(mpRestClientVersion)) {
additionalProperties.put("microprofile3", true);
}
} else if (APACHE.equals(getLibrary())) {
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ public class {{classname}}Test {

@Before
public void setup() throws MalformedURLException {
{{#microprofile3}}
// TODO initialize the client
{{/microprofile3}}
{{^microprofile3}}
client = RestClientBuilder.newBuilder()
.baseUrl(new URL(baseUrl))
.register(ApiException.class)
.build({{classname}}.class);
{{/microprofile3}}
}

{{#operations}}{{#operation}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# 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:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
README.md
docs/Category.md
docs/ModelApiResponse.md
docs/Order.md
docs/Pet.md
docs/PetApi.md
docs/StoreApi.md
docs/Tag.md
docs/User.md
docs/UserApi.md
pom.xml
src/main/java/org/openapitools/client/api/ApiException.java
src/main/java/org/openapitools/client/api/ApiExceptionMapper.java
src/main/java/org/openapitools/client/api/PetApi.java
src/main/java/org/openapitools/client/api/StoreApi.java
src/main/java/org/openapitools/client/api/UserApi.java
src/main/java/org/openapitools/client/model/Category.java
src/main/java/org/openapitools/client/model/ModelApiResponse.java
src/main/java/org/openapitools/client/model/Order.java
src/main/java/org/openapitools/client/model/Pet.java
src/main/java/org/openapitools/client/model/Tag.java
src/main/java/org/openapitools/client/model/User.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# OpenAPI Petstore - MicroProfile Rest Client

This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
[MicroProfile Rest Client](https://github.com/eclipse/microprofile-rest-client) is a type-safe way of calling
REST services. The generated client contains an interface which acts as the client, you can inject it into dependent classes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# Category

A category for a pet

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**name** | **String** | | [optional] |



Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


# ModelApiResponse

Describes the result of uploading an image resource

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**code** | **Integer** | | [optional] |
|**type** | **String** | | [optional] |
|**message** | **String** | | [optional] |



Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@


# Order

An order for a pets from the pet store

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**petId** | **Long** | | [optional] |
|**quantity** | **Integer** | | [optional] |
|**shipDate** | **Date** | | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] |
|**complete** | **Boolean** | | [optional] |



## Enum: StatusEnum

| Name | Value |
|---- | -----|
| PLACED | "placed" |
| APPROVED | "approved" |
| DELIVERED | "delivered" |



Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@


# Pet

A pet for sale in the pet store

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**id** | **Long** | | [optional] |
|**category** | [**Category**](Category.md) | | [optional] |
|**name** | **String** | | |
|**photoUrls** | **List<String>** | | |
|**tags** | [**List<Tag>**](Tag.md) | | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] |



## Enum: StatusEnum

| Name | Value |
|---- | -----|
| AVAILABLE | "available" |
| PENDING | "pending" |
| SOLD | "sold" |



Loading