Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update my fork #1

Merged
merged 54 commits into from
Jun 17, 2020
Merged

Update my fork #1

merged 54 commits into from
Jun 17, 2020

Conversation

tgerth
Copy link
Owner

@tgerth tgerth commented Jun 17, 2020

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/config/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

etherealjoy and others added 30 commits June 10, 2020 16:09
* [Python] Update docstring and fix a typo

* regenerate
* Enable per-request access token in Python client.

* Add missing regenerated sample files.

* Rework to the more general case of overriding the auth settings for a request.

* Add unit tests.

* Update api_client.mustache so that request_auth overrides all other auth settings when specified.
* Add multiple auth methods to ApiClient. ApiClient more configurable

* Fixed missing close tag for isMultipart in api.mustache

* Generated samples ./bin/kotlin-client-all.sh

* Generated samples./bin/openapi3/kotlin-client-petstore-all.sh

* Use of better way to add supporting files based on conditions

* Fixed missing check for retrofit generating auth files

* Generated samples

Co-authored-by: Alexander Karkossa <alexander.karkossa@dataport.de>
* [python] Support aliasing of API keys

* Support for aliasing and prefix

* Make more realistic usage

* Regenerate

* Document alias in generated code

* Support override of aliased keys

* Use diferent id and name for api keys

* ensure up-to-date

* Simple example without x-auth-id-alias

* regenerate docs

* Regenerate

* Provide separate spec for x-auth-id-alias

* Apply suggestions from code review

* regenerated
Fix invalid yaml in building docs
* fix isDefault in response

* fix response

* update samples

* fix scala akka template

* fix elm template

* remove commented code

* remove eof

* update elm samples
* rx3 support

* ran the shell script ./bin/generate-samples.sht

* added missing rx3 migration, removed tabs
* remove jacoco from pom

* test run-in-docker

* Revert "test run-in-docker"

This reverts commit d97fc23.

* Revert "remove jacoco from pom"

This reverts commit f5d0cc2.

* add -Djacoco.skip=true
…host verifier (#6633)

* Add hook to customize SSL context, trust manager and host verifier

* run sample scripts
* Stronger typing for http errors with Rust client. (#5609).

* Error structure can be parametrized (but is still hardcoded with `serde_json::Value` in generated code).

* Each API method has is own enum of functionnal errors.

* Fix the missing "Debug" derivation for API error enums.

* Generate models for error deserialization.

* Handle several 2xx success models.

* Expose new API objects, required to use the API (params, success, error structs/enums).

Co-authored-by: William Cheng <wing328hk@gmail.com>
* add powershell to ensure-uptodate

* remove API

* add back API
* deprecate rxjava1.x

* update samples
* [Python] Additional properties with array types

* fix addditionalProperties

* fix issue

* ensure-up-to-date

* Use separate spec for java
* Fix usage of javax.annotation:javax.annotation-api

* Regenerate samples

```
bin/generate-samples.sh bin/configs/java-* bin/configs/jaxrs-* bin/configs/spring-* bin/configs/kotlin-* bin/configs/other/java-* bin/configs/other/jaxrs-* bin/configs/other/kotlin-* bin/configs/other/openapi3/jaxrs-cxf-client.yaml bin/configs/other/openapi3/kotlin-*
```
* Mark generated unit tests as incomplete

PHPUnit has special "markTestIncomplete" method which is perfectly fits
our generation flow.
Ref: https://phpunit.readthedocs.io/en/7.0/incomplete-and-skipped-tests.html

* Refresh samples
* Use HttpNotImplementedException from Slim

Specialized HttpNotImplementedException from Slim makes possible to
distinguish general exceptions from case when implementation isn't
complete. This update doesn't change API call results.

* Refresh samples
* Bump required PHP version to 7.2

* Update rest dependencies to meet php 7.2

Latest phpunit 9 requires PHP 7.3, so I've set phpunit 8 as a fallback.

* Fix TestCase inheritance

* Add phpunit cache file to gitignore

* Put license @PHPDoc into separate mustache

* Bump readme PHP version to 7.2

* Bump @PHPDoc PHP version to 7.2

* Update Zend Diactoros with suggested package

* Refresh samples

* Remove broken tests

These tests will be fixed in next PR which moves Mock feature to
external repo.

* Point root Travis CI environment to PHP 7.3
* Set PHP 7.2 as minimum version

* Update PHPUnit to 8 || 9

* Set Bionic environment in Travis config

* PHPUnit 8 requires void return in static methods

* PHPUnit 8 requires void return in static methods

* Fix curl exception message test

When I run "curl http://wrong_host.zxc" output is:
curl: (6) Could not resolve host: wrong_host.zxc
Maybe this message is different across versions.

Tested curl version:
curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1

* Update assertions of deprecated assertInternalType

* Migrate to expectException method of PHPUnit 8

* Fix PHPCS Fixer errors

* Replace deprecated 'assertRegExp' assertion

* Exclude PHPUnit and php-cs-fixer cache

* Refresh samples

* Set root Travis CI environment to PHP 7.2.5

* Change to 7.3 as 7.2.27 is highest preinstalled

* Fix testWrongHost test
Katur7 and others added 24 commits June 15, 2020 09:18
Hardcoding open_api_utils there breaks this package if packageName option is used for generating the server code
* Fix a section level issue in the parameters section
* Allow to use an introduction section instead of abstract
* Allow to use table titles rather than wrapping with sections
* Allow to use HTTP method and path as operation title
* Allow to skip examples sections
* [Java] Add add constructor to BYO OkHttpClient

* client example

* this client changed too
… jquery (#6341)

* Added http module draft

* Added generic enum

* Modified http lib, added config & middleware definition to ts-fetch

* Added model generation with imports

* Added auth module

* Added servers

* Added sample for typescript client

* WIP: Models & API

* Updated auth

* WIP: api modeling

* Implemented RequestFactory and Processor completely

* Implemented fetch client

* Ignore dist folder in typescript client sample

* Added middleware to fetch

* Restructured TypeScript generator

* Reverted: http library.send returns string again

* Removed TODOs

* Added pom.xml files to TypeScript PetStore client samples

* Removed tabs from TypeScriptClientCodegen

* Added ts client codegen to root pom.xml and travis

* Added server variable configuration to ts-refactor

* [TS-Refactor] Added tests for Object Serializer

* Added simple test for PetApi

* Fixed ObjectSerializer test

* Added handling for different http status codes and test for deletePet

* Removed tabs in TypeScriptClientCodegen

* Removed tabs in DefaultCodegen

* Additional tests for pet store api

* Fixed file uploads

* Made api call configuration separately settable

* Use string union for enums

* Remove tab

* Restructured module layout

* Use observables internally

* Added promise based middleware

* Made discriminator and attributeTypeMap readonly

* Configure discriminator correctly

* Set discriminator value automatically

* Fixed date-time and date handling

* Added comments & license info

* Added comments

* Ignore openapi-generator-cli/bin

* Removed accidentally created generated code

* Fixed compilation issues in TypeScriptClientCodegen

* Added typescript to docs/generators

* Updated docs

* Added gitignore and git_push

* Added jquery library

* Added pom.xmls, fixed packagejsons and hopefully webppack

* Removed tabs in TypeScriptClientCodegen

* Fixed a couple issues with pom.xml

* Ensured up to date

* Fixed missing fetch definition in TS default tests

* Updated typescript docs

* Refactor typescript merge master (#4319)

Merge master into ts-refactor

* Typescript refactor: stub rxjs (#4424)

* Remove unused supportsES6 field from codegen

* Add a new switch for RXJS

* Remove redundant npm dependency on rxjs4 types

* Fix return type of PromiseMiddleware methods

* Install webpack dependency to run jquery tests

* Update form-data to 2.5 which includes typings

* Add missing dependency on node typings

* Fix test artifact name typo

* Stub rxjs when it is not explicitly enabled

* Typescript refactor: Platform select for browser and node (#4500)

* Use string form of filename parameter

This works for the form-data library and is also compatible with the
browser FormData object.

* Add new option to select platform node or browser

When no platform is selected, a default is chosen by the framework
option and likewise the file data type option is implied by the
platform.

* Remove redundant import of node dns module

* Only use form-data library for node platform

* Generate npm package from npmName option

* Use method convertPropertyToBooleanAndWriteBack

* Generate typescript samples with ensure-up-to-date

* Removed tab from DefaultCodegen

* Readded missing change

* Mark typescript client codegen as experimental

* Removed whitespace

* [TS-Refactor] Top-level exports for fetch & jquery (#6138)

* Added top-level exports
* Updated generator README
* Updated typescript generator docs

* Allow browsers File type for files (#5521)

* Allow passing file parameters as File objects
* Add test for jquery upload
* Use HttpFile object for node platform
* Regenerate samples

This is by far the most common use case. A `File` object already
contains the name attribute. This commit allows that information to be
used directly.
When sending a `Blob`, in most browsers the `File` constructor can be
used to assign a file name. In all other browsers the alternative is
```typescript
Object.assign(data, { name: "foobar.txt" });
```
That is why we explicitely pass the name as third parameter to
`FormData.append`. This `Object.assign` method also works for `Buffer`
objects in node.

If one really does not want to touch the data object in the browser it
is possible to define another reference to the data with
```typescript
new Blob([data], { type: data.type })
```
or in node via
```typescript
Buffer.from(data)
```

* [TS-Refactor] Added options for npm version, repository, name and updated readme (#6139)

* Added options for npm version, repository, name and updated readme

* Removed `this`  where not required

* Updated typescript docs

* Typescript refactor fixes (#6027)

Fixes a handful of issues identified in #802 (comment)

List of changes

* Clean: Remove redundant cliOption definition

* Remove redundant directory structure in templates

If we need to have different index.ts files for the different
frameworks, we can mostly do that in the one mustache file. In the cases
where that is not possible, we can still add a new override file later.

* Use File.separator consistently

* Only export selected api type

* Simplify promise polyfill import

The behaviour should be the same, according to the es6-promise docs.
Previously tsc would report the error:
> error TS2307: Cannot find module 'es6-promise'.

* Import HttpFile in all models

* Export server configurations

* Use undefined as default body value

The empty string is not interpreted as "no body" by the browser fetch
api and thus leads to an exception during get requests

* Improve codestyle: prefer guards to nesting

* Remove verbose debug output

This should not be commited, because every developer has very different
requirements what debug information he needs to see.

* Fix: Use cleaned model names for imports

* Fix: do not call toString on undefined

* Fix typo in doc comment

* Introduce RequestBody type and remove method check

* Support media types other than json (#6177)

List of changes:

* Add */* as fallback to accept header

* Use more sophisticated media type selection

* Handle object stringify in ObjectSerializer

* Parse response with ObejctSerializer

* Fix: Correctly extract response headers in browser

* Create HttpFile objects from responses

* Handle binary responses

* Clean up dependencies and replace isomorphic-fetch

Instead of isomorphic-fetch, which is unmaintained, we directly use
node-fetch and whatwg-fetch polyfills.

* Updated versions in ts-default/jquery and ts docs

* Replaced isSuccessCode with is2xx

* [TypeScript-Refactor] Use OAIv3 spec and fix bugs in JQuery Blob download (#6416)

* Change to OAIv3 spec for TS-Refactor

* Moved samples to oaiv3 folder

* Updated package-lock

* Update pom to use OAIv3 paths for Typescript-refactor

* Renamed ts-refactor samples & tests in pom.xmls

* Fixed compile issues in ts-refactor jquery http test

* Fixed bugs in blob handling of jquery

* [Typescript] Support http bearer authentication with token provider (#6425)

* Add http bearer security

* Update typescript to 3.9

* Fix: Use Authorization header for basic and bearer

* Allow asynchronous tokenProvider in bearer auth

* Add TS-Rewrite-Jquery tests node_modules to travis caching

* Remove NoAuthentication

* Added file to generate TS samples on Windows

* Exclude btoa in browser

* Regen samples

* Remove outdated ToDo comments

* Document and optimize `getReturnType` in TSClientCodegen

* Added option to generate objects for operation function arguments

* Upgrade typescript docs

* Updated generators

* Updated samples

* Updated docs

* Readded pom.xml

* [Typescript] Support InversifyJS (#6489)

* Add config option to enable InversifyJS

* Add pascal case lambda for mustache

* Generate a class for each auth method

* Add service identifiers and service binder helper

* Split Configuration into interface and factory

This way we don't need to import the factory everywhere to do
typechecking.

* Define minimal interface for ServerConfiguration

* Add annotations for inversify when enabled

* Always expose list of server configurations

* Add samples and defalt tests for useInversify

* Simplify sample generation script

* Fix: Add object_params arg description to help

* Fix: Properly enable inversify with bool property

* Build tests in pom instead of prepublish

Otherwise running `npm install`, when the build failed was impossible.

* Update dependencies for inversify tests

* Test basic api service resolution

* Remove Promise and Observable prefix from exports

* Fix, RxJS: Import Observable in object params api

* Add ioc service identifier for object param api

* Add hint about unimpeded development

* Simplify api service binder syntax

* Remove default tests for inversify

* Add wrapper for easy promise based http libraries

This wrapper allows defining and injecting http libraries that do not
need to know anything about observables, especially when useRxJS is not
enabled. I will employ this in the tests for InversifyJS.

Not sure if we should also use this wrapper internally.

* Add named injects for remaining auth parameters

* Directly inject promise services without RxJS

* Add tests for api service binder

* Add convenience method to bind all api services

* Fix: Rename inversify test artifact

* Run bin/utils/copy-to-website.sh

* Restore changes to CONTRIBUTING.md from PR #6489

Co-authored-by: Bodo Graumann <mail@bodograumann.de>
Co-authored-by: Esteban Gehring <esteban.gehring@bithost.ch>
… and Linux (#6658)

* Update CMakeLists.txt for seamless building on Windows and Linux

* Update CMakeLists.txt

Missing the line ending

* Indent if statements and use target specific directives

* Change Client CMakeLists.txt to non Debug
* update bitrise config

* update bitrise.yml

* add back --no-snapshot-updates
#6663)

* Use actual value in error message

* Generate samples
* [python] Add missing attribute_map definition

* regenerated
* [Rust Server] Pass context to client middleware

When creating a client with middleware, pass the context.

This allows users to pass contextual data about the requests through to the
client middleware.

* Update samples
* [Core] Set whether a header is required

* [Rust Server] Support optional headers

* [Rust Server] Add test for required header

* Update samples
* [Rust Server] Support arrays within additional properties

* [Rust Server] Add test for additional properties with lists

* Update samples
* [Core] Record content type for parameters

* [Rust Server] Support query parameters in JSON

* [Rust Server] Add test for JSON query parameter

* Update samples
* deco play24, play25 in retrofit

* update pom.xml

* update doc
…Body, Set List as default collection for Kotlin data class (#6456)

* Replace typeMapping kotlin.Array with kotlin.collections.List, because its doesn't work with Kotlin Data Classes(required manually implementing  hashCode&equals)
Replace typeMapping kotlin.Array<kotlin.Byte> with efficient primitive implementation kotlin.ByteArray
Replace instantiationTypes array to kotlin.collections.ArrayList, for extending Array we should provide element count to its constructor.

* Fixed path(removed slash on begin path) for Jvm Kotlin Retrofit

* Fixed handling optional bodyParams for Jvm Kotlin Retrofit

* Fix kotlin tests

* Fixed code format for detekt inspections #2

* revert formatting

* Added ability to generate optional @query params.

* Update Kotlin docs.

* Update Kotlin openapi3 client samples

* Update Kotlin client samples

* Update Kotlin openapi3 client samples after merge with master

* Revert hardcoding List instead Array

* Set List as default collectionType

* Update Kotlin samples

* Fixed Kotlin multiplatform api template. fix mapper for Array type.
Fixed Kotlin multiplatform api template Code style.

* Update Kotlin multiplatform sample

* Fix Kotlin multiplatform template code style

* Update Kotlin multiplatform sample

* Fix Kotlin multiplatform converting Array to List in Api.

* Update Kotlin multiplatform sample #3

* Fix Kotlin tests

* Fix Kotlin jackson Application.kt

* Fix Kotlin tests #2

* Fix merge conflict with master

* Generate samples after merge with master

* Generate samples after merge with master #2

* Generate samples after merge with master #3

* Generate samples after merge with master #4

* update kotlin samples

* update all samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
…rror) (#6679)

* Add jersey2-experimental to petstore build script

on-behalf-of: @nqminds <info@nquiringminds.com>

* [java] Add <source> to javadoc in pom.mustache

We add the following <source> tag to the <configuration> of
maven-javadoc-plugin for most pom.mustache files that use it.
This tells javadoc which version of java the compiler used.

This fixes the following error when running Java 11:
[ERROR] Exit code: 1 - javadoc: error - The code being documented uses
modules but the packages defined in
https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module

Additionally, we also add maven-compiler-plugin to jersey2/pom.mustache
to specify that the source code is Java 6/7/8.

on-behalf-of: @nqminds <info@nquiringminds.com>

* [java-jersey2-java6] Update failing old tests

Pull-request #4666 changed jersey generation, but didn't update the
test samples Tests now succeed.

on-behalf-of: @nqminds <info@nquiringminds.com>

* [java-retrofit2-play24] Fix integration-tests

Running mvn integration-test failed in
samples/client/petstore/java/retrofit2-play24

This merges pull requests #1735 and #5527 into
retrofit2-play24.

Also removes the jackson-databind-version field,
since it should always be the same as jackson-version,
and updates build.gradle/build.sbt

on-behalf-of: @nqminds <info@nquiringminds.com>

Co-authored-by: Alois Klink <alois@nquiringminds.com>
* Remove duplicate definition of Endpoint class

The class is copied in every API modules, we can share it alongside the
API client.

* Regenerate examples
…ing enum (#6064)

* Use jsonb imports for serializing  and deserializing pojo

* Fix: Exclude jsonbProperty class when withXml=true

Co-authored-by: Ravisankar Challa <ravisankar.challa@qantas.com.au>
@tgerth tgerth merged commit c46b027 into tgerth:master Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.