Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type-safe-api): fix model serialisation for nested collections in typescript #882

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

cogwirrel
Copy link
Member

@cogwirrel cogwirrel commented Nov 8, 2024

Previously, arrays of arrays or dictionaries of dictionaries (or any combination) were not serialising/deserialising correctly. There were 2 main problems:

  1. Nested arrays/dictionaries of models would be treated as if they were a single array/dictionary
  2. Nested dates (even under single level arrays) weren't being serialised/deserialised at all which could lead to runtime errors

Note that OpenAPI generator would not attempt to recursively serialise/deserialise nested arrays which mean that problem 2 was present prior to moving to the new code generator.

Copy link

nx-cloud bot commented Nov 8, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit c6b8b80. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

… typescript

Previously, arrays of arrays or dictionaries of dictionaries (or any combination) were not
serialising/deserialising correctly. There were 2 main problems:

1. Nested arrays/dictionaries of models would be treated as if they were a single array/dictionary
2. Nested dates (even under single level arrays) weren't being serialised/deserialised at all which
could lead to runtime errors
@cogwirrel cogwirrel force-pushed the fix/nested-array-dicts-ts-models branch from 9e36be8 to c6b8b80 Compare November 8, 2024 07:26
Copy link
Contributor

@agdimech agdimech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@cogwirrel cogwirrel merged commit ef749b3 into mainline Nov 10, 2024
4 checks passed
@cogwirrel cogwirrel deleted the fix/nested-array-dicts-ts-models branch November 10, 2024 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants