Skip to content

Commit

Permalink
Libs(ruby): expose patch endpoints (#1264)
Browse files Browse the repository at this point in the history
<!--
Thank you for your Pull Request. Please provide a description above and
review
the requirements below.

Bug fixes and new features should include tests.
-->

## Motivation

<!--
Explain the context and why you're making that change. What is the
problem
you're trying to solve? If a new feature is being added, describe the
intended
use case that feature fulfills.
-->

I've noticed that the `patch` endpoints, which were introduced back in
[v1.6.0](https://github.com/svix/svix-webhooks/releases/tag/v1.6.0),
aren't currently exposed in the way they should be. This omission can
lead to errors when users attempt to utilize these `patch` endpoints,
particularly when building request bodies for endpoint resources. A case
in point is the `Svix::EndpointPatch` error, which serves as an
illustrative example of the underlying issue:

```
irb(main):001:0> Svix::EndpointPatch.new({})
(irb):1:in `<main>': uninitialized constant Svix::EndpointPatch (NameError)

Svix::EndpointPatch.new({})
    ^^^^^^^^^^^^^^^
Did you mean?  Svix::EndpointUpdate
               Svix::EndpointOut
               Svix::EndpointAPI
```

## Solution

<!--
Summarize the solution and provide any necessary context needed to
understand
the code change.
-->

To address this issue, I propose to expose the `patch` endpoints within
the `ruby/lib/svix.rb` file.
  • Loading branch information
svix-onelson authored Mar 13, 2024
2 parents 77c419c + 88d122e commit 6c99a0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ruby/lib/svix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
require "svix/models/app_portal_access_out"
require "svix/models/application_in"
require "svix/models/application_out"
require "svix/models/application_patch"
require "svix/models/dashboard_access_out"
require "svix/models/endpoint_created_event_data"
require "svix/models/endpoint_created_event"
Expand All @@ -37,13 +38,15 @@
require "svix/models/endpoint_update"
require "svix/models/endpoint_updated_event_data"
require "svix/models/endpoint_updated_event"
require "svix/models/endpoint_patch"
require "svix/models/event_example_in"
require "svix/models/event_type_import_open_api_in"
require "svix/models/event_type_import_open_api_out"
require "svix/models/event_type_import_open_api_out_data"
require "svix/models/event_type_in"
require "svix/models/event_type_out"
require "svix/models/event_type_update"
require "svix/models/event_type_patch"
require "svix/models/http_error_out"
require "svix/models/http_validation_error"
require "svix/models/integration_in"
Expand Down

0 comments on commit 6c99a0c

Please sign in to comment.