12694 Commits

Author SHA1 Message Date
jerbob92
3d5b140c3d
Fix URLSessionImplementations file upload (#6043)
* Fix URLSessionImplementations file upload

* Generated petstore
2020-04-28 00:28:21 +08:00
William Cheng
588023686a
Add HTTP signature authentication support to Java (jersey2-experimental) (#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
2020-04-28 00:09:30 +08:00
William Cheng
3b0bd368a6
Update Java (feign) client dependency (#6068)
* update feign dependency

* update feign samples
2020-04-28 00:09:14 +08:00
Justin Niessner
db5941379f
[Python] Fix Python UTF-8 Encoding Issue (#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
2020-04-26 13:33:42 -07:00
Richard Whitehouse
f36a319316
[Rust Server] Rust 2018 Edition (#5942)
* [Rust Server] Rust 2018 Edition
* [Rust Server] Fix unused warning
* Update samples
2020-04-26 12:00:46 +01:00
William Cheng
cef5470ea8
Add Http signature authentication test to fake petstore spec (#6054)
* add endpoint to test http signature

* update plugin version
2020-04-25 23:39:41 +08:00
Kieran Simpson
0e276bef19
Add input flag for Gradle openApiGenerate task (#5966) 2020-04-24 22:20:40 -04:00
Sebastien Rosset
e8f486ba7f
[Python experimental] Readme improvements (#6031)
* Python experimental readme improvements

* Python experimental readme improvements

* execute scripts in bin directory
2020-04-25 00:10:32 +08:00
Sebastien Rosset
58908e6494
[codegen] change x-oneOf-name to x-one-of-name. Consistency with naming conventions and x-all-of-name (#5820)
* change x-oneOf-name to x-one-of-name.

* Add code comments

* Add code comments
2020-04-25 00:07:15 +08:00
Justin Black
8e8471c1fd
[CORE] Fixes composed schema discriminator map (#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>
2020-04-25 00:01:02 +08:00
William Cheng
45bbe4922b
Add test for allOf without object type (#6042)
* add test for allof without object type

* add comments to test cases
2020-04-24 23:41:42 +08:00
sunn
234053fed9
Export response code to worker (#6021) 2020-04-24 14:46:25 +02:00
sunn
649daed9a9
Export valid and set status of properties (#6020) 2020-04-24 14:44:48 +02:00
Sebastien Rosset
6ad5e5fb45
[Python experimental] Add __setattr__ function to ensure signing_info.host is the same as configuration.host when the user assigns signing info (#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
2020-04-23 23:16:31 -07:00
Sebastien Rosset
1e01c380e8
[python-experimental] Minor doc update, code comments and exception handling (#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
2020-04-23 22:59:31 -07:00
William Cheng
93dd4a5138
Add jersey2-experimental to Java client generator (#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
2020-04-24 12:47:25 +08:00
Andy.Yang.cn
d911fd73bd
[Rust Server] Bugfix #5948 (Generated client code "Disabled because there's no example") (#5949)
* [Rust Server] Fix RustServerCodegen type: object example "Disabled because there's no example" issue.

* [Rust Server] Add test case yaml with "Disabled because there's no example" issue.

* [Rust Server] Fix example-client-main param.example character escaping issue with raw string.

* [Rust Server] Add test case yaml new generated code after fix.
2020-04-24 11:04:36 +08:00
iliaskarim
bafed337b5
Fix OpenAPI link in broken Swift4/5 README templates (#6035)
* Fix Swift README templates

* Update Swift4/5 samples
2020-04-24 10:36:52 +08:00
Francisco A. Lozano
c981535579
Change access updateParamsForAuth to protected (#5940)
So that it can be overridden with a custom behaviour.
2020-04-23 23:25:35 +08:00
chenqping
140f823465
fix generate java-inflector crash issue on windows (#6011) 2020-04-23 13:31:42 +08:00
Andy.Yang.cn
38dfed4104
[Rust Server] Fix #5947 multi tag generate multi method issue. (#5928)
* [Rust Server] Fix issue with multiple tags on an operation generating duplicate methods.

* [Rust Server] Add test case yaml with multiple tags on a single operation.
2020-04-22 18:00:21 +01:00
Harald Fernengel
00ffcea6ef
[typescript-fetch] Fix map API return type (#5995)
Fix APIs that return a map.
2020-04-22 14:25:26 +02:00
Harald Fernengel
b431d65099
Make "Index" a reserved word (#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.
2020-04-22 14:24:42 +02:00
Harald Fernengel
63b4429775
Escape clashing model names (#6004)
Closes #6002
2020-04-22 14:23:24 +02:00
William Cheng
47a9294a99 Merge remote-tracking branch 'origin/master' into 5.0.x-sync-master4 2020-04-22 12:15:45 +08:00
Jochen Schalanda
40be1c311e
[Java][Client] Fix Gradle and SBT builds for REST Assured generator (#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
2020-04-22 11:19:17 +08:00
William Cheng
12512cf720
update cxf version (#6003) 2020-04-22 11:02:23 +08:00
William Cheng
751b40677b update jaxrs cxf cdi version to 3.1.2 2020-04-22 04:04:25 +08:00
Harald Fernengel
381ebeb33e
[typescript-fetch] support http HEAD as well (#5994)
closes #2935
2020-04-21 14:12:11 +02:00
William Cheng
f8911700c7
fix inline schema without object type (#5992) 2020-04-21 15:39:40 +08:00
Yuriy Belenko
da149e1204
[mysql] Add OAuth2 framework tables (#5807)
* Add OAuth table schemas

* Refresh samples

* Expand password column length

* Add copyright notice of OAuth2 schema author

* Refresh samples
2020-04-21 14:25:56 +08:00
Romain Pouclet
fe2f092e7f
Expose deprecated flag in model template (#5964) 2020-04-21 14:23:33 +08:00
William Cheng
15d0982a5e remove deprecated c# files 2020-04-21 13:43:19 +08:00
Richard Whitehouse
3ad1646f2e [Rust Server] Fix up merge conflicts 2020-04-20 18:43:19 +01:00
William Cheng
c35f32bf39
Add tests for parents, allParents (#5984)
* add test for regression with a single ref in allof

* fix tests

* add a test for allParents
2020-04-20 18:39:06 +08:00
Justin Black
1766279916
Fixes issue 5876 (#5977)
* Fixes getParentName function

* Updates getChildrenMap to not throw a NPE

* Updates test

* Runs ensure up to date
2020-04-20 16:00:24 +08:00
Erik Timmers
c1cea7f2fb Resolve Elm merge conflicts 2020-04-20 09:20:46 +02:00
Malcolm Murray
4818644278
[BUG] [TYPESCRIPT-AXIOS] Fixing issue where dist folder is not published when publishing typescript-axios generated client with npm publish (#5850)
* Removing build path from gitignore as this causes npm publishing issues

* updating petstore example

* Adding npmignore to typescript-axios generator

* Updating petstore example
2020-04-20 11:27:53 +08:00
William Cheng
c6353a7589
add bearer auth support to C# 2.0 client (#5978) 2020-04-19 23:15:57 +08:00
Kieran Simpson
a15da6feb6
[gradle] Print value of outputDir correctly in gradle plugin (#5936) 2020-04-19 10:32:29 -04:00
zaleski.d
f6572fd2f4
[bug][html2] Fix visibility of body/response schemas (#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>
2020-04-19 09:38:28 -04:00
William Cheng
a8620b8663
add bearer support to csharp client (#5975) 2020-04-19 10:46:34 +08:00
Falko Modler
84099eefdc
[maven] mark Mojo threadSafe=true + fix concurrency issue in Co… (#5898) 2020-04-18 20:40:09 -04:00
Alexey Makhrov
c5472be422
Ensure model.allParents always includes model.parent. (#5738)
`allParents` is used by generators with multiple inheritance, e.g typescript and perl
2020-04-18 15:22:20 +08:00
Fabian Freund
e47739dda5
return a null instead of application/json when no content types are set (#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>
2020-04-18 09:57:18 +08:00
Bouillie
cb50ad590f
[scala-akka-http-server] Fix a generation problem on operations with empty responses (#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>
2020-04-18 01:22:24 +08:00
Ghufz
0adc20f114
[powershell-experimental] ValidatePattern with double-quote (") throws-exception (#5956)
* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
2020-04-17 23:08:48 +08:00
William Cheng
8fa76843d0 resolve merge conflicts in the core generator files 2020-04-17 16:10:10 +08:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
Bodo Graumann
896867b5e7
Use model as body param for generateAliasAsModel (#4569)
* generateAliasAsModel: Use model name as body param

* Update samples
2020-04-17 13:36:27 +08:00