-
Notifications
You must be signed in to change notification settings - Fork 32
make it possible to have separate serialization API types and the client to access them #219
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
make it possible to have separate serialization API types and the client to access them #219
Conversation
a0ac210 to
822570a
Compare
01309d9 to
ad97d89
Compare
ad97d89 to
ba2daee
Compare
|
/test all |
|
@deads2k Mind adding UTs? These usually provide helpful examples. |
Ah, the unit tests aren't in the package using the standard |
Once we are happy with sdk-go and have used it for a month or so, we can come back and remove old generation and test because we won't come back to it.
| } | ||
|
|
||
| switch generator { | ||
| case "builders-alias", "json-alias", "types-alias": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a comment here please? [Explaining that these are run for the ocm-model explicitly.]
| {{ $unmarshalTypeFunc := unmarshalTypeFunc .Type }} | ||
| {{ $readTypeFunc := readTypeFunc .Type }} | ||
| var {{ $marshalTypeFunc }} = {{ apiVersionPackage }}.{{ $marshalTypeFunc }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately the this will generate the code of the SDK. Shouldn't we have the comments here?
i.e.
// {{ $marshalTypeFunc }} writes a value of the '{{ .Type.Name }}' type to the given writer.
|
/lgtm |
|
This looks good, thanks @deads2k /approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, vkareh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2defa0d
into
openshift-online:main
|
IOUs are here: #229 |
This will allow us to split the definition of API types from API client. While doing this, it is worthwhile to continue making it possible for those who wish to generate their own client it its entirety. This is useful for cases where we create a model and choose not to create a client for it. If we don't do that, then it isn't useful and isn't needed.
remaining