bencebalogh / avro-schema-registry

Confluent Schema Registry implementation in javascript to easily serialize and deserialize kafka messages
MIT License
28 stars 30 forks source link

registry not taking path #13

Closed estebanefi closed 5 years ago

estebanefi commented 5 years ago

I am trying to use this library but my schema registry does not follow the path of https://localhost:80/schemas/ids/{id}, it is more like https://localhost:80/api/v1/confluent/schemas/ids/{id}. I would like the library to take the extra path that is provided. I noticed in fetch-schema.js that it does not append the provided path.

const registry = require("avro-schema-registry")( "http://localhost:80/api/v1/confluent/" );

currently like this


const { protocol, host, port, auth } = registry;

   const requestOptions = {
      host,
      port,
      path: `/schemas/ids/${schemaId}`,
      auth

to this?

 const { protocol, host, port, path, auth } = registry;
 const requestOptions = {
      host,
      port,
      path: `${path}schemas/ids/${schemaId}`,
      auth
bencebalogh commented 5 years ago

It'd make sense, I'll do this soon

estebanefi commented 5 years ago

Thanks, it would really help.

bencebalogh commented 5 years ago

Out in 1.3.1