Uh oh!
There was an error while loading. Please reload this page.
CORE: REST Catalog - Response class for server provided configuration - #4184
Conversation
| public Map<String, String> merge(Map<String, String> clientProperties) { | ||
| Preconditions.checkNotNull(clientProperties, | ||
| "Cannot merge client properties with server-provided properties. Invalid client configuration: null"); | ||
| Map<String, String> merged = Maps.newHashMap(defaults); | ||
| merged.putAll(clientProperties); | ||
| merged.putAll(overrides); | ||
| return merged; | ||
| } |
There was a problem hiding this comment.
This function might be better placed outside of the response object. I haven't included tests for it yet, in case we want to move it to some other utility class or elsewhere (as the request / response object should arguably be more like data classes).
There was a problem hiding this comment.
I'm fine with it here for now. We can move it later if we think it doesn't fit.
There was a problem hiding this comment.
Ok. That makes sense for me. This will at least unblock others from working in parallel on this.
ad185b1 to
2f38cccCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
8c56b5f to
27e688bCompareUh oh!
There was an error while loading. Please reload this page.
60ee8ec to
4df1d8eCompare
Defines the response class used to populate the server-provided configuration.
Per the spec, the catalog client will call the
/v1/configendpoint to retrieve a set ofoverridesanddefaults. Thedefaultconfigurations are there to allow clients to not have to provide all details so that end user's don't have to specify values that are commonly used, and theoverridesare there so that the server can require a certain value be used.I've also started updating the REST catalog spec to be more detailed for this part (though I'll probably move that to another PR).