embulk / embulk-base-restclient

Base class library for Embulk plugins to access RESTful services
https://www.embulk.org/
Apache License 2.0
6 stars 7 forks source link

Replace (Jackson)ServiceResponseSchema to simplify and accept other formats than JSON. #6

Closed dmikurube closed 7 years ago

dmikurube commented 7 years ago

Note that the older SchemaWriterFactory has already been just renamed to JacksonServiceResponseSchema.

  1. Split to |ServiceResponseSchema| and |JacksonServiceResponseSchema|. It allows to accept other formats than JSON by implementing a new class such as |JAXBServiceResponseSchema|.

  2. Remove naming configuration with |TaskSource| (e.g. "column_name"), and introduce |ValueLocator|. It allows to locate values in the response not just by top-level attribute names but by JSONPath or jq for example.

  3. Introduce an interface |ServiceResponseSchemaBuildable| to implement a factory of |ServiceResponseSchema|, instead of implementing a method |buildSchemaWriterFactory| in |RestClientInputPluginBase|.

dmikurube commented 7 years ago

Filed issues: #12 and #14.