palantir / conjure-python-client

Python client and JSON encoders for use with generated Conjure clients
Apache License 2.0
7 stars 20 forks source link

Deserialize enum variants case-insensitively #128

Open dtobin opened 1 year ago

dtobin commented 1 year ago

Before this PR

The conjure spec requires that enum variants be uppercase. The conjure wire spec doesn't specify casing (as far as I saw). The Java implementation is case-insensitive on deserializing enum variants: https://github.com/palantir/conjure-java/blob/6.65.0/conjure-java-core/src/main/java/com/palantir/conjure/java/types/EnumGenerator.java#L240-L276. As such, some clients of conjure APIs currently use lower-case enum variants, which work with Java server implementations.

After this PR

==COMMIT_MSG== Deserialize enum variants case-insensitively, for compatibility with the Java implementation ==COMMIT_MSG==

Possible downsides?

changelog-app[bot] commented 1 year ago

Generate changelog in changelog-dir>`changelog/@unreleased`</changelog-dir

Type

- [ ] Feature - [x] Improvement - [ ] Fix - [ ] Break - [ ] Deprecation - [ ] Manual task - [ ] Migration

Description

Deserialize enum variants case-insensitively, for compatibility with the Java implementation **Check the box to generate changelog(s)** - [x] Generate changelog entry
dtobin commented 1 year ago

Note that after this lands, we may also want to backport to 1.x