267 Commits

Author SHA1 Message Date
William Cheng
212b4f7847
Prepare 5.0.0-beta2 release (#7345)
* update version

* update doc

* update samples
2020-09-04 13:03:45 +08:00
William Cheng
14d41310b9
[Go] replace go generator with go-experimental generator (#7337)
* replace go with go-experimental

* update samples

* extends with abstract go class

* rearrange

* remove deprecated

* minor fix

* remove go deprecated samples

* update pom, clean up samples

* mark generator as deprecated
2020-09-04 09:56:42 +08:00
Jim Schubert
a6d30cac9d
[core] Templating: limit compilation to supported extensions and constrain target paths (#6598) 2020-09-02 15:52:35 -04:00
William Cheng
966b87e66c
add aws v4 signature support to go-experimental (#7326) 2020-09-02 15:28:22 +08:00
William Cheng
d50d31cd5e
add structPrefix support to go-experimental (#7327) 2020-09-01 20:51:37 +08:00
Jiri Kuncar
d5a680e85f
[Extensions][Go][Java] Test x-auth-id-alias (#6642)
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-08-30 21:46:55 -04:00
spacether
866df36c94
[python-exp] simplify examples (#7157)
* Adds example setting code in python-experimental with one fn setting example values

Fixes sample indentations

Handles composed schema models, object model and arraymodels

Adds brackets in arraymodel input

Sets modelName with map schemas

Removes included_schemas arguments, dicriminator examples do not include property examples

Refactors modelName into toExampleValueRecursive argument

Fixes bug where example models contained themselves

Stops using model ExampleGenerator examples because they are inconsistent with the ones in python-experimental

Uses example values if they exist

Removes single quotes from enum examples

Fixes password example

Adds commented our regex handling, commented out because it breaks

Handles AnyType schema examples

Adds x_example values for simple string properties, uses toExampleValue for all example generation

Adds examples for simple string parameters

Updates comments in toExampleValueBase

Fixes the double nested bug for AdditionalPropertiesWithArrayOfEnums

Fixes bug where NumberWithValidations had double nesting

Updates simple string examples in arrays

Fixes array string examples

Fixes example for string endpoint body example

Adds exampleFromStringOrArraySchema

Adds regex examples, pegs slf4j-version to v1.7.29 for rgxgen

Adds comment about regex seed

Updates pattern matcher to not handle ^ and $

Updates used sample values

Adds ensureQuotes

Adds ensureQuotes

Fixes double quote bug

Updates mustache file

Adds ensureQuotes to key handling

Adds modelNameToSchema map, reduces run time by using it

Fixes java tests

Regenerates python-experimental samples

Fixes python test

* Rebased on master

* Adds getModelNameToSchemaCache

* Updates toDefaultValue to not mutate schemas

* Has all dates and datetimes default and example setting use the same helper function

* Samples regenerated

* indentation tweak, removes txt from sample file
2020-08-19 21:27:31 -07:00
Christian Gibson
d37216a411
[python{,-experimental}] Obey floating point timeouts provided to RESTClientObject.request(...) (#7154)
* [fix] support floating point timeout durations

* [lint] generate samples, rebuild project
2020-08-10 13:11:29 -07:00
Justin Black
798ad2f87d
[python-experimental] simplifies json serialization (#7061)
* Requires python >= 3.5, adds type hints to call_api method

* Adds type hints to files_parameters and __call_api

* Adds and uses a new json encoded to prepare data before it is sent

* Removes nose name from gitlab testing invocations

* Also updates travis to py>=3.5

* Collapses encoder back into sanitize_for_serialization
2020-07-28 08:16:19 -07:00
Justin Black
ee0686e13f
Python-exp clean up model classnames (#7054)
* Adds lazy_import, removes python-exp java class renaming code, partial removal of getPythonClassName call sites

Fixes PythonClientExperimentalTest.java

Python-exp smaples regeneration

Revers makefile

Reverst pom.xml

Fixes model imports in models.__init__

Updates docstring, omits lazy import in additional properties if we dont need it

Improves additional_properties_type assignment if None

Removes getPythonClassName

Fixes python-exp tests

* Removes unused makefiles
2020-07-27 18:35:41 -07:00
Justin Black
0e0f8eb74c
[python-experimental] Removes python2 (#6991)
* Removes future from python-exp v3 sample

* Removes future from python-exp v2 sample

* Deletes future from remaining python-exp files

* Removes six from python-exp templates

* Removes six from python-exp samples

* Removes mock from python-exp

* Python-exp switched to py3

* Removes python 2.7 for python-exp ci testing

* Requires python>=3.3 for python-exp

* Reverts unnecessary changes to two templates
2020-07-19 09:45:56 -07:00
Justin Black
ed84280108
Python-exp remove codegemodel mutation, allow mixed OneOf types (#6797)
* Stops converting primitive models into object models, adds ComposedSchemas with mixed type

* Samples update for python-exp
2020-07-18 10:13:22 -07:00
William Cheng
61789475ea update python samples 2020-07-03 18:51:31 +08:00
Jiri Kuncar
8b9c070e5d
[Python] Support for per-operation servers (#6557)
* Dynamic server support

* regenerated

* Apply suggestions from code review

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>

* regenerated

* Add ParameterizedServer feature to Python experimental

* Fix lookup of server variables

* Add tests and change default value for servers

* Fix server variables

* Return base path when index is None

* Use HOST

* Apply suggestions from code review

* Apply suggestions from code review

* regenerated

* Add specific tests for dynamic servers

* regenerated

* add docstring

* regenerated

* Fix wrong merge resolution

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>
2020-06-25 21:28:54 -07:00
Jiri Kuncar
33328977d1
[Python] enum serialization (#6746)
* [Python] enum serialization

* Fix serialization of nested enum
2020-06-22 11:07:18 -07:00
Thomas Hervé
380b173e50
[Python] Remove duplicate definition of Endpoint class (#6667)
* Remove duplicate definition of Endpoint class

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

* Regenerate examples
2020-06-16 07:52:45 -07:00
Jiri Kuncar
046ba7de8e
[feature][python] Support aliasing of API keys (#6469)
* [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
2020-06-11 09:19:57 -07:00