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

Support serialisation from internal field names #10

Open
judgej opened this issue Jun 15, 2019 · 0 comments
Open

Support serialisation from internal field names #10

judgej opened this issue Jun 15, 2019 · 0 comments

Comments

@judgej
Copy link
Member

judgej commented Jun 15, 2019

The serialisation method assumes its input is going to be the payload of a Serverr Request (and specifically a JSON payload). The data used to construct those models then has to be formatted using the field names as they are transmitted over HTTP.

For example, am RFC 7807 response has a transmitted field invalid-params. This can be set on the model using setInvalidParams('$foo) but the array element when initialising (deserialising) must be invalid-params. The obvious key invalidParams does not work.

This is useful when constructing responses to inbound requests. This also assumes the package generated is more an SDK handling all message models, and supports sending using a PSR-18 client, rather than just being a client package.

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

No branches or pull requests

1 participant