Skip to content
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

pkg/sr: update for new APIs and to be forward compatible #548

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Conversation

twmb
Copy link
Owner

@twmb twmb commented Aug 29, 2023

With an HTTP API, the API can add query parameters periodically, any addition of which breaks a Go API where all query parameters are spelled out as method arguments.

Now, we have moved all query parameters into values in a context, and added a helper sr.WithParams to make it easy to build parameters. All APIs document which parameters they support. We also have global parameters on the client itself, if you always want to show deleted or something.

This also adds metadata and ruleset to the schema type, even though the validation of these is really only possible in the Java client (as documented via limitations).

Lastly, this adds support for a few missing APIs:

  • SubjectsByID
  • SchemaVersionsByID
  • SubjectVersions
  • SchemaTextByVersion
  • AllSchemas

This breaks all CompatibilityLevel APIs, since the compatibility level stuff has been expanded to a whole bunch of compatibility / configuration settings. Namely, we just drop the "Level".

This breaks all APIs that had ShowHideDeleted arguments, favoring instead the new ShowDeleted Param.

We keep the DeleteHow param, because it is important at call sites to see that you are using hard deletion.

With an HTTP API, the API can add query parameters periodically, any
addition of which breaks a Go API where all query parameters are spelled
out as method arguments.

Now, we have moved all query parameters into values in a context, and
added a helper sr.WithParams to make it easy to build parameters. All
APIs document which parameters they support. We also have global
parameters on the client itself, if you always want to show deleted or
something.

This also adds metadata and ruleset to the schema type, even though
the validation of these is really only possible in the Java client (as
documented via limitations).

Lastly, this adds support for a few missing APIs:
* SubjectsByID
* SchemaVersionsByID
* SubjectVersions
* SchemaTextByVersion
* AllSchemas

This breaks all CompatibilityLevel APIs, since the compatibility level
stuff has been expanded to a whole bunch of compatibility /
configuration settings. Namely, we just drop the "Level".

This breaks all APIs that had ShowHideDeleted arguments, favoring
instead the new ShowDeleted Param.

We keep the DeleteHow param, because it is important at call sites to
see that you are using hard deletion.
@twmb twmb mentioned this pull request Aug 29, 2023
@twmb twmb merged commit 4ad9ea5 into master Aug 31, 2023
6 checks passed
@twmb twmb deleted the sr_updates branch August 31, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant