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

Add encoding.DescribeResponse #217

Merged
merged 1 commit into from
May 18, 2022
Merged

Add encoding.DescribeResponse #217

merged 1 commit into from
May 18, 2022

Conversation

ekerfelt
Copy link
Contributor

This commit adds a new DescribeResponse function to the encoding package.
This function's job is to describe the http wire representation of a Response type

The output of this function can then be used for both the client generation
and for the code generation inside Encore request handlers for applications.

@encore-cla
Copy link

encore-cla bot commented May 17, 2022

All committers have signed the CLA.

DomBlack
DomBlack previously approved these changes May 17, 2022
Copy link
Contributor

@DomBlack DomBlack left a comment

Choose a reason for hiding this comment

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

One small comment

type ParameterEncoding struct {
// Location (e.g. header, query, body) where the parameter should be marshalled from/to
Location ParameterLocation
// The location specific name of the parameter (e.g. cheeseEater, cheese-eater, X-Cheese-Eater
Name string
// Whether the name should be case-sensitive
CaseSensitive bool
Copy link
Contributor

Choose a reason for hiding this comment

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

When sent to true the standard library JSON (i.e. the one we use in the client generator) will still be case insensitive. Is this ok? (i.e. what's the use case fo having this be true?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I'll remove it

This commit adds a new `DescribeResponse` function to the encoding package.
This function's job is to describe the http wire representation of a Response type

The output of this function can then be used for both the client generation
and for the code generation inside Encore request handlers for applications.
@ekerfelt ekerfelt merged commit 429c88b into main May 18, 2022
@ekerfelt ekerfelt deleted the rpc-resp branch May 18, 2022 06:37
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