Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ced5763
Add source folder variable to fastapi fix 12118
rk0n Apr 12, 2022
ce2dbdc
Add generated sample files for python-fastapi fix 12118
rk0n Apr 12, 2022
83af2ca
[python-experimental] fixes json + charset use case (#12114)
spacether Apr 12, 2022
216ee06
Add example allOf with single ref (#10948)
kuhnroyal Apr 12, 2022
8ae7b89
Add a sample of an enum model array in query params (#12107)
kuhnroyal Apr 12, 2022
82f35b3
[typescript-fetch] drop support typescript under v4.0 (#12102)
mkusaka Apr 12, 2022
f31aab2
update samples
wing328 Apr 12, 2022
8b0e3f0
[dart] Remove old dio generator (to be replaced with dart-dio-next) (…
kuhnroyal Apr 12, 2022
5adc7ee
fix: respect configured generator URL in swagger config (#12064)
fgreinacher Apr 12, 2022
4dacc0e
[typescript*] drop support typescript below 4.0 (#12123)
mkusaka Apr 12, 2022
6d089d1
Upgrade haskell-servant to latest LTS (#12092)
7omb Apr 12, 2022
82d41d5
[C++][Qt] update petstore to 3.0 spec (#12124)
wing328 Apr 13, 2022
69440ec
update readme with onesignal (#12126)
wing328 Apr 13, 2022
d071fc5
[typescript-fetch] Removed functions that are unused when withoutRunt…
mkusaka Apr 13, 2022
d833794
[kotlin][client] fix encoding of individual parts of a multipart requ…
koscejev Apr 13, 2022
e70f243
[python-experimental] Allow response media types to omit schema (#12135)
spacether Apr 13, 2022
aaf9f83
improve errorObjectType to avoid regression (#12131)
wing328 Apr 14, 2022
fecdf0d
[php-slim4] Add monolog package as default logger (#12137)
ybelenko Apr 16, 2022
244f109
Bump async from 2.6.3 to 2.6.4 in /website (#12148)
dependabot[bot] Apr 16, 2022
6e7f2a8
do not put the invalid value of the enum to a JSON structure (#12133)
ityuhui Apr 16, 2022
e243117
[Java] Ignore return value for Java file assert classes (#12145)
borsch Apr 16, 2022
a5132bd
Add @mkusaka to TS technical committee (#12150)
wing328 Apr 16, 2022
77fc9ff
Fix documentation for users of AbstractJavaJAXRSServerCodegen (#12142)
typetetris Apr 16, 2022
c95ee48
[Dart][client] Adjust toJson method to use '_json' instead of 'json' …
0xNF Apr 16, 2022
ac8906a
[dart] Support/Fix sourceFolder parameter and docs (#12113)
kuhnroyal Apr 16, 2022
ce326da
[Ruby] Add support for faraday 2.x (#12112)
ykitamura-mdsol Apr 16, 2022
aaa1c26
[Java/Spring] all-of and one-of Improvements and Fixes (was #12075) (…
cachescrubber Apr 16, 2022
ef17120
[REQ][Ruby] Ruby Allow Follow Redirect (#12047)
moorec22 Apr 16, 2022
feefaf7
set follow_location default to true
wing328 Apr 16, 2022
64ccf06
Adds UUID to python-experimental (#12153)
spacether Apr 16, 2022
899c8e1
update url to travis ci
wing328 Apr 17, 2022
59dc481
Adds not to CodegenComposedSchemas and uses it in python-exp (#12146)
spacether Apr 17, 2022
1f48d76
[python-experimental] fixes bug where some singleton representations …
spacether Apr 17, 2022
cfd51ef
[swift5] Abstract away URLSession (#11651) (#12110)
leszek-s Apr 19, 2022
2e2e557
[Java][OkHTTP] fix empty request body handling (#12172)
borsch Apr 19, 2022
4b2685c
Better inline model resolver to handle inline schema in array item (#…
wing328 Apr 20, 2022
28128e6
[Inline model resolver] minor enhancements/refactoring (#12175)
wing328 Apr 20, 2022
33085f1
[python-experimental] Fixes enum is comparison (#12176)
spacether Apr 20, 2022
dd9f7b5
[php] make ObjectSerializer::toString actually return a string (#12158)
fengelniederhammer Apr 20, 2022
859bfa0
update php samples
wing328 Apr 20, 2022
0cb59fc
Allow selection of MP REST API version for MicroProfile REST client g…
aserkes Apr 20, 2022
7bacfc0
[Java][microprofile] update API test template to work with v3.0 (#12177)
wing328 Apr 20, 2022
52b8368
Return type for Azure funcs (#12115)
Abrhm7786 Apr 20, 2022
0a4b3c9
update doc
wing328 Apr 20, 2022
eb36fc7
Improvements to csharp-netcore-function generator (#12183)
wing328 Apr 20, 2022
178ca12
[java-micronaut] Support Optional for non-required properties (#12144)
auke- Apr 21, 2022
537b1a6
update java samples
wing328 Apr 21, 2022
f41e756
[typescript-fetch] allow initOverrides with async function (#12098)
mkusaka Apr 23, 2022
cce98b8
[Wsdl] Adding cli-option for generating different versions of WSDL-fi…
adessoDpd Apr 24, 2022
dcf8431
[python-flask] Fix return type too strict (#12190)
OJFord Apr 24, 2022
04ece4d
update samples, docs
wing328 Apr 24, 2022
67dc856
Fixing bug in Kotlin Client with BigDecimal default value (#12213)
sjoblomj Apr 24, 2022
ec2778f
Fix duplication of "Api" when structPrefix is set (#12128)
impl Apr 24, 2022
980975a
add samples/client/petstore/kotlin-bigdecimal-default to kotlin ci tests
wing328 Apr 24, 2022
54b6eb5
remove spring-mvc samples (#12222)
wing328 Apr 24, 2022
bfc9f2e
[Micronaut] Add option to describe response wrappers (#12186)
andriy-dmytruk Apr 24, 2022
10d0dbf
Emit default values for aspnetcore 3 value types (#11280)
hauntingEcho Apr 24, 2022
a1e51b3
update samples
wing328 Apr 24, 2022
38b0d9d
Merge branch 'master' into add-source-folder-variable-to-fastapi-fix-…
rk0n Apr 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[python-experimental] Fixes enum is comparison (#12176)
* Fixes enum is comparison

* Reverts file
  • Loading branch information
spacether authored and rk0n committed Apr 24, 2022
commit 33085f183725c2d05f59bdbfe253d400be831add
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def NONE(cls):
@classmethod
@property
def {{name}}(cls):
return cls._enum_by_value[{{{value}}}]({{{value}}})
return cls({{{value}}})
{{/each}}
{{/with}}
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,7 @@ class Schema:
# Use case: value is None, True, False, or an enum value
value = arg
for key in path[1:]:
# if path is bigger than one, get the value that mfg_cls validated
value = value[key]
if hasattr(mfg_cls, '_enum_by_value'):
mfg_cls = mfg_cls._enum_by_value[value]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ class _items(
@classmethod
@property
def GREATER_THAN(cls):
return cls._enum_by_value[">"](">")
return cls(">")

@classmethod
@property
def DOLLAR(cls):
return cls._enum_by_value["$"]("$")
return cls("$")


class EnumQueryStringSchema(
Expand All @@ -106,17 +106,17 @@ class EnumQueryStringSchema(
@classmethod
@property
def _ABC(cls):
return cls._enum_by_value["_abc"]("_abc")
return cls("_abc")

@classmethod
@property
def EFG(cls):
return cls._enum_by_value["-efg"]("-efg")
return cls("-efg")

@classmethod
@property
def XYZ(cls):
return cls._enum_by_value["(xyz)"]("(xyz)")
return cls("(xyz)")


class EnumQueryIntegerSchema(
Expand All @@ -132,12 +132,12 @@ class EnumQueryIntegerSchema(
@classmethod
@property
def POSITIVE_1(cls):
return cls._enum_by_value[1](1)
return cls(1)

@classmethod
@property
def NEGATIVE_2(cls):
return cls._enum_by_value[-2](-2)
return cls(-2)


class EnumQueryDoubleSchema(
Expand All @@ -153,12 +153,12 @@ class EnumQueryDoubleSchema(
@classmethod
@property
def POSITIVE_1_PT_1(cls):
return cls._enum_by_value[1.1](1.1)
return cls(1.1)

@classmethod
@property
def NEGATIVE_1_PT_2(cls):
return cls._enum_by_value[-1.2](-1.2)
return cls(-1.2)
RequestRequiredQueryParams = typing.TypedDict(
'RequestRequiredQueryParams',
{
Expand Down Expand Up @@ -225,12 +225,12 @@ class _items(
@classmethod
@property
def GREATER_THAN(cls):
return cls._enum_by_value[">"](">")
return cls(">")

@classmethod
@property
def DOLLAR(cls):
return cls._enum_by_value["$"]("$")
return cls("$")


class EnumHeaderStringSchema(
Expand All @@ -247,17 +247,17 @@ class EnumHeaderStringSchema(
@classmethod
@property
def _ABC(cls):
return cls._enum_by_value["_abc"]("_abc")
return cls("_abc")

@classmethod
@property
def EFG(cls):
return cls._enum_by_value["-efg"]("-efg")
return cls("-efg")

@classmethod
@property
def XYZ(cls):
return cls._enum_by_value["(xyz)"]("(xyz)")
return cls("(xyz)")
RequestRequiredHeaderParams = typing.TypedDict(
'RequestRequiredHeaderParams',
{
Expand Down Expand Up @@ -313,12 +313,12 @@ class _items(
@classmethod
@property
def GREATER_THAN(cls):
return cls._enum_by_value[">"](">")
return cls(">")

@classmethod
@property
def DOLLAR(cls):
return cls._enum_by_value["$"]("$")
return cls("$")


class enum_form_string(
Expand All @@ -335,17 +335,17 @@ class enum_form_string(
@classmethod
@property
def _ABC(cls):
return cls._enum_by_value["_abc"]("_abc")
return cls("_abc")

@classmethod
@property
def EFG(cls):
return cls._enum_by_value["-efg"]("-efg")
return cls("-efg")

@classmethod
@property
def XYZ(cls):
return cls._enum_by_value["(xyz)"]("(xyz)")
return cls("(xyz)")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ class _items(
@classmethod
@property
def AVAILABLE(cls):
return cls._enum_by_value["available"]("available")
return cls("available")

@classmethod
@property
def PENDING(cls):
return cls._enum_by_value["pending"]("pending")
return cls("pending")

@classmethod
@property
def SOLD(cls):
return cls._enum_by_value["sold"]("sold")
return cls("sold")
RequestRequiredQueryParams = typing.TypedDict(
'RequestRequiredQueryParams',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class className(
@classmethod
@property
def BASQUEPIG(cls):
return cls._enum_by_value["BasquePig"]("BasquePig")
return cls("BasquePig")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ class BooleanEnum(
@classmethod
@property
def TRUE(cls):
return cls._enum_by_value[True](True)
return cls(True)
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class quadrilateralType(
@classmethod
@property
def COMPLEXQUADRILATERAL(cls):
return cls._enum_by_value["ComplexQuadrilateral"]("ComplexQuadrilateral")
return cls("ComplexQuadrilateral")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ class Currency(
@classmethod
@property
def EUR(cls):
return cls._enum_by_value["eur"]("eur")
return cls("eur")

@classmethod
@property
def USD(cls):
return cls._enum_by_value["usd"]("usd")
return cls("usd")
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class className(
@classmethod
@property
def DANISHPIG(cls):
return cls._enum_by_value["DanishPig"]("DanishPig")
return cls("DanishPig")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ class just_symbol(
@classmethod
@property
def GREATER_THAN_EQUALS(cls):
return cls._enum_by_value[">="](">=")
return cls(">=")

@classmethod
@property
def DOLLAR(cls):
return cls._enum_by_value["$"]("$")
return cls("$")


class array_enum(
Expand All @@ -114,12 +114,12 @@ class _items(
@classmethod
@property
def FISH(cls):
return cls._enum_by_value["fish"]("fish")
return cls("fish")

@classmethod
@property
def CRAB(cls):
return cls._enum_by_value["crab"]("crab")
return cls("crab")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ class EnumClass(
@classmethod
@property
def _ABC(cls):
return cls._enum_by_value["_abc"]("_abc")
return cls("_abc")

@classmethod
@property
def EFG(cls):
return cls._enum_by_value["-efg"]("-efg")
return cls("-efg")

@classmethod
@property
def XYZ(cls):
return cls._enum_by_value["(xyz)"]("(xyz)")
return cls("(xyz)")
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ class enum_string(
@classmethod
@property
def UPPER(cls):
return cls._enum_by_value["UPPER"]("UPPER")
return cls("UPPER")

@classmethod
@property
def LOWER(cls):
return cls._enum_by_value["lower"]("lower")
return cls("lower")

@classmethod
@property
def EMPTY(cls):
return cls._enum_by_value[""]("")
return cls("")


class enum_string_required(
Expand All @@ -119,17 +119,17 @@ class enum_string_required(
@classmethod
@property
def UPPER(cls):
return cls._enum_by_value["UPPER"]("UPPER")
return cls("UPPER")

@classmethod
@property
def LOWER(cls):
return cls._enum_by_value["lower"]("lower")
return cls("lower")

@classmethod
@property
def EMPTY(cls):
return cls._enum_by_value[""]("")
return cls("")


class enum_integer(
Expand All @@ -145,12 +145,12 @@ class enum_integer(
@classmethod
@property
def POSITIVE_1(cls):
return cls._enum_by_value[1](1)
return cls(1)

@classmethod
@property
def NEGATIVE_1(cls):
return cls._enum_by_value[-1](-1)
return cls(-1)


class enum_number(
Expand All @@ -166,12 +166,12 @@ class enum_number(
@classmethod
@property
def POSITIVE_1_PT_1(cls):
return cls._enum_by_value[1.1](1.1)
return cls(1.1)

@classmethod
@property
def NEGATIVE_1_PT_2(cls):
return cls._enum_by_value[-1.2](-1.2)
return cls(-1.2)

@classmethod
@property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class triangleType(
@classmethod
@property
def EQUILATERALTRIANGLE(cls):
return cls._enum_by_value["EquilateralTriangle"]("EquilateralTriangle")
return cls("EquilateralTriangle")


def __new__(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ class IntegerEnum(
@classmethod
@property
def POSITIVE_0(cls):
return cls._enum_by_value[0](0)
return cls(0)

@classmethod
@property
def POSITIVE_1(cls):
return cls._enum_by_value[1](1)
return cls(1)

@classmethod
@property
def POSITIVE_2(cls):
return cls._enum_by_value[2](2)
return cls(2)
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ class IntegerEnumBig(
@classmethod
@property
def POSITIVE_10(cls):
return cls._enum_by_value[10](10)
return cls(10)

@classmethod
@property
def POSITIVE_11(cls):
return cls._enum_by_value[11](11)
return cls(11)

@classmethod
@property
def POSITIVE_12(cls):
return cls._enum_by_value[12](12)
return cls(12)
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ class IntegerEnumOneValue(
@classmethod
@property
def POSITIVE_0(cls):
return cls._enum_by_value[0](0)
return cls(0)
Loading