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

[BUG][typescript-fetch] Name clash between models and operations #6002

Closed
haraldF opened this issue Apr 21, 2020 · 0 comments · Fixed by #6004
Closed

[BUG][typescript-fetch] Name clash between models and operations #6002

haraldF opened this issue Apr 21, 2020 · 0 comments · Fixed by #6004

Comments

@haraldF
Copy link
Contributor

haraldF commented Apr 21, 2020

Description

Imagine a Model:

    SubscribeRequest:
      type: object
      properties:
        # ...

and an operation called subscribe:

paths:
  /subscriptions:
    post:
      summary: Subscribe
      operationId: subscribe
      parameters:
          # ...
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscribeRequest'
        required: true

The generated TypeScript operation would import SubscribeRequest but also generate a class called SubscribeRequest in the same file, which leads to a compilation error:

import {
    SubscribeRequest,
    SubscribeRequestFromJSON,
    SubscribeRequestToJSON,
} from '../models';

// ...

// ERROR - SubscribeRequest name already taken
export interface SubscribeRequest {
    // ...
}
openapi-generator version

Today's master (but also happens with latest released version)

Suggest a fix

One "naive" fix would be to simply escape all models that end with Request:

    @Override
    public String toModelName(final String name) {
        String modelName = super.toModelName(name);
        if (modelName.endsWith("Request") && !modelName.startsWith("Model")) {
            modelName = "Model" + modelName;
        }
        return modelName;
    }
haraldF added a commit to haraldF/openapi-generator that referenced this issue Apr 22, 2020
macjohnny pushed a commit that referenced this issue Apr 22, 2020
MiguelFranken added a commit to MiguelFranken/openapi-generator that referenced this issue May 1, 2020
* [PS][Experimental] Better common verb handling (OpenAPITools#5783)

* better common verb handling

* better debugging

* add option to customize common verb

* [cli][docker] Better expose version/sha information of builds (OpenAPITools#5736)

* [cli] Some CLI improvements…

* Introduce --version
* Introduce --help
* Add --sha to version command for short SHA display
* Output Version and SHA details
* In new --version output, display repo and doc site

Additional cleanup to suppress warnings and code quality.

* [docker] Adds labels for metadata

This adds image labels to store metadata on the online and cli docker
images, using standard labels:

* org.opencontainers.image.created
* org.opencontainers.image.revision
* org.opencontainers.image.title
* org.opencontainers.image.version

These can be inspected via 'docker inspect IMAGE_NAME' and may be useful
in tooling/automation or bug reports submitted by users.

For more details on these labels, see:
https://github.com/opencontainers/image-spec/blob/master/annotations.md

* Include version --full for equiv to --version

* [cli] Add --global-property for -D replacement (OpenAPITools#5687)

-D option has been deprecated as it was previously used to:

* Pass "system properties"
* Pass additional properties

This was confusing because we already have --additional-properties and
because Java System Properties are passed as -D before program
arguments.

Confusion around the -D option had existed for some time, but when we
introduced the thread-safe GlobalSettings to avoid overwriting Java
System Properties, we created a hard break from Java System Properties
in the generator. This also disconnected the previous "system
properties" from accepting additional properties.

Once these newly deprecated methods are removed, we will have a clear
separation of concerns between:

* Java System Properties
* Global generator properties (used as workflow context)
* Additional properties (used as generator options)

This commit marks multiple places for cleanup in 5.0. These will be
breaking changes, and lower effort to break in 5.0 with deprecation
warnings now rather than adding sibling properties throughout the code
and potentially introducing logic errors.

* [dart-dio] Fixes --model-name-suffix having no effect (OpenAPITools#5669)

Fixes OpenAPITools#5409

* [go-experimental][go][client] Remove unreachable code in go client API methods (OpenAPITools#5611)

* [go-experimental][go][client] Remove unreachable code in go client API methods

* Properly regenerate all samples

* please add openVALIDATION Project to readme (OpenAPITools#5534)

* added openVALIDATION Project to readme

* Update README.md

Co-Authored-By: Akihito Nakano <sora.akatsuki@gmail.com>

Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>

* [Csharp-client] Complex form parameters are not serialized as application/json (OpenAPITools#5787)

* [csharp-client] Complex form parameters are now correctly serialized as json.
Reference: http://spec.openapis.org/oas/v3.0.3#special-considerations-for-multipart-content

* Updated bin/windows csharp sample generation scripts to point to the correct directories

* Updated csharp samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* fix scala-akka java8 serializers (OpenAPITools#5742)

* fix scala-akka java8 serializers

* regenerate samples for akka-http

* [typescript-axios][client] Unnecessary imports occurs when using withSeparateModelsAndApi (OpenAPITools#5797)

* add ts-ignore

* add petstore sample

* use write verbose in auth, better api doc (OpenAPITools#5804)

* [PS][Experimental] add withHttpInfo support, fix "null" return (OpenAPITools#5811)

* add with http support

* use full name in tests

* using full name in test

* skip type check

* [PS][Experimental] Add tests for array of object in response (OpenAPITools#5814)

* debugging array response

* fix find pet tests

* better tests to ignore order

* [codegen] Use once(LOGGER) to reduce amount of identical warning messages (OpenAPITools#5808)

* Warn once instead of many times when the log statement does not have contextual information

* Warn once instead of many times when the log statement does not have contextual information

* make name cache configurabl (OpenAPITools#5775)

* [codegen] Cachesize config seconds (OpenAPITools#5816)

* make name cache configurable

* Address review comments

* [Python-experimental] Documentation enhancement for oneOf schema and minor err msg improvement (OpenAPITools#5791)

* Add documentation to generated code

* Improve error message

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Improve documentation

* Run sample scripts

* Address review comments

* Address review comments

* Fix problem in python error message

* rename hostsetting, validate base url (OpenAPITools#5821)

* fix array return (OpenAPITools#5822)

* Scala akka-http server (OpenAPITools#5758)

* Scala akka-http server base implementation

* [scala-akka-http-server] petStore samples

* Improved the formatting of generated files

* Updated scala-akka-http server samples

* [scala-akka-http-server] the groupId, artifactId and artifactVersion default value are used as intended.

* Fixed the default operation not being correctly generated on parameterless operations

* Added build.sbt.mustache supporting file

* Updated scala-akka-http server samples

* ScalaAkkaHttpServer: Fixed a String.format call to use Locale.ROOT for locale

* [scala-akka-http-server] Fixed defaultValue being escaped during generation

* Added scala-akka-http.md

* Replaced all "⇒" character with "=>" to retain compatibility with scala 2.13

* [scala-akka-http] Added a config option akkaHttpVersion
It's set in the generated build.sbt.

* Updated scala-akka-http server samples

* [scala-akka-http] More accurate akkaHttpVersion parsing

* Updated scala-akka-http.md

* [scala-akka-http] Changed the akka-http version check to fix the generation of StringDirectives

* Updated scala-akka-http samples

* updated scala-akka-http.md

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* Minor improvements to scala akka server (OpenAPITools#5823)

* minor improvements to scala akka server

* add samples

* update doc

* Update swagger parser to 2.0.19 (OpenAPITools#5413)

* update swagger parser to 2.0.18

* fix online server exception

* Revert "fix online server exception"

This reverts commit fe3cb52.

* update parser to 2.0.19

* [jaxrs-cxf-cdi] fix allOf equals and hashCode (OpenAPITools#5756)

When generating model that use allOf, the equals and hashCode methods
must take the parent class into account.

* [BUG] [KOTLIN] Fix default value generation for Kotlin Strings (OpenAPITools#5776)

* fix default value generation for kotlin

* add updated pet templates

* Revert "add updated pet templates"

This reverts commit 7e8168a

* regen pet store projects code

* tests  for models for C-libcurl generator (OpenAPITools#5699)

* First try to generate unit tests for the models of the C-libcurl client. Models into models are not supported yet.

* Added unit tests for the modules of the C-libcurl client to the git repository.

* Support for objects having other objects as properties, for the C-libcurl client generator

* Proper formatting of generated code

* use allVars to cover all properties (OpenAPITools#5835)

* support enum in parameters (OpenAPITools#5838)

* [C++] [Qt5] [Client] fixed cpp-client-qt5 HttpRequestWorker contentCompression variables initialization (OpenAPITools#5834)

When contentCompression is not enabled, the variables isRequestCompressionEnabled and isResponseCompressionEnabled in HttpRequestWorker are not being initialized.
Without initialization the compress function could be called and the request content could be an empty QByteArray instead of original request body.

* minor fix to http basic auth (OpenAPITools#5839)

* Scala akka http server - normalization of some vendor extensions (OpenAPITools#5829)

* [scala-akka-http-server] Normalized vendor extension "paths" to "x-paths"

* [scala-akka-http-server] Normalized vendor extension "hasDefaultValue", "isDefault", "specificMarshallers", "fileParams", "nonFileParams"

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* Add Bouill to the Scala technical committee (OpenAPITools#5843)

* C client generator improvements to support petstore. Solves OpenAPITools#5836 (OpenAPITools#5837)

* C client generator improvement to support:
openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Improvements to the C client generator:
- moved base64* from apiClient.c to binary.h/binary.c
- changed CR/LF to LF in binary.h/binary.c

* C client generator: better support for base64encode / base64decode

* Add openapi.yaml file to Java clients (OpenAPITools#5765)

* Add openapi.yaml file to Java client

* Move supporting template file to Java root

* Update petstore clients

* [codegen] Fix 'super.HashCode' for oneOf and allOf Implementations (retry) (OpenAPITools#5830)

* Added hasVars after completion of all model post-processing (OpenAPITools#5587)

* Post ensure-up-to-date

* Update to check the size of vars and not assume non-null

* update mysql samples

* Add default case to handle response code (OpenAPITools#5825)

* add default case to handle response code

* fix default response code

* add test for isDefault

* fix user id in scala tc

* Fix for Issue OpenAPITools#4840 [BUG][JAVA][spring-mvc] Generated Code for Map of Maps Return Type does not compile (OpenAPITools#5240)

* add parent for allOf only (OpenAPITools#5851)

* Add pythonSrcRoot option to python servers (aiohttp/flask/blueplanet) to support src/ layout projects [and reenable/fix all python server tests] (OpenAPITools#5423)

* python server: Add pythonSrcRoot option

This will allow the python project to be in a subdirectory (as specified
in pythonSrcRoot). That could mean following the src layout with sources
under src/ or lib/. Multi-language projects might use a sub directory
like python/, or whatever makes sense for the project.

By default, the pythonSrcRoot is "", meaning the existing behavior is
the default.

* python server: update template files to support pythonSrcRoot

* python server: update docs to add pythonSrcRoot option

* python server: add pythonSrcRoot sample script

* python server: build sample srclayout project

* [Python] copy test files preserving history

* [Python] Make a conflict to preserve file copy history

* [Python] customize pom.xml for src layout tests

* [Python] add python-aiohttp-srclayout tests

* [Python] Fix server tests by updating requirements

Reverts the PR that disabled python2 server tests:
OpenAPITools#4949

Reverts commits that disabled python3 server tests:
9adfedb
17ee990

Issue about the python 3 tests:
OpenAPITools#5235

I couldn't find an issue about the python2 tests being disabled.
I'm guessing build errors like the following were the trigger:
https://travis-ci.org/github/OpenAPITools/openapi-generator/builds/634238181

Let's see what breaks!

* [Python] Copy setup.py to python-aiohttp

* [Python] Save history while copying setup.py to python-aiohttp

* [Python] Add aiohttp server setup.py

* [Python] Fix python server tests with src layout

* [Python] bump Flask-Testing version

* [Python] Pin pyyaml for py2.7 flask server

* [Python] simplify flask server requirements

* consolidate server tests

* [Python] rebuild python server samples

* [Python] Fix python server requirements for older pythons

Documented minimum python version for our aiohttp server is 3.5.
Documented minimum python version for our flask server is 3.4.
Connexion 2.3 is the last version to support python 3.4 and 3.5, so fix
the version pinning to correctly select <=2.3 for these EOL python
versions. Newer pythons should get the latest if possible as there many
relevant bug fixes.

Werkzeug also needs to be pinned for these old versions in the aiohttp
server just like for the flask server.

3.4 and 3.5 are EOL. We really should increase the minimum supported
version, but that is for another PR to do.

* stop error globally (OpenAPITools#5858)

* [PS][Experimental] Add validations to model (OpenAPITools#5842)

* add validations to model

* better error message

* improve validation

* Updates to allow the setting of the dateTime format string (OpenAPITools#5763)

* [PS] Select Content-Type in the response (OpenAPITools#5872)

* better return type handling

* update tempalte

* better documentation

* fix greater than

* various enhancement to ps exp generator (OpenAPITools#5875)

* [C#] dependency upgrade (OpenAPITools#5870)

* Updating packages version (OpenAPITools#5313)

* Add support to RestSharp version 106.10.1

Restsharp 106.10.1 needs the Content Lenght as a parameter to AddFile method

* Updating RestSharp Version

Updating RestSharp Version

* Update netcore_project.mustache

* Update netcore_testproject.mustache

* Update Project.mustache

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Execute task async obsolete

Use ExecuteAsync instead

* update csharp samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* [csharp] Library upgrade fix (OpenAPITools#5848)

* On .net45 framework, Restsharp version is updated to 106.10.1 Otherwise, it stays on version 105.1.0

* Added additionalProperties for library versions and target frameworks

* Removed unused properties

* Added an additional property to test for a specific version of RestSharp

* Updated csharp samples

* Fixed nuspec.mustache to use library specific additional properties

* Updated csharp samples

* Updating CI/samples.ci csharp petstore test project file.

* Updated csharp.md

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* [csharp-client] Restored tests on csharp samples (OpenAPITools#5879)

* Restored tests on csharp samples

* Restored a reference to the file used to test file uploads

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* update samples

Co-authored-by: Igor Quirino <iquirino91@gmail.com>
Co-authored-by: Bouillie <34162532+Bouillie@users.noreply.github.com>
Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* [Csharp-client] Complex form parameters are not serialized as application/json (OpenAPITools#5849)

* [csharp-client] Complex form parameters are now correctly serialized as json.

* Updated csharp samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* docs: removes Nico from technical committee (OpenAPITools#5883)

* [PS] better handle special variables (OpenAPITools#5885)

* add variable

* fix reserved words

* update ps doc

* [PS] add file post-processing to the PowerShell generator (OpenAPITools#5864)

* add post process to ps generator

* add import

* fix merge issue

* consolidate header selection functions (OpenAPITools#5889)

* [Java-client] Add maven-compiler-plugin in pom.xml and enable linter checks by default (OpenAPITools#5866)

* Add maven-compiler-plugin plugin in Java pom.xml and enable linter checks by default

* Add maven-compiler-plugin plugin in Java pom.xml and enable linter checks by default

* Update enum.mustache (OpenAPITools#5793)

OpenAPITools#5792

* Update modelGeneric.mustache (OpenAPITools#5378)

* Update modelGeneric.mustache

If maxlength is specified for a property type enum it there should be .ToString() appended before length check

* ran the csharp petstore bar and updated the file

Co-authored-by: Shweta Shukla <shshukl@microsoft.com>

* Fix Scala sttp generator packages (OpenAPITools#5890)

* Fix Scala sttp generator packages

* Change package to parameterised

* [Dart] Fix "basic" auth method and  Add Bearer token support (OpenAPITools#5743)

* added auth check and lint

* fixed basic auth condition

* Added bearer auth

* updated samples

* update dart petstore samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* Add date time format annotation on pojo for model query parameters (OpenAPITools#5437)

* Add date time format annotation on pojo for model query parameters

* Regenetare samples

* update spring samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* [mysql] Add basic SQL queries (OpenAPITools#5757)

* Add basic SQL queries template

* Add namedParametersEnabled option

* Move model related SQLs into Model folder

* Update README template

* Refresh samples

* [enhancement] [jaxrs-spec] Add builders to models (OpenAPITools#4930)

* Update formatting in jaxrs-spec POJOs

* Add generateBuilders option

* Update formatting in jaxrs-spec POJOs

* Disable the builders generation by default

* Ensure samples are up-to-date

* Revert newline change

* Run ensure-up-to-date

* update doc

* fix merge conflicts

Co-authored-by: Artem Shubovych <ashubovych@atlassian.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>

* Update generated build files for REST Assured (OpenAPITools#5873)

* REST Assured 4.3.0
* Jackson 2.10.3
* Gson 2.8.6, GSON-Fire 1.8.4
* Okio 1.17.5
* Joda-Time 2.10.5
* ThreeTenBP 1.4.3
* Added missing dependencies for Bean Validation
* Added missing dependencies for `@Generated` annotation
* Refresh REST Assured sample project

* [Java][Feign] Bug fix in @param annotation (OpenAPITools#5250)

* FIX-5249 fix @param annotation for Feign-client code generation

Use paramName instead of baseName in order to make mapping in @headers
section fit the param-value.

* update samples

* FIX-5249 fix @param annotation for Feign-client code generation

Use paramName instead of baseName in order to make mapping in @headers
section fit the param-value.

Co-authored-by: Christoph Preißner <christoph.preissner@blu-pa.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>

* [Java] Increase java compiler stack size to handle large files (OpenAPITools#5901)

* increase java compiler stack size to handle large files

* increase java compiler stack size to handle large files

* Added emineo to list of companies on website (OpenAPITools#5905)

* add emineo to the list

* [swift5] fix warning (OpenAPITools#5900)

* update bitwise config (OpenAPITools#5904)

* [Java] Discriminator lookup should not be case insensitive by default (OpenAPITools#5894)

* Add 'discriminatorCaseSensitive' property

* Discriminator value lookup should not be case insensitive

* fix typo

* run scripts

* execute ./bin/utils/export_docs_generators.sh

* fix discriminator mapping, add code comments

* minor fix to users.yml

* Add a link to optim blog post (OpenAPITools#5922)

* [Java] Fix inclusive max validation (OpenAPITools#5908)

Co-authored-by: erikmolin <erik@zaver.se>

* add bearer auth support to csharp netcore (OpenAPITools#5921)

* [Python][aiohttp] create venv as rule (OpenAPITools#5913)

* create venv as rule

* create venv as rule II

* Fix for Result Model Name collision (OpenAPITools#5923)

* Fix for Result Model Name collision

* Run Scripts

Co-authored-by: Sebastian Ohm <sebastian.ohm@ubimax.com>

* [Dart] Remove content type from header when content type is not specified (OpenAPITools#5752)

* accept empty content type

* fixed test

* updated samples

* additional comment out

* update dependency for java client (OpenAPITools#5926)

* Update axios dependency to the new minor version 0.19.0 (OpenAPITools#5867)

* Update axios dependency to 0.19.0

Axios (version 0.18.0) used by typescript-axios generator is more than two years old (released in Feb 2018). Axios 0.19.2 released earlier this year contains a lot of fixes and functionality, I recommend updating to 0.19.2.

* Ran ./bin/typescript-axios-petstore-all.sh to update package.json in ./samples

Co-authored-by: Chandra Yalangi <chandra.yalangi@appklenz.com>

* fixed README/doc of bearer auth support for csharp-netcore (OpenAPITools#5931)

* fix duplicated semi-colon in c# model (OpenAPITools#5934)

* [Python-experimental] Use DER encoding for ECDSA signatures, add parameter to configure hash algorithm (OpenAPITools#5924)

* Use DER encoding for ECDSA signatures

* Use DER encoding for ECDSA signatures

* Use DER encoding for ECDSA signatures

* Use DER encoding for ECDSA signatures

* fix python unit tests for http message signature

* Fix error message

* format python code

* format python code

* [Python-experimental] Fix TypeError: unhashable type: 'list' (OpenAPITools#5810)

* handle scenario when value is a list, fix TypeError: unhashable type: 'list'

* Add __hash__ function

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set

* use list instead of set

* [python/asyncio] fix passing proxy parameters to aiohttp (OpenAPITools#5943)

* [C][Client]Fix data lost when libcurl write-data callback function is called multiple times (OpenAPITools#5828)

* [C][Client]Fix the defect of data lost when libcurl write-data callback function (configured by CURLOPT_WRITEFUNCTION) is called multiple times.

* [C][Client]Fix data lost when libcurl write-data callback function is called multiple times (Reset count)

* [typescript-axios][client] Allow apiKey type Promise. (OpenAPITools#5953)

* change apiKey type

* recreate sample

* Add YITU Technology to the user list (OpenAPITools#5967)

* add yitu to the user list

* use yitu technology

* Use model as body param for generateAliasAsModel (OpenAPITools#4569)

* generateAliasAsModel: Use model name as body param

* Update samples

* [powershell-experimental] ValidatePattern with double-quote (") throws-exception (OpenAPITools#5956)

* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>

* [scala-akka-http-server] Fix a generation problem on operations with empty responses (OpenAPITools#5868)

* [scala-akka-http-server] When expecting an empty response, a response with an empty text/plain content is not produced anymore

* Updated scala-akka-http-server samples

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* return a null instead of application/json when no content types are set (OpenAPITools#5941)

* return a null instead of application/json when no content types are set

* update petstore sample

Co-authored-by: William Cheng <wing328hk@gmail.com>

* Ensure `model.allParents` always includes `model.parent`. (OpenAPITools#5738)

`allParents` is used by generators with multiple inheritance, e.g typescript and perl

* [maven] mark Mojo threadSafe=true + fix concurrency issue in Co… (OpenAPITools#5898)

* add bearer support to csharp client (OpenAPITools#5975)

* add test to reuse object from the server (OpenAPITools#5976)

* [bug][html2] Fix visibility of body/response schemas (OpenAPITools#5643)

* 1441 fix visibility of body/response schemas

* Handle schemas with array items

* Point to template directory in bin script

* Regenerate sample

Co-authored-by: Jim Schubert <james.schubert@gmail.com>

* [gradle] Print value of outputDir correctly in gradle plugin (OpenAPITools#5936)

* add bearer auth support to C# 2.0 client (OpenAPITools#5978)

* [BUG] [TYPESCRIPT-AXIOS] Fixing issue where dist folder is not published when publishing typescript-axios generated client with npm publish (OpenAPITools#5850)

* Removing build path from gitignore as this causes npm publishing issues

* updating petstore example

* Adding npmignore to typescript-axios generator

* Updating petstore example

* Fixes issue 5876 (OpenAPITools#5977)

* Fixes getParentName function

* Updates getChildrenMap to not throw a NPE

* Updates test

* Runs ensure up to date

* Add tests for parents, allParents (OpenAPITools#5984)

* add test for regression with a single ref in allof

* fix tests

* add a test for allParents

* Expose deprecated flag in model template (OpenAPITools#5964)

* [mysql] Add OAuth2 framework tables (OpenAPITools#5807)

* Add OAuth table schemas

* Refresh samples

* Expand password column length

* Add copyright notice of OAuth2 schema author

* Refresh samples

* fix inline schema without object type (OpenAPITools#5992)

* Added Allianz Technolgy (OpenAPITools#5999)

Allianz Technology, the service provider subsidiary of Allianz SE is using OpenAPI generator.

* add allianz logo

* [typescript-fetch] support http HEAD as well (OpenAPITools#5994)

closes OpenAPITools#2935

* update cxf version (OpenAPITools#6003)

* [Java][Client] Fix Gradle and SBT builds for REST Assured generator (OpenAPITools#5990)

* Fix Gradle and SBT builds for Java REST Assured generator

* Add missing jackson-databind-nullable dependency to SBT build

* Update rest-assured sample

* Add sample for Java client with REST Assured and Jackson

* Add new REST Assured sample as Maven sub-module

* Escape clashing model names (OpenAPITools#6004)

Closes OpenAPITools#6002

* Make "Index" a reserved word (OpenAPITools#6000)

Some APIs have a model called "Index" which would create a file
"Index.ts" which would override "index.ts" on case-insensitive file
systems (e.g. macOS, some Windows versions). Make "Index" a reserved
word to prevent this clash.

* [typescript-fetch] Fix map API return type (OpenAPITools#5995)

Fix APIs that return a map.

* fix generate java-inflector crash issue on windows (OpenAPITools#6011)

* Change access updateParamsForAuth to protected (OpenAPITools#5940)

So that it can be overridden with a custom behaviour.

* update resttemplate sample

* Fix OpenAPI link in broken Swift4/5 README templates (OpenAPITools#6035)

* Fix Swift README templates

* Update Swift4/5 samples

* Add a link to the blog post in Nordic APIs (OpenAPITools#6038)

* Add jersey2-experimental to Java client generator (OpenAPITools#6024)

* add jersey2 experimental

* add new files

* add abstract one of class

* read the stream multiple times

* rename to getActualInstance

* update petstore

* fix jackon check

* test new java petstore in ci

* fix broken tests

* remove todo

* better exception message, primitive type handling

* add anyof support

* update samples

* add new files

* update all java client samples

* update doc, fix pom

* better null check for allOf

* add primitive types support in oneof, anyof

* better validation

* update python exp samples

* remove primitive type support in allOf

* [python-experimental] Minor doc update, code comments and exception handling (OpenAPITools#5945)

* add support for any type, i.e. when 'type' attribute is not specified in OAS schema

* fix typos, add code comments

* Handle case when 'type' attribute is not present in the OAS schema

* fix python formatting rule

* fix python formatting rule

* remove 'object' as a type

* [Python experimental] Add __setattr__ function to ensure signing_info.host is the same as configuration.host when the user assigns signing info (OpenAPITools#6033)

* Add __setattr__ function to ensure signing_info.host is the same as configuration.host when the user assigns signing info

* Add __setattr__ function to ensure signing_info.host is the same as configuration.host when the user assigns signing info

* Export valid and set status of properties (OpenAPITools#6020)

* Export response code to worker (OpenAPITools#6021)

* Add test for allOf without object type (OpenAPITools#6042)

* add test for allof without object type

* add comments to test cases

* [CORE] Fixes composed schema discriminator map (OpenAPITools#4906)

* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap

* Requires that discriminators be required properties

* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples

* Adds oneOf and anyOf invalidDiscriminator tests

* Updates incorrect addOneOfInterfaceModel invocation

* Runs ensure-up-to-date

* Adds updates from Sebastien Rosset

* Removes newlines

* Uses df.isString

* Fixes tests be correctly setting df.isString

* Updates discriminatorExplicitMappingVerbose description per PR feedback

* Adds description of how mappedModels is populated

* Adds the suggestion exception raising when a MappedModel mappingName is null

* Actually resolves merge conflicts

* Switches two methods to package private because they are needed for testing

* Allow nulls in MappedModel.getMappingName

* Updates CLI flag name to legacyDiscriminatorBehavior, default=true

Co-authored-by: William Cheng <wing328hk@gmail.com>

* [codegen] change x-oneOf-name to x-one-of-name. Consistency with naming conventions and x-all-of-name (OpenAPITools#5820)

* change x-oneOf-name to x-one-of-name.

* Add code comments

* Add code comments

* [Python experimental] Readme improvements (OpenAPITools#6031)

* Python experimental readme improvements

* Python experimental readme improvements

* execute scripts in bin directory

* Add input flag for Gradle openApiGenerate task (OpenAPITools#5966)

* Add Http signature authentication test to fake petstore spec (OpenAPITools#6054)

* add endpoint to test http signature

* update plugin version

* [Python] Fix Python UTF-8 Encoding Issue (OpenAPITools#5679)

* Try decoding but don't bail on error

* Switch binary and ByteArray to bytes

* Read content type and parse appropriately

* Remove response parsing

* Remove response parsing and just return the data

* Update petshop examples w/ new generator code

* Fix copy/paste error with naming

* Update petstore examples

* Move response decoding to inside _preload_content block

* Update the clients again

* Use a raw string for the regex pattern

* Regenerate petstore clients

* Add bytes to python primitives as it's supported in 2.7 and 3

* Add bytes to the exports from model_utils

* Import bytes from model_utils

* Add conditional typing for regex pattern to match variable type

* Regenerate petstore clients

* Use read() instead of text() for asyncio

* Regenerate petstore clients

* Remove unused six import

* Regenerate petstore clients

* Add newline to kick Circle to re-run

* Remove whitespace from tox.ini

* Update more examples after ensure_updated

* Add sample updates that didn't run with the --batch flag

* Remove extra bracket in regex to remove warning

* Stop printing debug messages

* Add bytes examples to python doc generators

* Update generated FakeApi docs

* Regenerate api_client.py

* Remove print statements from generated clients

* Update bytes example in FakeApi.md. Again. I swear.

* Add yet another seemingly missing doc update

* Catch the error, decode the body, and re-throw

* Remove the updates now that the change is non-breaking

* Regenerate client

* Add bytes deserialization test

* Update exception parsing

* Add exception parsing for python-experimental

* Regenerate client with minor changes

* Revert test changes

* Regenerate model_utils.py

* Update confusing test name

* Remove bytes from mapping and examples

* Add back in the old binary/ByteArray to str mapping

* Update docs and api_client template

* Add experimental api_client changes

* Regenerate samples again

* Add Tornado handling to early return

* Try fixing Tornado python returns

* More documentation changes

* Re-generate the client code

* Remove bytes from test_format_test

* Remove more leftover bytes usages

* Switch bytes validation back to string

* Fix format_test template and regenerate

* Remove unused bytes var

* Remove bytes import from models and regenerate

* Remove bytes import from test_deserialization

* Reduce nested ifs

* Remove byte logic for now

* Regenerate client after latest changes

* Remove another bytes usage

* Regenerate after removing dangling byte string usage

* Reduce the scope of the try/catch in api_client

* Regenerate after try/catch cleanup

* Swap catch for except

* Regenerate Python client after api_client change

* Fix lint error on the generated api_client

* Add binary format test back in w/ string

* Add decoding to python-experimental and regenerate

* Import re into python-experimental api_client

* Ensure file upload json response is utf-8 encoded bytes

* Update Java (feign) client dependency (OpenAPITools#6068)

* update feign dependency

* update feign samples

* Add HTTP signature authentication support to Java (jersey2-experimental) (OpenAPITools#6058)

* add fmt-maven-plugin to jersey2 exp

* update samples

* add http signature auth template

* minor fix

* fix http beaer auth, update sample

* fix http signature auth

* fix http signature auth

* header support

* add query string to path

* undo changes in default codegen

* ignore fake test

* add serialize to string method

* add serialzie to string method

* add get mapper

* auto format java source code

* remove plugin

* update pom.xml

* change back AbstractOpenApiSchema to T

* skip mvn code formatter in bin script

* undo changes to spec

* update samples

* add back HttpSignatureAuth.java

* add MoonVision user (OpenAPITools#6076)

* add MoonVision user

* add moonvision to readme list

* Fix URLSessionImplementations file upload (OpenAPITools#6043)

* Fix URLSessionImplementations file upload

* Generated petstore

* [typescript-fetch] Support deepObject query params (OpenAPITools#6075)

deepObject query parameters need to be specially marshalled.
Unfortunately, they're quite tricky to distinguish in mustache because
there's no boolean property for deepObject, so add a vendorExtension
property to ease the mustache template.

* [typescript-fetch] Make FormData optional (OpenAPITools#6077)

Check "typeof FormData" first. This allows the code to also work in
nodejs with isomorphic-fetch.

* [feat] Allow configuration of yaml minimize quotes (OpenAPITools#5933)

There are cases where minimizing quotes results in invalid YAML. For
example, an input YAML with string "1234_1234" will be converted to YAML
value 1234_1234 which is an int in YAML 1.1
(https://yaml.org/type/int.html)

THe only option in these cases is to either:

* Revert the option completely to always quote values
* Provide a user-customization to disable quotes minimization

This applies the latter with the assumption that this is an edge case
and users who are unaffected will default to the "prettier" version.

An alternative would be to write a custom serializer for strings, and if
they are in the format of of any of the valid formats defined in YAML:

[-+]?0b[0-1_]+ # (base 2)
|[-+]?0[0-7_]+ # (base 8)
|[-+]?(0|[1-9][0-9_]*) # (base 10)
|[-+]?0x[0-9a-fA-F_]+ # (base 16)
|[-+]?[1-9][0-9_]*(:[0-5]?[0-9])+ # (base 60)

Then wrap the result in quotes. That approach was not taken because of
the potential for significant performance impact on very large specs,
which our users are often tasked with transforming.

* [typescript-fetch] Allow multiline documentation (OpenAPITools#6088)

Add a lambda that formats the documentation correctly even if it
contains newlines. The generated docs with typedoc looks a lot better
and also renders Markdown correctly.

Also remove the "no description" fallback for APIs because we don't have
it anywhere else, other generators don't generate a default fallback and
I'd rather have no documentation than a "no description" string.

* fixed typescript-axios pattern data integrity by removing escapeText() call (OpenAPITools#5974)

* Fixes md docs (OpenAPITools#6079)

* Fixes md docs

* Separates out boolean enum options into legacyDiscriminatorBehaviorOpts

* Updates docs, adds true and false descriptions

* [TypeScript-Angular] Add AuthService example to  README.md (OpenAPITools#6087)

* Add AuthService example to TypeScript Angular README.md

* Update generated Angular libs

* Readonly properties for Swift 5 (OpenAPITools#6048)

* Generate readonly properties in Swift5 with additional readonlyProperties parameter

* add sample

* [validation] Warn on duplicate tags (OpenAPITools#6061)

The specification requires that tags are unique. This isn't caught by
swagger-parser, so we will issue a warning if duplicate tag names are
found.

* update swift5 samples (OpenAPITools#6102)

* [C#] Fixed valuetype parameters and discriminator deserialization (OpenAPITools#5680)

* Fixed valuetype parameters and discriminator deserialization

- Made non-required valuetypes nullable, and flagged required valuetypes as "x-csharp-value-type"
- Made sure to camelCase discriminator property names in Subtype converter

* Ran pet store sample script

* Ensure that readWriteVars and readOnlyVars are also marked as isEnum and isPrimitiveType where appropriate

* Updated petstore sample with enum fix

* Fields that are required should emit default values (otherwise the consuming API might throw a fit

* Added missing sample updated

* Re-ran petstore example script to grab all changes

* Rebased and re-ran example update script

* update csharp samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* better docstring for jersey2 client (OpenAPITools#6104)

* [scala-akka-http] fixed getOffsetDateTimeHeader and removed broken test due invalid v2 spec (OpenAPITools#6109)

* [php-symfony] Fix problem with clients, that put charset in content type header. (OpenAPITools#6078)

* Fix problem with clients, that put charset in content type header.

With this fix header "Content-Type: application/json; charset=utf-8" working same as "Content-Type: application/json" for parse input data

* Fix code style, add $consumes length check.

* Add isContentTypeAllowed static method and tests

* Fix old tests

Right now serializer doesn't support anything beside json and xml.
Call tests with application/json instead of form data.

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>

* [cli][build] Relax the git id plugin (OpenAPITools#6094)

* [cli][build] Relax the git id plugin

* Guard against null on missing build properties

* Better "Any Type" support (OpenAPITools#6091)

* better anytype support

* add tests for any type

* fix test with any_value

* fix tests

* fix case additionalProperties: {}

* test with CI

* remove check in map schema

* Revert "remove check in map schema"

This reverts commit e016c41.

* fix tests, comment out map schema fix

* fix tests

* fix tests with correct codegen model

* fix tests

* fix tests for map of any type

* fix array of any type

* fix array of any type

* update samples, remove log

* add typemapping to go, python

* [php-symfony] Fix return type in model setters. (OpenAPITools#6085)

* Fix return type in model setters.
Previously return type was same, as method arguments. It`s wrong, and cause errors like
"Return value of Foo::setSuccess() must be of the type bool, object returned"
We cant use self and current {{classname}} as return type, because that can break class inheritance. So, better remove type hint on setters, until PHP-devs dont make realization for return static

* Add return self type hint for setters

* Revert "Add return self type hint for setters"

This reverts commit 07dd971

* [Go][experimental] provide code samples in the API doc (OpenAPITools#6115)

* provide code samples in api doc

* update petstore samples

* [dart-dio][client] Handle x-www-form-urlencoded form data (OpenAPITools#5597)

* update oas3 petstore go exp sample

* Test scala akka petstore client in CI (OpenAPITools#6118)

* test scala akka in ci

* fix compilation error

* fix scala akka test

* add tests

* Propagate deprecated property through $ref's (OpenAPITools#6093)

* Propagate deprecated property through $ref's

As $ref is supposed to completely replace the definition of a property,
make sure we also include the 'deprecated' property when generating the
type of a $ref property.

This makes a property $ref'ing a deprecated schema also become deprecated.

* Clarify why we're messing around with $ref

* fixed codegen model

Co-authored-by: William Cheng <wing328hk@gmail.com>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Josh Burton <josh@arklabs.nz>
Co-authored-by: Slavek Kabrda <slavek.kabrda@datadoghq.com>
Co-authored-by: Ilja leyberman <7ilya@gmx.de>
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Bouillie <34162532+Bouillie@users.noreply.github.com>
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
Co-authored-by: Aleksandr Nekrasov <snake_nas@mail.ru>
Co-authored-by: tanmen <yt.prog@gmail.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
Co-authored-by: Antoine Reilles <areilles@gmail.com>
Co-authored-by: Alex Buchkovsky <alex.buchkovsky@gmail.com>
Co-authored-by: Michele Albano <michele.albano@gmail.com>
Co-authored-by: Natan Laverde <natanlaverde@gmail.com>
Co-authored-by: Nicholas Muesch <nicholas.muesch@datadoghq.com>
Co-authored-by: jburgess <11861789+jburgess@users.noreply.github.com>
Co-authored-by: emileonhardt <40421857+emileonhardt@users.noreply.github.com>
Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
Co-authored-by: sunn <33183834+etherealjoy@users.noreply.github.com>
Co-authored-by: Igor Quirino <iquirino91@gmail.com>
Co-authored-by: Nico König <npunktkoenig@gmail.com>
Co-authored-by: https://gitlab.com/selankon <selankon@selankon.xyz>
Co-authored-by: Shweta Shukla <25539662+shwetashukla@users.noreply.github.com>
Co-authored-by: Shweta Shukla <shshukl@microsoft.com>
Co-authored-by: Bartek Kowalik <bkowalik@users.noreply.github.com>
Co-authored-by: Shinya Sugmoto <34866626+gasugesu@users.noreply.github.com>
Co-authored-by: Gonzalo <gonzalo.nom.es@gmail.com>
Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
Co-authored-by: Artem Shubovych <shybovycha@gmail.com>
Co-authored-by: Artem Shubovych <ashubovych@atlassian.com>
Co-authored-by: Jochen Schalanda <jochen@schalanda.name>
Co-authored-by: Chr1st0ph <cpreissner@gmx.de>
Co-authored-by: Christoph Preißner <christoph.preissner@blu-pa.com>
Co-authored-by: Bruno Coelho <4brunu@users.noreply.github.com>
Co-authored-by: Erikmolin <erik.johan.molin@gmail.com>
Co-authored-by: erikmolin <erik@zaver.se>
Co-authored-by: Nicolas Homble <nhomble@terpmail.umd.edu>
Co-authored-by: Sebastian <63457660+sebohdev@users.noreply.github.com>
Co-authored-by: Sebastian Ohm <sebastian.ohm@ubimax.com>
Co-authored-by: chandra-gh <63366477+chandra-gh@users.noreply.github.com>
Co-authored-by: Chandra Yalangi <chandra.yalangi@appklenz.com>
Co-authored-by: Fabian Freund <mail@fabi.online>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: Hui Yu <ityuhui@gmail.com>
Co-authored-by: Bodo Graumann <mail@bodograumann.de>
Co-authored-by: Ghufz <18732053+Ghufz@users.noreply.github.com>
Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
Co-authored-by: Alexey Makhrov <amakhrov@gmail.com>
Co-authored-by: Falko Modler <famod@users.noreply.github.com>
Co-authored-by: zaleski.d <zaleskid1@gmail.com>
Co-authored-by: Kieran Simpson <kierans777@gmail.com>
Co-authored-by: Malcolm Murray <malcolm.murray@scoffable.com>
Co-authored-by: Justin Black <spacether@users.noreply.github.com>
Co-authored-by: Romain Pouclet <romain.pouclet@gmail.com>
Co-authored-by: Christian Katzorke <c.katzorke@web.de>
Co-authored-by: Harald Fernengel <harald.fernengel@here.com>
Co-authored-by: chenqping <5651810+chenqping@users.noreply.github.com>
Co-authored-by: Francisco A. Lozano <flozano@gmail.com>
Co-authored-by: iliaskarim <ilias.karim@icloud.com>
Co-authored-by: Justin Niessner <CrshOverride@gmail.com>
Co-authored-by: Alexander Hirner <a.hirner@gmail.com>
Co-authored-by: jerbob92 <jerbob92@users.noreply.github.com>
Co-authored-by: n0idea <4489782+n0idea@users.noreply.github.com>
Co-authored-by: Dennis Ameling <dennis@dennisameling.com>
Co-authored-by: iliaskarim <ilias.karim@clover.com>
Co-authored-by: Geoff Brown <gbrown@centeredgesoftware.com>
Co-authored-by: Artem <reznikartem@gmail.com>
Co-authored-by: adg-mh <40580891+adg-mh@users.noreply.github.com>
Co-authored-by: Åsmund Grammeltvedt <asgramme@microsoft.com>
michaelpro1 pushed a commit to michaelpro1/openapi-generator that referenced this issue May 7, 2020
MikailBag pushed a commit to MikailBag/openapi-generator that referenced this issue May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant