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

[Generation] Untyped node support #4095

Merged
merged 36 commits into from
Mar 21, 2024
Merged

Conversation

andrueastman
Copy link
Member

@andrueastman andrueastman commented Jan 31, 2024

This PR

It adds generation support for deserialization of properties that have an unknown type("any") in the generation of C#, Go, Typescript and Java by introduction of the generation of the UntypedNode type in such scenarios.

In summary changes include

  • Generation of the UntypedNode type in Go,C#,Java and TS while calling RemoveUntypedNodePropertyValues to prevent generation in other langs.
  • Adds "apisguru::apis.guru" api to integration test to validate the same and should pass once abstractions libs are released.

End to end tests performed with the "apisguru::apis.guru" api can be validated/tested with the samples here that pull these changes as submodules.

C# sample client code - https://github.com/andrueastman/UntypedNodeSamples/blob/5a7ab13b044e1331583cce9d0aee16c1429afd3e/DotnetUntypedNodeSample/Program.cs#L16
Java sample client code - https://github.com/andrueastman/UntypedNodeSamples/blob/5a7ab13b044e1331583cce9d0aee16c1429afd3e/javaclient/app/src/main/java/javaclient/app/App.java#L17
Go sample client code - https://github.com/andrueastman/UntypedNodeSamples/blob/5a7ab13b044e1331583cce9d0aee16c1429afd3e/goclient/app.go#L21
TS sample client code - https://github.com/andrueastman/UntypedNodeSamples/blob/5a7ab13b044e1331583cce9d0aee16c1429afd3e/TSclient/index.ts#L20

TODO

  • Todo merge after abstraction libs are released to have new integration tests passing.

Andrew Omondi added 28 commits January 30, 2024 16:36
@andrueastman andrueastman changed the title [WIP] Untyped node support [Generation] Untyped node support Mar 4, 2024
@andrueastman andrueastman marked this pull request as ready for review March 4, 2024 18:37
@andrueastman andrueastman requested a review from a team as a code owner March 4, 2024 18:37
baywet
baywet previously approved these changes Mar 6, 2024
Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Excellent work! We'll need to update the changelog once libraries are published but nothing to add besides that.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
baywet
baywet previously approved these changes Mar 20, 2024
Copy link

@andrueastman andrueastman requested a review from baywet March 21, 2024 12:07
@andrueastman andrueastman enabled auto-merge March 21, 2024 12:08
@andrueastman andrueastman merged commit 45ef2c9 into main Mar 21, 2024
202 checks passed
@andrueastman andrueastman deleted the andrueastman/untypedNodes branch March 21, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Provide a way to deserialize properties that could be of "any" type. How can we handle untyped JSON?
2 participants