Improvements to SignatureRequest and Fax response schemas#442
Merged
jtreminio-dropbox merged 5 commits intomainfrom Oct 31, 2024
Merged
Improvements to SignatureRequest and Fax response schemas#442jtreminio-dropbox merged 5 commits intomainfrom
jtreminio-dropbox merged 5 commits intomainfrom
Conversation
28dabc1 to
6394b84
Compare
6394b84 to
34809ed
Compare
erkkinen
approved these changes
Oct 31, 2024
erkkinen
approved these changes
Oct 31, 2024
This was referenced Nov 27, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this PR:
The
metadataproperty has had its schema updated to reflect what you actually get back from the API. Affected schemas are:BulkSendJobGetResponseSignatureRequests.metadataSignatureRequestResponse.metadataTemplateResponse.metadataThe change is:
ObjecttoDictionary<string, Object>ObjecttoMap<String, Object>objectto{ [key: string]: any }arraybut typehint is nowarray<string,mixed>objecttoDict[str, object]ObjecttoHash<String, Object>Additional changes:
BulkSendJobGetResponseSignatureRequests.test_modeis now non-nullableBulkSendJobGetResponseSignatureRequests.expires_atis now nullableSignatureRequestResponse.test_modeis now non-nullableSignatureRequestResponse.expires_atis now nullableFaxResponse.transmissionsis now non-nullableFaxResponse.subjectis now nullableFaxResponse.messageis now nullableFaxResponse.final_copy_urinullablestringhas been addedFaxResponseTransmission.senderremovedThis PR fixes a bug with the
BulkSendJobGetResponseSignatureRequestsschema. It inherits all of the properties in theSignatureRequestResponseschema, but themetadatadefinition causes problems when SDKs are being generated.To solve this, I've added
metadatatoBulkSendJobGetResponseSignatureRequests.More details:
Fun fact! You can define a property as a key:value (aka javascript
objector pythondicttype) in OpenAPI as follows:This makes the shape of
metadataas{ [key:string]: any }which is what we want formetadatabecause it can be any shape a customer decides as long as the key is a string.We can also define a schema as extending another schema which allows it to inherit all the parent schema's properties, as so:
However, there's a bug with the
openapi-generatortool when generating SDKs where if a schema extends another usingallOf, and the parent schema has a property oftype: object, the final type of that property in some SDKs is wrong.{ [key: string]: any }but it actually generatesobjectwhich is technically not wrong but incorrect all the same.array<string,mixed>but getarrayDictionary<string, Object>getObjectMap<String, Object>getObjectDict[str, object]getobjectHash<String, Object>getObjectThe solution is to add the property to the child schema: