Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc 0.4.0 ., Speakeasy CLI 1.332.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Jul 12, 2024
1 parent 6030aa0 commit bc4c2aa
Show file tree
Hide file tree
Showing 19 changed files with 265 additions and 13 deletions.
18 changes: 13 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: f5719c92-1297-4aa0-bc5f-37116859d1e3
management:
docChecksum: f5cf06d8d5f2ec68226ab161d7a73cba
docChecksum: 638dbecd668cc1d7818c3b5aefd2d3e1
docVersion: 0.4.0 .
speakeasyVersion: 1.331.0
generationVersion: 2.365.0
releaseVersion: 4.2.11
configChecksum: 0cb11c6e585150ad6e89e8e5988f0380
speakeasyVersion: 1.332.1
generationVersion: 2.366.1
releaseVersion: 4.2.12
configChecksum: b52068dd46ae167fdcc67c6034e39cfe
repoURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby.git
repoSubDirectory: .
installationURL: https://github.com/speakeasy-api/speakeasy-client-sdk-ruby
Expand All @@ -33,6 +33,7 @@ generatedFiles:
- lib/speakeasy_client_sdk/github.rb
- lib/speakeasy_client_sdk/organizations.rb
- lib/speakeasy_client_sdk/reports.rb
- lib/speakeasy_client_sdk/shorturls.rb
- lib/speakeasy_client_sdk/suggest.rb
- lib/speakeasy_client_sdk/embeds.rb
- lib/speakeasy_client_sdk/events.rb
Expand Down Expand Up @@ -191,6 +192,8 @@ generatedFiles:
- lib/speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb
- lib/speakeasy_client_sdk/models/operations/uploadreport_uploadedreport.rb
- lib/speakeasy_client_sdk/models/operations/uploadreport_response.rb
- lib/speakeasy_client_sdk/models/operations/create_requestbody.rb
- lib/speakeasy_client_sdk/models/operations/create_response.rb
- lib/speakeasy_client_sdk/models/operations/applyoperationids_requestbody.rb
- lib/speakeasy_client_sdk/models/operations/applyoperationids_request.rb
- lib/speakeasy_client_sdk/models/operations/applyoperationids_response.rb
Expand Down Expand Up @@ -273,6 +276,7 @@ generatedFiles:
- lib/speakeasy_client_sdk/models/shared/organization.rb
- lib/speakeasy_client_sdk/models/shared/type.rb
- lib/speakeasy_client_sdk/models/shared/report.rb
- lib/speakeasy_client_sdk/models/shared/shorturl.rb
- lib/speakeasy_client_sdk/models/shared/suggestedoperationids.rb
- lib/speakeasy_client_sdk/models/shared/depth_style.rb
- lib/speakeasy_client_sdk/models/shared/style.rb
Expand Down Expand Up @@ -394,6 +398,8 @@ generatedFiles:
- docs/models/operations/uploadreportrequestbody.md
- docs/models/operations/uploadreportuploadedreport.md
- docs/models/operations/uploadreportresponse.md
- docs/models/operations/createrequestbody.md
- docs/models/operations/createresponse.md
- docs/models/operations/applyoperationidsrequestbody.md
- docs/models/operations/applyoperationidsrequest.md
- docs/models/operations/applyoperationidsresponse.md
Expand Down Expand Up @@ -476,6 +482,7 @@ generatedFiles:
- docs/models/shared/organization.md
- docs/models/shared/type.md
- docs/models/shared/report.md
- docs/models/shared/shorturl.md
- docs/models/shared/suggestedoperationids.md
- docs/models/shared/depthstyle.md
- docs/models/shared/style.md
Expand All @@ -499,6 +506,7 @@ generatedFiles:
- docs/sdks/github/README.md
- docs/sdks/organizations/README.md
- docs/sdks/reports/README.md
- docs/sdks/shorturls/README.md
- docs/sdks/suggest/README.md
- docs/sdks/embeds/README.md
- docs/sdks/events/README.md
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
speakeasy_client_sdk_ruby (4.2.11)
speakeasy_client_sdk_ruby (4.2.12)
faraday
faraday-multipart
rack
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ end
* [get_linting_report_signed_url](docs/sdks/reports/README.md#get_linting_report_signed_url) - Get the signed access url for the linting reports for a particular document.
* [upload_report](docs/sdks/reports/README.md#upload_report) - Upload a report.

### [ShortURLs](docs/sdks/shorturls/README.md)

* [create](docs/sdks/shorturls/README.md#create) - Shorten a URL.

### [Suggest](docs/sdks/suggest/README.md)

* [apply_operation_i_ds](docs/sdks/suggest/README.md#apply_operation_i_ds) - Apply operation ID suggestions and download result.
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,4 +988,14 @@ Based on:
### Generated
- [ruby v4.2.11] .
### Releases
- [Ruby Gems v4.2.11] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.2.11 - .
- [Ruby Gems v4.2.11] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.2.11 - .

## 2024-07-12 00:03:13
### Changes
Based on:
- OpenAPI Doc 0.4.0 . https://docs.speakeasyapi.dev/openapi.yaml
- Speakeasy CLI 1.332.1 (2.366.1) https://github.com/speakeasy-api/speakeasy
### Generated
- [ruby v4.2.12] .
### Releases
- [Ruby Gems v4.2.12] https://rubygems.org/gems/speakeasy_client_sdk_ruby/versions/4.2.12 - .
8 changes: 8 additions & 0 deletions docs/models/operations/createrequestbody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CreateRequestBody


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `url` | *::String* | :heavy_check_mark: | URL to shorten |
11 changes: 11 additions & 0 deletions docs/models/operations/createresponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CreateResponse


## Fields

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ |
| `content_type` | *::String* | :heavy_check_mark: | HTTP response content type for this operation |
| `short_url` | [T.nilable(::SpeakeasyClientSDK::Shared::ShortURL)](../../models/shared/shorturl.md) | :heavy_minus_sign: | OK |
| `status_code` | *::Integer* | :heavy_check_mark: | HTTP response status code for this operation |
| `raw_response` | [Faraday::Response](https://www.rubydoc.info/gems/faraday/Faraday/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
9 changes: 9 additions & 0 deletions docs/models/shared/shorturl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ShortURL


## Fields

| Field | Type | Required | Description |
| ------------------ | ------------------ | ------------------ | ------------------ |
| `full_url` | *::String* | :heavy_check_mark: | N/A |
| `short_url` | *::String* | :heavy_check_mark: | N/A |
52 changes: 52 additions & 0 deletions docs/sdks/shorturls/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# ShortURLs


## Overview

REST APIs for managing short URLs

### Available Operations

* [create](#create) - Shorten a URL.

## create

Shorten a URL.

### Example Usage

```ruby
require 'speakeasy_client_sdk_ruby'


s = ::SpeakeasyClientSDK::SDK.new
s.config_security(
::SpeakeasyClientSDK::Shared::Security.new(
api_key: "<YOUR_API_KEY_HERE>",
)
)


req = ::SpeakeasyClientSDK::Operations::CreateRequestBody.new(
url: "http://limp-pastry.org",
)

res = s.short_ur_ls.create(req)

if ! res.short_url.nil?
# handle response
end

```

### Parameters

| Parameter | Type | Required | Description |
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `request` | [::SpeakeasyClientSDK::Operations::CreateRequestBody](../../models/operations/createrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |


### Response

**[T.nilable(::SpeakeasyClientSDK::Operations::CreateResponse)](../../models/operations/createresponse.md)**

2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
ruby:
version: 4.2.11
version: 4.2.12
author: Speakeasy
description: Ruby Client SDK Generated by Speakeasy
imports:
Expand Down
2 changes: 2 additions & 0 deletions lib/speakeasy_client_sdk/models/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ module Operations
autoload :UploadReportRequestBody, 'speakeasy_client_sdk/models/operations/uploadreport_requestbody.rb'
autoload :UploadReportUploadedReport, 'speakeasy_client_sdk/models/operations/uploadreport_uploadedreport.rb'
autoload :UploadReportResponse, 'speakeasy_client_sdk/models/operations/uploadreport_response.rb'
autoload :CreateRequestBody, 'speakeasy_client_sdk/models/operations/create_requestbody.rb'
autoload :CreateResponse, 'speakeasy_client_sdk/models/operations/create_response.rb'
autoload :ApplyOperationIDsRequestBody, 'speakeasy_client_sdk/models/operations/applyoperationids_requestbody.rb'
autoload :ApplyOperationIDsRequest, 'speakeasy_client_sdk/models/operations/applyoperationids_request.rb'
autoload :ApplyOperationIDsResponse, 'speakeasy_client_sdk/models/operations/applyoperationids_response.rb'
Expand Down
24 changes: 24 additions & 0 deletions lib/speakeasy_client_sdk/models/operations/create_requestbody.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true


module SpeakeasyClientSDK
module Operations


class CreateRequestBody < ::SpeakeasyClientSDK::Utils::FieldAugmented
extend T::Sig

# URL to shorten
field :url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('url') } }


sig { params(url: ::String).void }
def initialize(url: nil)
@url = url
end
end
end
end
33 changes: 33 additions & 0 deletions lib/speakeasy_client_sdk/models/operations/create_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true


module SpeakeasyClientSDK
module Operations


class CreateResponse < ::SpeakeasyClientSDK::Utils::FieldAugmented
extend T::Sig

# HTTP response content type for this operation
field :content_type, ::String
# Raw HTTP response; suitable for custom response parsing
field :raw_response, ::Faraday::Response
# HTTP response status code for this operation
field :status_code, ::Integer
# OK
field :short_url, T.nilable(::SpeakeasyClientSDK::Shared::ShortURL)


sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, short_url: T.nilable(::SpeakeasyClientSDK::Shared::ShortURL)).void }
def initialize(content_type: nil, raw_response: nil, status_code: nil, short_url: nil)
@content_type = content_type
@raw_response = raw_response
@status_code = status_code
@short_url = short_url
end
end
end
end
1 change: 1 addition & 0 deletions lib/speakeasy_client_sdk/models/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module Shared
autoload :Organization, 'speakeasy_client_sdk/models/shared/organization.rb'
autoload :Type, 'speakeasy_client_sdk/models/shared/type.rb'
autoload :Report, 'speakeasy_client_sdk/models/shared/report.rb'
autoload :ShortURL, 'speakeasy_client_sdk/models/shared/shorturl.rb'
autoload :SuggestedOperationIDs, 'speakeasy_client_sdk/models/shared/suggestedoperationids.rb'
autoload :DepthStyle, 'speakeasy_client_sdk/models/shared/depth_style.rb'
autoload :Style, 'speakeasy_client_sdk/models/shared/style.rb'
Expand Down
27 changes: 27 additions & 0 deletions lib/speakeasy_client_sdk/models/shared/shorturl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true


module SpeakeasyClientSDK
module Shared


class ShortURL < ::SpeakeasyClientSDK::Utils::FieldAugmented
extend T::Sig


field :full_url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('full_url') } }

field :short_url, ::String, { 'format_json': { 'letter_case': ::SpeakeasyClientSDK::Utils.field_name('short_url') } }


sig { params(full_url: ::String, short_url: ::String).void }
def initialize(full_url: nil, short_url: nil)
@full_url = full_url
@short_url = short_url
end
end
end
end
3 changes: 2 additions & 1 deletion lib/speakeasy_client_sdk/sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module SpeakeasyClientSDK
class SDK
extend T::Sig

attr_accessor :apis, :api_endpoints, :metadata, :schemas, :artifacts, :auth, :requests, :github, :organizations, :reports, :suggest, :embeds, :events
attr_accessor :apis, :api_endpoints, :metadata, :schemas, :artifacts, :auth, :requests, :github, :organizations, :reports, :short_ur_ls, :suggest, :embeds, :events

sig do
params(client: Faraday::Request,
Expand Down Expand Up @@ -99,6 +99,7 @@ def init_sdks
@github = Github.new(@sdk_configuration)
@organizations = Organizations.new(@sdk_configuration)
@reports = Reports.new(@sdk_configuration)
@short_ur_ls = ShortURLs.new(@sdk_configuration)
@suggest = Suggest.new(@sdk_configuration)
@embeds = Embeds.new(@sdk_configuration)
@events = Events.new(@sdk_configuration)
Expand Down
6 changes: 3 additions & 3 deletions lib/speakeasy_client_sdk/sdkconfiguration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def initialize(client, security, server_url, server, globals)
@globals = globals.nil? ? {} : globals
@language = 'ruby'
@openapi_doc_version = '0.4.0 .'
@sdk_version = '4.2.11'
@gen_version = '2.365.0'
@user_agent = 'speakeasy-sdk/ruby 4.2.11 2.365.0 0.4.0 . speakeasy_client_sdk_ruby'
@sdk_version = '4.2.12'
@gen_version = '2.366.1'
@user_agent = 'speakeasy-sdk/ruby 4.2.12 2.366.1 0.4.0 . speakeasy_client_sdk_ruby'
end

sig { returns([String, T::Hash[Symbol, String]]) }
Expand Down
61 changes: 61 additions & 0 deletions lib/speakeasy_client_sdk/shorturls.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

# typed: true
# frozen_string_literal: true

require 'faraday'
require 'faraday/multipart'
require 'sorbet-runtime'

module SpeakeasyClientSDK
extend T::Sig
class ShortURLs
extend T::Sig
# REST APIs for managing short URLs

sig { params(sdk_config: SDKConfiguration).void }
def initialize(sdk_config)
@sdk_configuration = sdk_config
end


sig { params(request: ::SpeakeasyClientSDK::Operations::CreateRequestBody).returns(::SpeakeasyClientSDK::Operations::CreateResponse) }
def create(request)
# create - Shorten a URL.
url, params = @sdk_configuration.get_server_details
base_url = Utils.template_url(url, params)
url = "#{base_url}/v1/short_urls"
headers = {}
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
headers['content-type'] = req_content_type
raise StandardError, 'request body is required' if data.nil? && form.nil?
headers['Accept'] = 'application/json'
headers['user-agent'] = @sdk_configuration.user_agent

r = @sdk_configuration.client.post(url) do |req|
req.headers = headers
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
if form
req.body = Utils.encode_form(form)
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
req.body = URI.encode_www_form(data)
else
req.body = data
end
end

content_type = r.headers.fetch('Content-Type', 'application/octet-stream')

res = ::SpeakeasyClientSDK::Operations::CreateResponse.new(
status_code: r.status, content_type: content_type, raw_response: r
)
if r.status == 200
if Utils.match_content_type(content_type, 'application/json')
out = Utils.unmarshal_complex(r.env.response_body, ::SpeakeasyClientSDK::Shared::ShortURL)
res.short_url = out
end
end
res
end
end
end
Loading

0 comments on commit bc4c2aa

Please sign in to comment.