John Gallagher
2ceccfbe3c
[REQ] [RUBY] [FARADAY] Allow middleware to be configured ( #10495 )
...
* feat: allow configuring middleware in setup
* fix: stop requiring Faraday middleware unnecessarily
* chore: regenerate petstore samples
* chore: regenerate openapi3 client
* chore: ci fails so rebuild
2021-10-04 17:09:21 +08:00
William Cheng
8602fbc87c
update ruby samples
2021-10-02 13:10:13 +08:00
William Cheng
119370079a
update spec template, samples
2021-09-25 18:14:26 +08:00
romanblack1
7384a1e513
Define content type only if the body is not empty ( #9766 )
...
* define content type iff the body is not empty
* update samples
2021-09-25 15:05:38 +08:00
romanblack1
622a936358
Define content type if and only if the body is not empty ( #9910 )
...
* rubypatch
* moving change to api.must
* fix content_type to content-type
* added end to if
2021-09-25 14:53:58 +08:00
bflaton
9479d35081
Python client docstring ( #10339 )
...
* Updated template so that generated code now renders docstrings and function parameters nicely in IDE.
Endpoints are still accessible in generated code, mainly to satisfy some test cases.
* fixed manual tests
2021-09-14 09:38:48 -07:00
Mike Marchetti
9464999d9c
fix: handle deepcopy of openapi objects ( #9735 ) ( #9735 )
...
- Add __deepcopy__ and __copy__ to OpenApiModel
- pass discriminator inside deepcopy if exists
- add test cases for deepcopy of models
2021-09-09 09:16:59 -07:00
William Cheng
477e2365c7
improve git_push.sh ( #10356 )
2021-09-09 12:49:03 +08:00
Justin Black
b258bba5dd
Revert "Updated template so that generated code now renders docstrings and function parameters nicely in IDE. ( #10331 )" ( #10338 )
...
This reverts commit ae88cf14da .
2021-09-06 20:20:04 -07:00
bflaton
ae88cf14da
Updated template so that generated code now renders docstrings and function parameters nicely in IDE. ( #10331 )
...
Endpoints are still accessible in generated code, mainly to satisfy some test cases.
2021-09-06 15:01:33 -07:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos ( #10272 )
2021-08-28 22:58:24 +08:00
Vikrant Balyan
f2e994271f
[Python] fixes __setitem__ throwing an error for composed instance ( #10197 )
...
* adding a test for issues 10083
* commiting the generated files
* fix for the setattr issue
* commit generated files
Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com >
2021-08-22 10:44:19 -07:00
Vikrant Balyan
245aec14eb
[python] Fixes a breakage while deserializing the read-only attributes ( #10155 )
...
* fixes a breakage while deserializing the read-only attributes
* updating generated samples
* taking care of the PR comments
* updating samples
* protect against cases where _spec_property_naming may not be present
* updating samples
* adding tests for this issue
* other generated files
* taking care of the comments
* updating the generated samples
Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com >
2021-08-18 12:01:58 -07:00
guy-har
50acdcb4a3
Fix python generated markdown documentation for Jekyll ( #10111 )
...
* Fix python generated markdown documentation
* Generated `build the project` and upate sample scripts
2021-08-18 16:25:30 +08:00
William Cheng
0204bf4ae2
Squashed commit of the following:
...
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3e f8ff8c8760
Author: William Cheng <wing328hk@gmail.com >
Date: Tue Aug 17 18:28:12 2021 +0800
Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting
commit f8ff8c8760
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Thu Aug 5 14:12:47 2021 +1000
Reorder tags that handle missing values
commit f5d8a33709
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Thu Aug 5 14:08:59 2021 +1000
Use dot notation where possible
commit 493d14921e
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Thu Aug 5 14:10:49 2021 +1000
Remove empty tags
commit 32480dc53f
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Thu Aug 5 10:41:58 2021 +1000
Remove redundant sections
commit a8edabd722
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Wed Aug 4 22:02:22 2021 +1000
Trim extra EOF new lines
commit e89bd7458e
Author: Nathan Baulch <nathan.baulch@gmail.com >
Date: Wed Aug 4 21:59:26 2021 +1000
Trim trailing whitespace
2021-08-17 18:37:51 +08:00
William Cheng
56aafe30d9
Merge remote-tracking branch 'origin/master' into 5.3.x
2021-07-27 11:33:35 +08:00
szTheory
6229801935
[Ruby] Add new Ruby versions to the Travis CI build matrix configuration ( #9971 )
...
* Add new Ruby versions to the Travis CI build matrix configuration
* Build the project and update samples
2021-07-19 09:57:55 +08:00
William Cheng
39fbf53150
create v5.3.0
2021-07-10 00:12:23 +08:00
William Cheng
02835b35bc
Prepare v5.2.1 ( #9922 )
...
* bump verions to 5.2.1-SNAPSHOT
* update samples
* update readme
* fix gradle properties
2021-07-09 22:42:31 +08:00
William Cheng
90f7bcd909
Prepare v5.2.0 release ( #9920 )
...
* 5.2.0 release
* update samples
* update meta codegen
2021-07-09 17:06:55 +08:00
John Boyes
7084a79ede
[BUG][PYTHON] Do not set Content-Type for GET, HEAD or DELETE requests ( #9852 )
...
* [BUG][PYTHON] Do not set Content-Type for GET, HEAD or DELETE requests
The Python generator no longer sets a default `Content-Type` of
`application/json` for `GET`, `HEAD` and `DELETE` requests.
Having the `Content-Type` set for these requests was causing issues with
other tools which insist that GET, HEAD and DELETE requests do not have
a Content-Type (as per the OpenAPI 3 specification).
An example of the problem that this commit fixes is when using
[Prism][1] as a [validation proxy][2].
[Prism rejects any GET request that has a Content-Type][3].
Here is [an example of the problem manifesting itself][4].
To validate the fix in this commit:
1. Start with any OpenAPI3 spec e.g. the Petstore example at
https://editor.swagger.io/
2. Generate Python client code for the spec
3. Look at the generated `rest.py` e.g. in the [standard sample in this
repo][5] and see that the `Content-Type` defaults to `application/json`
for all HTTP methods (including `GET`, `HEAD` and `DELETE`), rather than
there being no `Content-Type` for `GET`, `HEAD` and `DELETE`.
Fixes #9831
[1]: https://github.com/stoplightio/prism
[2]: https://meta.stoplight.io/docs/prism/docs/guides/03-validation-proxy.md
[3]: https://github.com/stoplightio/prism/issues/1408#issuecomment-690948020
[4]: https://github.com/agilepathway/gauge-openapi-example/pull/28/checks?check_run_id=2888606052#step:13:18
[5]: https://github.com/OpenAPITools/openapi-generator/blob/969cea8ce10cb9d012c3936fb377d631c0d044c9/samples/openapi3/client/petstore/python/petstore_api/rest.py#L141
* update samples
* Fix Python DELETE bug introduced in earlier commit
The earlier commit 9dfe1f6 introduced a bug for `DELETE` requests on the
standard Python generator. This commit fixes that bug and also includes
the updated samples.
Co-authored-by: William Cheng <wing328hk@gmail.com >
2021-07-07 11:04:26 +08:00
Bastien Gérard
510e64fa43
Fix minor typo in @cached_property docstring ( #9886 )
2021-07-04 12:29:55 +08:00
Daniel Krebs
2e65e6f62d
[python][client] allow passing floats for _request_timeout ( #9532 )
...
* [python][client] allow passing floats for _request_timeout
While several method docstrings suggested that you could pass floats for
_request_timeout and the underlying urllib3.Timeout can deal with them,
the code only allowed integer values so far when passed as a single
number.
* [python][samples] update with fix for _request_timeout type
2021-06-18 15:09:55 +08:00
Justin Black
fb3aed6dc4
Fixes python test_fake_api tests ( #9483 )
...
* Fixes test_upload_download_file
* Fixes test_string
* Fixes test_string_enum
* Fixes test_number_with_validations test_composed_one_of_number_with_validations
* Fixes two more tests
* Fixes test_array_of_enums
* Fixes two tests
* Removes comment
* Fixes serializationf of composed schema object models, fixes test
* Samples regenerated
* Removes pdb
2021-05-17 20:15:53 -07:00
gbmarc1
c966b5fe1f
[python] readonly constructors ( #9409 )
...
* readonly
* other tests
* doc
* python samples
* model utils
2021-05-10 18:41:26 -07:00
William Cheng
37eaf70755
Merge remote-tracking branch 'origin/master' into 5.2.x
2021-04-28 17:48:21 +08:00
gbmarc1
8e0955fd3c
Bug - python client deserialization when attribute named self ( #9006 )
...
* fix by mapping outside of class
* tests
* regeneration and tests
* server
* INDENT
* a
* enable mapping
* Revert "server"
This reverts commit 6fc9712fb5 .
* Samples regenerated
Co-authored-by: Justin Black <justin.a.black@gmail.com >
2021-04-10 19:00:32 -07:00
Justin Black
fc58adee31
Fixes serialization of array items in model_to_dict [python] ( #9153 )
...
* Adds tests of endpoint with inline and refed model
* Regen samples
* Samples regenerated
2021-04-01 13:34:19 -07:00
Justin Black
6cc270633b
[python] Fixes additional_properties_type for models ( #8802 )
...
* Fixes additionalProperties values for models, updates docs, adds tag test of it, fixes frit and gmfruit tests
* Moves this.setDisallowAdditionalPropertiesIfNotPresent higher
* Makes setting additional_properties_model_instances contingent on the presence of addprosp in schema, updates sample spec composed schemas to remove addprops False form two
* Fixes oneOf anyOf allOf instantiation logic
* Removes Address from Cat definition
* Adds required vars for apple and banana, removes required vars from composed schema init sig
* Updates composed schema vars to be set on self and all composed instances
* Removes get_unused_args, get_var_name_to_model_instances, and get_additional_properties_model_instances
* Fixes fruit + deserilization tests, creates ComposedSchemaWithPropsAndNoAddProps
* Fixes FruitReq tests
* Fixes GmFruit tests
* Fixes discard_unknown_keys tests
* Samples updated
* Removes additionalproperties False in Child
* Samples updated
* Improves handling of v2 and v3 specs for isFreeFormObject, v2 sample spec updated with link to bug
* Adds cli option disallowAdditionalPropertiesIfNotPresent to python
* Adds getAdditionalProperties method so the value for addProps will be correct
* Reverts file
* Reverts file
* Updates python doc
* Reverted anytype_3 definition
* Updates test_deserialize_lizard
* Updates test_deserialize_dict_str_dog
* Updates testDog
* Updates testChild
* Adds v2 python_composition sample
* Adds needed files for python testing
* Adds existing tests into the new python sample
* Fixes test_dog
* Removes addProps false form Dog
* Fixes testChild
* Updates how additionalProperties are set
* Fixes empty_map type
* Type generation fixed for v2 and v3 specs
* Refactors getTypeString, updates artifactids in pom.xml files
* Adds new python sample to CI testing I think
* Fixes artifactId collision, regenrates docs
2021-03-31 08:48:12 -07:00
William Cheng
99ddd6d2f2
Merge remote-tracking branch 'origin/master' into 5.2.x
2021-03-30 11:41:09 +08:00
linnefromice
70616b541e
[Ruby] remove duplicated supportingFiles.add ( #9108 )
...
* remove duplicated supportingFiles
* modify examples - remove duplicated supportingFiles
2021-03-29 11:31:24 +08:00
William Cheng
9fb97c6c29
postpone require models with parent ( #9103 )
2021-03-29 11:07:57 +08:00
Justin Black
fe52529f05
[python] fix custom model template feature ( #9118 )
...
* Removes colliding __init__model.mustache in PythonClientCodegen.java
* Removes unused files
* Regenerates samples
2021-03-28 11:28:25 -07:00
William Cheng
47483e60cb
update version to 5.2.0-SNAPSHOT, update samples
2021-03-21 00:10:10 +08:00
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master ( #9027 )
...
* Prepare v5.1.1 in the master
* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release ( #9017 )
...
* prepare v5.1.0 release
* update samples (dart-dio-next)
2021-03-20 16:45:05 +08:00
Tyler Ballast
f5151de9fc
Add whitespace to SDK documentation where necessary ( #8919 )
...
* Add a space between table title and the line above it to resolve issues when translating markdown to asciidoc
* Regenerate Samples
Co-authored-by: Tyler Ballast <tyler.ballast@reportix.com >
Co-authored-by: tballast <tyler.ballast@gmail.com >
2021-03-08 21:40:54 +08:00
William Cheng
c653051997
Revert "[Ruby] force users to specify the temp folder path to address security concerns ( #8730 )" ( #8807 )
...
This reverts commit 18a6f5a941 .
2021-02-24 00:31:43 +08:00
William Cheng
18a6f5a941
[Ruby] force users to specify the temp folder path to address security concerns ( #8730 )
...
* address security issue when downloading files in the ruby client
* update samples
* fix double quote
2021-02-20 11:49:10 +08:00
William Cheng
3e81876e2c
Merge remote-tracking branch 'origin/master' into 5.1.x
2021-02-06 17:52:32 +08:00
William Cheng
c7fcb39a2d
Prepare v5.0.1 release ( #8627 )
...
* release 5.0.1
* update samples
2021-02-06 16:37:22 +08:00
William Cheng
21d7330aea
update samples
2021-02-06 14:55:43 +08:00
William Cheng
5b99d8724c
Merge remote-tracking branch 'origin/master' into 5.1.x
2021-02-02 21:04:15 +08:00
adpoliak
a4312412fc
[PYTHON] use customized default Configuration() objects if configured by the programmer ( #8500 )
2021-01-29 16:24:10 -08:00
Justin Black
2553d056dc
Removes nulltype from python, updates samples ( #8555 )
...
* Removes nulltype from python, updates samples
* Removes nulltype from the python requirements
* Removes nulltype import in models, moves requiredVars to optionalVars when approprieate
2021-01-28 09:30:36 -08:00
William Cheng
53a5bfecfd
Merge remote-tracking branch 'origin/master' into 5.1.x
2021-01-18 11:33:57 +08:00
Johannes Wienke
cd2a0db1ce
Fix counting for large API solutions in generated Python README ( #8403 )
...
* Fix counting for large API solutions
Let 2 follow 1.
* Update Python samples with new readme
2021-01-15 13:51:12 -08:00
Justin Black
c4dbd2cfa3
[python] Fixes file upload + download, adds tests ( #8437 )
...
* Adds tests for file upload and files upload
* Adds test_download_attachment
* Fixes test_upload_file
* Adds download_attachment endpoint
* Adds test_download_attachment
* Updates assert_request_called_with signature
* Samples regen
* Adds upload download file spec route and sample gen
* Fixes file upload for application/octet-stream, writes test_upload_download_file
* Changes if into elif
* Improves python code in api_client
2021-01-15 13:27:33 -08:00
Ronny Pfannschmidt
6b6d1b1a97
[python] fix #8404 : avoid shadowing the name Endpoint ( #8405 )
...
if a type was named Endpoint, its import for use in the api would shadow
the name Endpoint for the internal utility
2021-01-13 08:38:41 -08:00
Justin Black
ce893a84ff
Fixes object serialization when there is an inline array property which contains a refed enum ( #8387 )
...
* Fixes object inline enum defintion with refed enum item
* Adds refed array model example w/ serialization + deserialization
2021-01-08 13:15:55 -08:00