-
Notifications
You must be signed in to change notification settings - Fork 409
Add getTemplate functionality #799
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
Conversation
2eaa77a
to
e719d9b
Compare
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.
Looks mostly good. Just bunch of nits and suggestions to improve on.
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.
Looks pretty good. Let's rename to etag
as indicated, and tighten up the tests.
readonly conditions?: RemoteConfigCondition[]; | ||
readonly parameters?: { [key: string]: RemoteConfigParameter }; | ||
readonly version?: Version; //only undefined when there is no active template in the project | ||
readonly eTag: string; |
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.
It seems the backend already sends this as etag
. It's quite common to write this as etag
. You will find many instances of that in that same page you've referenced. But it's almost never written as eTag
in my experience.
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.
LGTM with a nit
'invalid-argument', | ||
'ETag header is not present in the server response.'); | ||
} | ||
const remoteConfigResponse: RemoteConfigResponse = { |
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.
Nit: You can collapse this into one statement.
return {
...
};
getTemplate()
RemoteConfigParameterValue
typeparameters
inRemoteConfigTemplate
to a hashmapgetTemplate