hortonworks / registry

Schema Registry
Apache License 2.0
15 stars 8 forks source link

schema name is not available to the schemaProvider #724

Open jhsenjaliya opened 4 years ago

jhsenjaliya commented 4 years ago

SchemaVersionLifecycleManager has all the required info but its not passed down to all SchemaProviders methods. some schema type like proto may require to have the schemaName or syntaxType while parsing or creating schema object internally. so its good to make such metadata accessible to schemaProvider.

some more context: currently all methods within SchemaProvider are treated as kind of static methods where raw schema string are passed and its parsed and schema object or respective kind ( avro or proto or others) will be created on the fly to be able to perform the actual function ( like generateFields or checkCompatibility, etc...) The above problems are surfaced when any of the methods requires access to additional metadata other than just the raw schemaText hope this explains the issue and it make sense.