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

Feature: Introduce DecodingOptions to allow non-default behavior overrides (e.g. less strict deserialization) #131

Open Rkuro opened 1 year ago

Rkuro commented 1 year ago

Before this PR

If I had an object that looked like this:

{ "foo-bar": "baz" }

There is no way currently to deserialize this as a conjure object since the naming for conjure is limited to PascalCase and then converted from PascalCase to snake case, i.e. "FooBar" -> "foo_bar" which means that when we hit the decoder case we are silently missing the cases where it is "foo-bar" and I think this should be a capability of the library :)

After this PR

==COMMIT_MSG== Allow hyphens to be deserialized into conjure objects (non-default) ==COMMIT_MSG==

Possible downsides?

Rkuro commented 1 year ago

changelog bot seems to be having trouble picking up the output of the form ^ - adding no-changelog as a workaround.