signwell_sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.yml +53 -0
- data/.github/ISSUE_TEMPLATE/config.yml +5 -0
- data/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
- data/.github/pull_request_template.md +39 -0
- data/.github/workflows/ci.yml +45 -0
- data/.github/workflows/generator-ownership.yml +53 -0
- data/.github/workflows/manual-release.yml +64 -0
- data/.github/workflows/release.yml +69 -0
- data/.gitignore +39 -0
- data/.release-please-manifest.json +3 -0
- data/.rspec +2 -0
- data/.rubocop.yml +200 -0
- data/CONTRIBUTING.md +13 -0
- data/Gemfile.lock +15 -25
- data/README.md +82 -6
- data/docs/{APIApplicationApi.md → ApiApplicationApi.md} +9 -9
- data/docs/BulkSendApi.md +4 -4
- data/docs/DocumentApi.md +7 -5
- data/docs/DocumentFromTemplateResponse.md +1 -1
- data/docs/DocumentFromTemplateResponseFieldsInnerInner.md +2 -0
- data/docs/DocumentResponse.md +1 -1
- data/docs/DocumentResponseFieldsInnerInner.md +2 -0
- data/docs/FileInfo.md +1 -1
- data/docs/RegionalApi.md +4 -4
- data/docs/TemplateApi.md +3 -1
- data/docs/WebhookResponse.md +0 -2
- data/lib/signwell_sdk/api/api_application_api.rb +36 -40
- data/lib/signwell_sdk/api/bulk_send_api.rb +117 -111
- data/lib/signwell_sdk/api/document_api.rb +239 -150
- data/lib/signwell_sdk/api/me_api.rb +21 -20
- data/lib/signwell_sdk/api/regional_api.rb +48 -29
- data/lib/signwell_sdk/api/template_api.rb +117 -85
- data/lib/signwell_sdk/api/webhooks_api.rb +50 -46
- data/lib/signwell_sdk/api_client.rb +251 -92
- data/lib/signwell_sdk/api_error.rb +142 -17
- data/lib/signwell_sdk/configuration.rb +43 -53
- data/lib/signwell_sdk/{embedded → extras/embedded}/railtie.rb +2 -0
- data/lib/signwell_sdk/extras/embedded/view_helpers.rb +281 -0
- data/lib/signwell_sdk/{embedded.rb → extras/embedded.rb} +96 -54
- data/lib/signwell_sdk/extras/webhook.rb +257 -0
- data/lib/signwell_sdk/models/account_info_response.rb +110 -85
- data/lib/signwell_sdk/models/account_info_response_active_users_inner.rb +80 -60
- data/lib/signwell_sdk/models/account_info_response_preferences.rb +112 -102
- data/lib/signwell_sdk/models/additional_fields_inner_inner.rb +227 -145
- data/lib/signwell_sdk/models/additional_fields_inner_inner_value.rb +25 -23
- data/lib/signwell_sdk/models/additional_files_inner.rb +58 -52
- data/lib/signwell_sdk/models/api_application_response.rb +91 -72
- data/lib/signwell_sdk/models/api_application_response_owner.rb +80 -58
- data/lib/signwell_sdk/models/api_application_response_preferences.rb +67 -62
- data/lib/signwell_sdk/models/attachment_request_info.rb +66 -52
- data/lib/signwell_sdk/models/attachment_requests_inner.rb +68 -56
- data/lib/signwell_sdk/models/bulk_send_create_response.rb +110 -77
- data/lib/signwell_sdk/models/bulk_send_csv_request.rb +54 -48
- data/lib/signwell_sdk/models/bulk_send_csv_template_response.rb +46 -42
- data/lib/signwell_sdk/models/bulk_send_documents_response.rb +146 -102
- data/lib/signwell_sdk/models/bulk_send_list_item.rb +147 -97
- data/lib/signwell_sdk/models/bulk_send_list_response.rb +99 -72
- data/lib/signwell_sdk/models/bulk_send_response.rb +125 -91
- data/lib/signwell_sdk/models/bulk_send_response_templates_inner.rb +60 -48
- data/lib/signwell_sdk/models/bulk_send_validate_csv_response.rb +91 -77
- data/lib/signwell_sdk/models/checkbox_group_info.rb +111 -85
- data/lib/signwell_sdk/models/checkbox_groups_inner.rb +105 -82
- data/lib/signwell_sdk/models/checkbox_validation.rb +15 -16
- data/lib/signwell_sdk/models/completed_pdf_response.rb +24 -22
- data/lib/signwell_sdk/models/completed_pdf_url_response.rb +46 -42
- data/lib/signwell_sdk/models/copied_contact_info.rb +58 -50
- data/lib/signwell_sdk/models/copied_contacts_inner.rb +52 -46
- data/lib/signwell_sdk/models/copied_placeholders_inner.rb +57 -53
- data/lib/signwell_sdk/models/create_bulk_send_request.rb +107 -92
- data/lib/signwell_sdk/models/create_webhook_request.rb +52 -48
- data/lib/signwell_sdk/models/date_format.rb +16 -17
- data/lib/signwell_sdk/models/detailed_option.rb +60 -54
- data/lib/signwell_sdk/models/document_from_template_request.rb +266 -223
- data/lib/signwell_sdk/models/document_from_template_response.rb +291 -214
- data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner.rb +226 -139
- data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.rb +66 -54
- data/lib/signwell_sdk/models/document_from_template_response_recipients_inner.rb +153 -121
- data/lib/signwell_sdk/models/document_list_response.rb +99 -72
- data/lib/signwell_sdk/models/document_request.rb +251 -214
- data/lib/signwell_sdk/models/document_response.rb +293 -216
- data/lib/signwell_sdk/models/document_response_attachment_requests_inner.rb +66 -54
- data/lib/signwell_sdk/models/document_response_fields_inner_inner.rb +226 -139
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_options_inner.rb +51 -49
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_recipient.rb +60 -48
- data/lib/signwell_sdk/models/document_response_fields_inner_inner_value.rb +25 -23
- data/lib/signwell_sdk/models/document_response_recipients_inner.rb +156 -120
- data/lib/signwell_sdk/models/document_template_list_response.rb +99 -72
- data/lib/signwell_sdk/models/document_template_request.rb +199 -166
- data/lib/signwell_sdk/models/document_template_response.rb +240 -181
- data/lib/signwell_sdk/models/document_template_response_copied_placeholders_inner.rb +83 -72
- data/lib/signwell_sdk/models/document_template_response_placeholders_inner.rb +90 -80
- data/lib/signwell_sdk/models/document_template_update_request.rb +142 -125
- data/lib/signwell_sdk/models/dropdown_option.rb +24 -22
- data/lib/signwell_sdk/models/error_response.rb +45 -45
- data/lib/signwell_sdk/models/error_response_meta.rb +67 -55
- data/lib/signwell_sdk/models/field_type.rb +27 -29
- data/lib/signwell_sdk/models/fields_inner_inner.rb +221 -141
- data/lib/signwell_sdk/models/file_format.rb +13 -14
- data/lib/signwell_sdk/models/file_info.rb +53 -57
- data/lib/signwell_sdk/models/files_inner.rb +58 -52
- data/lib/signwell_sdk/models/label_info.rb +45 -45
- data/lib/signwell_sdk/models/label_request.rb +46 -42
- data/lib/signwell_sdk/models/label_response.rb +52 -46
- data/lib/signwell_sdk/models/me_response.rb +122 -76
- data/lib/signwell_sdk/models/me_response_contact.rb +114 -85
- data/lib/signwell_sdk/models/me_response_user.rb +92 -68
- data/lib/signwell_sdk/models/me_response_user_preferences.rb +51 -49
- data/lib/signwell_sdk/models/nom151_certificate_response.rb +46 -42
- data/lib/signwell_sdk/models/nom151_certificate_response_nom151.rb +138 -82
- data/lib/signwell_sdk/models/nom151_url_response.rb +46 -42
- data/lib/signwell_sdk/models/pagination_meta.rb +88 -65
- data/lib/signwell_sdk/models/placeholders_inner.rb +71 -59
- data/lib/signwell_sdk/models/rate_limit_error_response.rb +46 -42
- data/lib/signwell_sdk/models/recipients_inner.rb +100 -80
- data/lib/signwell_sdk/models/reminder_recipients_inner.rb +45 -45
- data/lib/signwell_sdk/models/send_reminder_request.rb +40 -42
- data/lib/signwell_sdk/models/template_attachment_requests_inner.rb +65 -55
- data/lib/signwell_sdk/models/template_checkbox_groups_inner.rb +102 -81
- data/lib/signwell_sdk/models/template_field_values_inner.rb +60 -48
- data/lib/signwell_sdk/models/template_field_values_inner_value.rb +25 -23
- data/lib/signwell_sdk/models/template_fields_inner_inner.rb +218 -140
- data/lib/signwell_sdk/models/template_recipients_inner.rb +106 -84
- data/lib/signwell_sdk/models/text_validation.rb +23 -25
- data/lib/signwell_sdk/models/update_document_and_send_request.rb +170 -149
- data/lib/signwell_sdk/models/update_recipients_map_inner.rb +92 -68
- data/lib/signwell_sdk/models/update_recipients_request.rb +43 -43
- data/lib/signwell_sdk/models/validation_error_response.rb +43 -43
- data/lib/signwell_sdk/models/webhook_response.rb +68 -66
- data/lib/signwell_sdk/version.rb +1 -1
- data/lib/signwell_sdk.rb +17 -13
- data/openapi.yaml +425 -415
- data/signwell_sdk.gemspec +25 -6
- data/spec/api/api_application_api_spec.rb +16 -14
- data/spec/api/bulk_send_api_spec.rb +14 -14
- data/spec/api/document_api_spec.rb +17 -21
- data/spec/api/me_api_spec.rb +13 -11
- data/spec/api/regional_api_spec.rb +14 -12
- data/spec/api/template_api_spec.rb +13 -13
- data/spec/api/webhooks_api_spec.rb +13 -11
- data/spec/models/account_info_response_active_users_inner_spec.rb +12 -11
- data/spec/models/account_info_response_preferences_spec.rb +12 -11
- data/spec/models/account_info_response_spec.rb +12 -11
- data/spec/models/additional_fields_inner_inner_spec.rb +12 -11
- data/spec/models/additional_fields_inner_inner_value_spec.rb +10 -10
- data/spec/models/additional_files_inner_spec.rb +12 -11
- data/spec/models/api_application_response_owner_spec.rb +12 -11
- data/spec/models/api_application_response_preferences_spec.rb +12 -11
- data/spec/models/api_application_response_spec.rb +11 -10
- data/spec/models/attachment_request_info_spec.rb +12 -11
- data/spec/models/attachment_requests_inner_spec.rb +12 -11
- data/spec/models/bulk_send_create_response_spec.rb +11 -10
- data/spec/models/bulk_send_csv_request_spec.rb +12 -11
- data/spec/models/bulk_send_csv_template_response_spec.rb +12 -11
- data/spec/models/bulk_send_documents_response_spec.rb +12 -11
- data/spec/models/bulk_send_list_item_spec.rb +12 -11
- data/spec/models/bulk_send_list_response_spec.rb +11 -10
- data/spec/models/bulk_send_response_spec.rb +12 -11
- data/spec/models/bulk_send_response_templates_inner_spec.rb +12 -11
- data/spec/models/bulk_send_validate_csv_response_spec.rb +11 -10
- data/spec/models/checkbox_group_info_spec.rb +12 -11
- data/spec/models/checkbox_groups_inner_spec.rb +11 -10
- data/spec/models/checkbox_validation_spec.rb +11 -10
- data/spec/models/completed_pdf_response_spec.rb +10 -10
- data/spec/models/completed_pdf_url_response_spec.rb +12 -11
- data/spec/models/copied_contact_info_spec.rb +12 -11
- data/spec/models/copied_contacts_inner_spec.rb +12 -11
- data/spec/models/copied_placeholders_inner_spec.rb +12 -11
- data/spec/models/create_bulk_send_request_spec.rb +12 -11
- data/spec/models/create_webhook_request_spec.rb +12 -11
- data/spec/models/date_format_spec.rb +11 -10
- data/spec/models/detailed_option_spec.rb +12 -11
- data/spec/models/document_from_template_request_spec.rb +12 -11
- data/spec/models/document_from_template_response_fields_inner_inner_recipient_spec.rb +12 -11
- data/spec/models/document_from_template_response_fields_inner_inner_spec.rb +18 -11
- data/spec/models/document_from_template_response_recipients_inner_spec.rb +12 -11
- data/spec/models/document_from_template_response_spec.rb +12 -11
- data/spec/models/document_list_response_spec.rb +11 -10
- data/spec/models/document_request_spec.rb +12 -11
- data/spec/models/document_response_attachment_requests_inner_spec.rb +12 -11
- data/spec/models/document_response_fields_inner_inner_options_inner_spec.rb +12 -11
- data/spec/models/document_response_fields_inner_inner_recipient_spec.rb +12 -11
- data/spec/models/document_response_fields_inner_inner_spec.rb +18 -11
- data/spec/models/document_response_fields_inner_inner_value_spec.rb +10 -10
- data/spec/models/document_response_recipients_inner_spec.rb +12 -11
- data/spec/models/document_response_spec.rb +12 -11
- data/spec/models/document_template_list_response_spec.rb +11 -10
- data/spec/models/document_template_request_spec.rb +12 -11
- data/spec/models/document_template_response_copied_placeholders_inner_spec.rb +11 -10
- data/spec/models/document_template_response_placeholders_inner_spec.rb +11 -10
- data/spec/models/document_template_response_spec.rb +12 -11
- data/spec/models/document_template_update_request_spec.rb +12 -11
- data/spec/models/dropdown_option_spec.rb +10 -10
- data/spec/models/error_response_meta_spec.rb +12 -11
- data/spec/models/error_response_spec.rb +12 -11
- data/spec/models/field_type_spec.rb +11 -10
- data/spec/models/fields_inner_inner_spec.rb +12 -11
- data/spec/models/file_format_spec.rb +11 -10
- data/spec/models/file_info_spec.rb +12 -11
- data/spec/models/files_inner_spec.rb +12 -11
- data/spec/models/label_info_spec.rb +12 -11
- data/spec/models/label_request_spec.rb +12 -11
- data/spec/models/label_response_spec.rb +12 -11
- data/spec/models/me_response_contact_spec.rb +12 -11
- data/spec/models/me_response_spec.rb +11 -10
- data/spec/models/me_response_user_preferences_spec.rb +12 -11
- data/spec/models/me_response_user_spec.rb +11 -10
- data/spec/models/nom151_certificate_response_nom151_spec.rb +11 -10
- data/spec/models/nom151_certificate_response_spec.rb +12 -11
- data/spec/models/nom151_url_response_spec.rb +12 -11
- data/spec/models/pagination_meta_spec.rb +12 -11
- data/spec/models/placeholders_inner_spec.rb +12 -11
- data/spec/models/rate_limit_error_response_spec.rb +12 -11
- data/spec/models/recipients_inner_spec.rb +11 -10
- data/spec/models/reminder_recipients_inner_spec.rb +12 -11
- data/spec/models/send_reminder_request_spec.rb +12 -11
- data/spec/models/template_attachment_requests_inner_spec.rb +12 -11
- data/spec/models/template_checkbox_groups_inner_spec.rb +11 -10
- data/spec/models/template_field_values_inner_spec.rb +12 -11
- data/spec/models/template_field_values_inner_value_spec.rb +10 -10
- data/spec/models/template_fields_inner_inner_spec.rb +12 -11
- data/spec/models/template_recipients_inner_spec.rb +12 -11
- data/spec/models/text_validation_spec.rb +11 -10
- data/spec/models/update_document_and_send_request_spec.rb +12 -11
- data/spec/models/update_recipients_map_inner_spec.rb +11 -10
- data/spec/models/update_recipients_request_spec.rb +12 -11
- data/spec/models/validation_error_response_spec.rb +12 -11
- data/spec/models/webhook_response_spec.rb +12 -17
- data/spec/regressions/api_client_spec.rb +481 -0
- data/spec/regressions/bulk_send_api_spec.rb +47 -0
- data/spec/regressions/embedded_spec.rb +263 -0
- data/spec/regressions/generated_resource_helpers_spec.rb +119 -0
- data/spec/regressions/response_modes_spec.rb +93 -0
- data/spec/regressions/view_helpers_spec.rb +202 -0
- data/spec/regressions/webhook_spec.rb +210 -0
- data/spec/spec_helper.rb +11 -12
- metadata +127 -91
- data/lib/signwell_sdk/embedded/view_helpers.rb +0 -132
- data/lib/signwell_sdk/webhook.rb +0 -109
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd4da9e3ef1dc963dfd7bfa01e6b144ba77bc2198d27d5a284fc4ed50181726a
|
|
4
|
+
data.tar.gz: a9624d3f48a656f44786247b760e91cc1e056a020e9c830bf5018c407cbdae21
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54aaa41737dbf226bf92e0baa7a694aa5b34c47784fbbdb942d7b34539c868eb818c199a075e494c2dff87a74bfeff9ee0049b8958b6aefa8ac2c2fe00f0b2fa
|
|
7
|
+
data.tar.gz: d357803aab80810b0c45f925e86ce3d2b660d4fa624c63925c5444b85664288b7082350a2b93c3f51be0f48e7ffac871d0e182685d0d7af0ca20d742f007f078
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a bug in the SignWell Ruby SDK
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description
|
|
9
|
+
description: What happened? What did you expect to happen?
|
|
10
|
+
placeholder: |
|
|
11
|
+
When I call `SignWell::Resources::Document.create(...)`, I get a NoMethodError...
|
|
12
|
+
validations:
|
|
13
|
+
required: true
|
|
14
|
+
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: reproduce
|
|
17
|
+
attributes:
|
|
18
|
+
label: Steps to reproduce
|
|
19
|
+
description: Minimal code example or steps to reproduce the issue.
|
|
20
|
+
placeholder: |
|
|
21
|
+
```ruby
|
|
22
|
+
client = SignWell::Client.new(api_key: "...")
|
|
23
|
+
client.documents.create(name: "Test", ...)
|
|
24
|
+
```
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
|
|
28
|
+
- type: input
|
|
29
|
+
id: sdk-version
|
|
30
|
+
attributes:
|
|
31
|
+
label: SDK version
|
|
32
|
+
description: "Output of: `Gem.loaded_specs['signwell_sdk'].version`"
|
|
33
|
+
placeholder: "0.1.0.pre.alpha.10"
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
|
|
37
|
+
- type: input
|
|
38
|
+
id: ruby-version
|
|
39
|
+
attributes:
|
|
40
|
+
label: Ruby version
|
|
41
|
+
description: "Output of: `ruby -v`"
|
|
42
|
+
placeholder: "ruby 3.3.0"
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
|
|
46
|
+
- type: textarea
|
|
47
|
+
id: stacktrace
|
|
48
|
+
attributes:
|
|
49
|
+
label: Error output / stacktrace
|
|
50
|
+
description: Paste any error messages or stack traces.
|
|
51
|
+
render: text
|
|
52
|
+
validations:
|
|
53
|
+
required: false
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest an improvement or new feature for the SDK
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: description
|
|
7
|
+
attributes:
|
|
8
|
+
label: Description
|
|
9
|
+
description: What would you like to see added or changed?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: use-case
|
|
15
|
+
attributes:
|
|
16
|
+
label: Use case
|
|
17
|
+
description: Why do you need this? What problem does it solve?
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: proposed-solution
|
|
23
|
+
attributes:
|
|
24
|
+
label: Proposed solution
|
|
25
|
+
description: If you have ideas on how this could work, describe them here.
|
|
26
|
+
validations:
|
|
27
|
+
required: false
|
|
28
|
+
|
|
29
|
+
- type: input
|
|
30
|
+
id: sdk-version
|
|
31
|
+
attributes:
|
|
32
|
+
label: SDK version
|
|
33
|
+
placeholder: "0.1.0.pre.alpha.10"
|
|
34
|
+
validations:
|
|
35
|
+
required: false
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
### Issue/Task associated
|
|
2
|
+
<!-- Link to GitHub issue, related task, or context -->
|
|
3
|
+
|
|
4
|
+
### Risk level: Low / Medium / High
|
|
5
|
+
<!-- High = changes to release workflows, version bumping, or public API surface -->
|
|
6
|
+
|
|
7
|
+
### Changes proposed on the PR
|
|
8
|
+
-
|
|
9
|
+
|
|
10
|
+
### Generator ownership
|
|
11
|
+
- [ ] If this PR changes generated SDK output, the source change also exists in the generator or is linked as an explicit follow-up
|
|
12
|
+
|
|
13
|
+
### Areas affected
|
|
14
|
+
<!-- Check all that apply -->
|
|
15
|
+
- [ ] Models (`lib/signwell_sdk/models/`)
|
|
16
|
+
- [ ] API resources (`lib/signwell_sdk/api/`)
|
|
17
|
+
- [ ] Core SDK (`lib/signwell_sdk.rb`, configuration, errors)
|
|
18
|
+
- [ ] Release scripts (`scripts/`)
|
|
19
|
+
- [ ] CI/CD workflows (`.github/workflows/`)
|
|
20
|
+
- [ ] Tests (`spec/`)
|
|
21
|
+
- [ ] Examples (`examples/`)
|
|
22
|
+
- [ ] Documentation (`docs/`, `README.md`)
|
|
23
|
+
- [ ] Other:
|
|
24
|
+
|
|
25
|
+
### What to test
|
|
26
|
+
#### Happy path
|
|
27
|
+
-
|
|
28
|
+
|
|
29
|
+
#### Edge cases / regression risk
|
|
30
|
+
-
|
|
31
|
+
|
|
32
|
+
### Test results
|
|
33
|
+
<!-- Paste output or confirm these passed -->
|
|
34
|
+
- [ ] Tests pass (`bundle exec rspec`)
|
|
35
|
+
- [ ] Linting passes (`bundle exec rubocop`)
|
|
36
|
+
- [ ] Generated-code changes were validated from a regenerated SDK, not only patched in-place
|
|
37
|
+
|
|
38
|
+
### Attachments
|
|
39
|
+
<!-- Screenshots, diff snippets, etc. -->
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
16
|
+
faraday-version: ['1', '2']
|
|
17
|
+
exclude:
|
|
18
|
+
- ruby-version: '4.0'
|
|
19
|
+
faraday-version: '1'
|
|
20
|
+
name: Ruby ${{ matrix.ruby-version }} / Faraday ${{ matrix.faraday-version }}
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: '20'
|
|
27
|
+
|
|
28
|
+
- name: Start Prism mock server
|
|
29
|
+
run: |
|
|
30
|
+
npm ci
|
|
31
|
+
npx @stoplight/prism-cli mock openapi.yaml -p 4010 > /tmp/prism.log 2>&1 &
|
|
32
|
+
tail -f /tmp/prism.log | grep -qm1 "Prism is listening"
|
|
33
|
+
|
|
34
|
+
- uses: ruby/setup-ruby@v1
|
|
35
|
+
with:
|
|
36
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
37
|
+
bundler-cache: true
|
|
38
|
+
env:
|
|
39
|
+
BUNDLE_GEMFILE: gemfiles/faraday_${{ matrix.faraday-version }}.gemfile
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: bundle exec rake spec
|
|
43
|
+
env:
|
|
44
|
+
BUNDLE_GEMFILE: gemfiles/faraday_${{ matrix.faraday-version }}.gemfile
|
|
45
|
+
PRISM_URL: http://localhost:4010
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Generator Ownership
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
orchestrated-paths:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
|
|
17
|
+
- name: Require generator reference for orchestrated files
|
|
18
|
+
env:
|
|
19
|
+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
20
|
+
HEAD_SHA: ${{ github.sha }}
|
|
21
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
22
|
+
PR_BODY: ${{ github.event.pull_request.body }}
|
|
23
|
+
run: |
|
|
24
|
+
set -euo pipefail
|
|
25
|
+
|
|
26
|
+
changed="$(git diff --name-only "$BASE_SHA" "$HEAD_SHA" -- \
|
|
27
|
+
README.md \
|
|
28
|
+
CONTRIBUTING.md \
|
|
29
|
+
Gemfile \
|
|
30
|
+
Rakefile \
|
|
31
|
+
signwell_sdk.gemspec \
|
|
32
|
+
openapi.yaml \
|
|
33
|
+
.rubocop.yml \
|
|
34
|
+
.rspec \
|
|
35
|
+
lib/ \
|
|
36
|
+
spec/ \
|
|
37
|
+
docs/ \
|
|
38
|
+
gemfiles/ || true)"
|
|
39
|
+
|
|
40
|
+
if [ -z "$changed" ]; then
|
|
41
|
+
exit 0
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
reference_text="${PR_TITLE}
|
|
45
|
+
${PR_BODY:-}"
|
|
46
|
+
if printf '%s\n' "$reference_text" | grep -Eiq 'Bidsketch/signwell-sdk-generator|signwell-sdk-generator|generator PR|generator source|generated from'; then
|
|
47
|
+
exit 0
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
echo "::error::This PR changes generator-owned SDK paths but does not reference signwell-sdk-generator in the PR title or body."
|
|
51
|
+
echo "Changed generator-owned paths:"
|
|
52
|
+
echo "$changed"
|
|
53
|
+
exit 1
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
name: Manual Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- pre
|
|
12
|
+
- patch
|
|
13
|
+
- minor
|
|
14
|
+
- major
|
|
15
|
+
- preminor
|
|
16
|
+
- premajor
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
create-release-pr:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
pull-requests: write
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
with:
|
|
27
|
+
ref: main
|
|
28
|
+
|
|
29
|
+
- name: Bump version
|
|
30
|
+
id: bump
|
|
31
|
+
run: |
|
|
32
|
+
NEW_VERSION=$(scripts/bump-version.sh "${{ inputs.bump }}" \
|
|
33
|
+
--file lib/signwell_sdk/version.rb \
|
|
34
|
+
--pattern "VERSION\s*=\s*'([^']+)'" \
|
|
35
|
+
--replace "s/VERSION = '.*'/VERSION = '%s'/")
|
|
36
|
+
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
|
|
37
|
+
echo "New version: $NEW_VERSION"
|
|
38
|
+
|
|
39
|
+
- name: Create PR
|
|
40
|
+
env:
|
|
41
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
42
|
+
run: |
|
|
43
|
+
VERSION="${{ steps.bump.outputs.version }}"
|
|
44
|
+
BRANCH="release/v$VERSION"
|
|
45
|
+
git config user.name "github-actions[bot]"
|
|
46
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
47
|
+
git checkout -b "$BRANCH"
|
|
48
|
+
git add lib/signwell_sdk/version.rb
|
|
49
|
+
git commit -m "chore: release $VERSION"
|
|
50
|
+
git push -u --force origin "$BRANCH"
|
|
51
|
+
|
|
52
|
+
gh pr create \
|
|
53
|
+
--base main \
|
|
54
|
+
--head "$BRANCH" \
|
|
55
|
+
--title "chore: release $VERSION" \
|
|
56
|
+
--body "$(cat <<EOF
|
|
57
|
+
## Release v$VERSION
|
|
58
|
+
|
|
59
|
+
- Bump type: \`${{ inputs.bump }}\`
|
|
60
|
+
- Updates \`lib/signwell_sdk/version.rb\` to \`$VERSION\`
|
|
61
|
+
|
|
62
|
+
Merging this PR will automatically publish to RubyGems and create a GitHub Release.
|
|
63
|
+
EOF
|
|
64
|
+
)"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: Release & Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
if: "startsWith(github.event.head_commit.message, 'chore: release')"
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment: rubygems
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
id-token: write
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
fetch-tags: true
|
|
20
|
+
|
|
21
|
+
- name: Extract version
|
|
22
|
+
id: version
|
|
23
|
+
run: |
|
|
24
|
+
VERSION=$(ruby -e "require_relative 'lib/signwell_sdk/version'; puts SignWell::VERSION")
|
|
25
|
+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
|
26
|
+
|
|
27
|
+
if echo "$VERSION" | grep -qE '(pre|alpha|beta|rc)'; then
|
|
28
|
+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
|
29
|
+
else
|
|
30
|
+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
- uses: ruby/setup-ruby@v1
|
|
34
|
+
with:
|
|
35
|
+
ruby-version: '3.3'
|
|
36
|
+
|
|
37
|
+
- name: Configure RubyGems credentials
|
|
38
|
+
uses: rubygems/configure-rubygems-credentials@v1.0.0
|
|
39
|
+
|
|
40
|
+
- name: Build gem
|
|
41
|
+
run: gem build signwell_sdk.gemspec
|
|
42
|
+
|
|
43
|
+
- name: Publish to RubyGems
|
|
44
|
+
run: gem push signwell_sdk-${{ steps.version.outputs.version }}.gem
|
|
45
|
+
|
|
46
|
+
- name: Create GitHub Release
|
|
47
|
+
env:
|
|
48
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
run: |
|
|
50
|
+
PRERELEASE_FLAG=""
|
|
51
|
+
if [ "${{ steps.version.outputs.prerelease }}" = "true" ]; then
|
|
52
|
+
PRERELEASE_FLAG="--prerelease"
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
# For stable releases, include all changes since the last stable tag
|
|
56
|
+
NOTES_START=""
|
|
57
|
+
if [ "${{ steps.version.outputs.prerelease }}" = "false" ]; then
|
|
58
|
+
LAST_STABLE=$(git tag --list 'v*' --sort=-v:refname | grep -vE '(pre|alpha|beta|rc)' | head -1)
|
|
59
|
+
if [ -n "$LAST_STABLE" ]; then
|
|
60
|
+
NOTES_START="--notes-start-tag $LAST_STABLE"
|
|
61
|
+
fi
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
gh release create "v${{ steps.version.outputs.version }}" \
|
|
65
|
+
--target main \
|
|
66
|
+
--title "v${{ steps.version.outputs.version }}" \
|
|
67
|
+
--generate-notes \
|
|
68
|
+
$NOTES_START \
|
|
69
|
+
$PRERELEASE_FLAG
|
data/.gitignore
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Generated by: https://openapi-generator.tech
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
*.gem
|
|
5
|
+
*.rbc
|
|
6
|
+
/.config
|
|
7
|
+
/coverage/
|
|
8
|
+
/InstalledFiles
|
|
9
|
+
/pkg/
|
|
10
|
+
/spec/reports/
|
|
11
|
+
/spec/examples.txt
|
|
12
|
+
/test/tmp/
|
|
13
|
+
/test/version_tmp/
|
|
14
|
+
/tmp/
|
|
15
|
+
|
|
16
|
+
## Specific to RubyMotion:
|
|
17
|
+
.dat*
|
|
18
|
+
.repl_history
|
|
19
|
+
build/
|
|
20
|
+
|
|
21
|
+
## Documentation cache and generated files:
|
|
22
|
+
/.yardoc/
|
|
23
|
+
/_yardoc/
|
|
24
|
+
/doc/
|
|
25
|
+
/rdoc/
|
|
26
|
+
|
|
27
|
+
## Environment normalization:
|
|
28
|
+
/.bundle/
|
|
29
|
+
/vendor/bundle
|
|
30
|
+
/lib/bundler/man/
|
|
31
|
+
|
|
32
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
33
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
34
|
+
# Gemfile.lock
|
|
35
|
+
# .ruby-version
|
|
36
|
+
# .ruby-gemset
|
|
37
|
+
|
|
38
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
39
|
+
.rvmrc
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
AllCops:
|
|
2
|
+
TargetRubyVersion: 3.0
|
|
3
|
+
DisabledByDefault: true
|
|
4
|
+
NewCops: disable
|
|
5
|
+
SuggestExtensions: false
|
|
6
|
+
|
|
7
|
+
Lint:
|
|
8
|
+
Enabled: true
|
|
9
|
+
|
|
10
|
+
Security:
|
|
11
|
+
Enabled: true
|
|
12
|
+
|
|
13
|
+
Style:
|
|
14
|
+
Enabled: true
|
|
15
|
+
|
|
16
|
+
# Keep Style enabled, but avoid high-churn generated-code rewrites that are
|
|
17
|
+
# better handled in templates deliberately rather than by post-generation lint.
|
|
18
|
+
Style/AccessorGrouping:
|
|
19
|
+
Enabled: false
|
|
20
|
+
|
|
21
|
+
Style/BlockComments:
|
|
22
|
+
Enabled: false
|
|
23
|
+
|
|
24
|
+
Style/BlockDelimiters:
|
|
25
|
+
Enabled: false
|
|
26
|
+
|
|
27
|
+
Style/ClassVars:
|
|
28
|
+
Enabled: false
|
|
29
|
+
|
|
30
|
+
Style/CommentAnnotation:
|
|
31
|
+
Enabled: false
|
|
32
|
+
|
|
33
|
+
Style/ConditionalAssignment:
|
|
34
|
+
Enabled: false
|
|
35
|
+
|
|
36
|
+
Style/Documentation:
|
|
37
|
+
Enabled: false
|
|
38
|
+
|
|
39
|
+
Style/EmptyLiteral:
|
|
40
|
+
Enabled: false
|
|
41
|
+
|
|
42
|
+
Style/Encoding:
|
|
43
|
+
Enabled: false
|
|
44
|
+
|
|
45
|
+
Style/ExpandPathArguments:
|
|
46
|
+
Enabled: false
|
|
47
|
+
|
|
48
|
+
Style/FrozenStringLiteralComment:
|
|
49
|
+
Enabled: false
|
|
50
|
+
|
|
51
|
+
Style/GlobalStdStream:
|
|
52
|
+
Enabled: false
|
|
53
|
+
|
|
54
|
+
Style/GuardClause:
|
|
55
|
+
Enabled: false
|
|
56
|
+
|
|
57
|
+
Style/HashEachMethods:
|
|
58
|
+
Enabled: false
|
|
59
|
+
|
|
60
|
+
Style/HashSyntax:
|
|
61
|
+
Enabled: false
|
|
62
|
+
|
|
63
|
+
Style/IdenticalConditionalBranches:
|
|
64
|
+
Enabled: false
|
|
65
|
+
|
|
66
|
+
Style/IfUnlessModifier:
|
|
67
|
+
Enabled: false
|
|
68
|
+
|
|
69
|
+
Style/MultilineIfThen:
|
|
70
|
+
Enabled: false
|
|
71
|
+
|
|
72
|
+
Style/MultipleComparison:
|
|
73
|
+
Enabled: false
|
|
74
|
+
|
|
75
|
+
Style/MutableConstant:
|
|
76
|
+
Enabled: false
|
|
77
|
+
|
|
78
|
+
Style/NegatedIf:
|
|
79
|
+
Enabled: false
|
|
80
|
+
|
|
81
|
+
Style/NilComparison:
|
|
82
|
+
Enabled: false
|
|
83
|
+
|
|
84
|
+
Style/NumericPredicate:
|
|
85
|
+
Enabled: false
|
|
86
|
+
|
|
87
|
+
Style/ParenthesesAroundCondition:
|
|
88
|
+
Enabled: false
|
|
89
|
+
|
|
90
|
+
Style/PercentLiteralDelimiters:
|
|
91
|
+
Enabled: false
|
|
92
|
+
|
|
93
|
+
Style/PerlBackrefs:
|
|
94
|
+
Enabled: false
|
|
95
|
+
|
|
96
|
+
Style/Proc:
|
|
97
|
+
Enabled: false
|
|
98
|
+
|
|
99
|
+
Style/RedundantAssignment:
|
|
100
|
+
Enabled: false
|
|
101
|
+
|
|
102
|
+
Style/RedundantBegin:
|
|
103
|
+
Enabled: false
|
|
104
|
+
|
|
105
|
+
Style/RedundantInterpolation:
|
|
106
|
+
Enabled: false
|
|
107
|
+
|
|
108
|
+
Style/RedundantParentheses:
|
|
109
|
+
Enabled: false
|
|
110
|
+
|
|
111
|
+
Style/RedundantRegexpEscape:
|
|
112
|
+
Enabled: false
|
|
113
|
+
|
|
114
|
+
Style/RedundantReturn:
|
|
115
|
+
Enabled: false
|
|
116
|
+
|
|
117
|
+
Style/RedundantSelf:
|
|
118
|
+
Enabled: false
|
|
119
|
+
|
|
120
|
+
Style/RegexpLiteral:
|
|
121
|
+
Enabled: false
|
|
122
|
+
|
|
123
|
+
Style/RescueStandardError:
|
|
124
|
+
Enabled: false
|
|
125
|
+
|
|
126
|
+
Style/SignalException:
|
|
127
|
+
Enabled: false
|
|
128
|
+
|
|
129
|
+
Style/SoleNestedConditional:
|
|
130
|
+
Enabled: false
|
|
131
|
+
|
|
132
|
+
Style/SpecialGlobalVars:
|
|
133
|
+
Enabled: false
|
|
134
|
+
|
|
135
|
+
Style/StringConcatenation:
|
|
136
|
+
Enabled: false
|
|
137
|
+
|
|
138
|
+
Style/StringLiterals:
|
|
139
|
+
Enabled: false
|
|
140
|
+
|
|
141
|
+
Style/SymbolArray:
|
|
142
|
+
Enabled: false
|
|
143
|
+
|
|
144
|
+
Style/SymbolLiteral:
|
|
145
|
+
Enabled: false
|
|
146
|
+
|
|
147
|
+
Style/TrailingCommaInArrayLiteral:
|
|
148
|
+
Enabled: false
|
|
149
|
+
|
|
150
|
+
Style/TrailingCommaInHashLiteral:
|
|
151
|
+
Enabled: false
|
|
152
|
+
|
|
153
|
+
Layout/IndentationWidth:
|
|
154
|
+
Enabled: true
|
|
155
|
+
|
|
156
|
+
Layout/IndentationConsistency:
|
|
157
|
+
Enabled: true
|
|
158
|
+
|
|
159
|
+
Layout/EndAlignment:
|
|
160
|
+
Enabled: true
|
|
161
|
+
EnforcedStyleAlignWith: keyword
|
|
162
|
+
AutoCorrect: true
|
|
163
|
+
|
|
164
|
+
Layout/ElseAlignment:
|
|
165
|
+
Enabled: true
|
|
166
|
+
|
|
167
|
+
Layout/CaseIndentation:
|
|
168
|
+
Enabled: true
|
|
169
|
+
|
|
170
|
+
Layout/CommentIndentation:
|
|
171
|
+
Enabled: true
|
|
172
|
+
|
|
173
|
+
Layout/EmptyLinesAroundClassBody:
|
|
174
|
+
Enabled: true
|
|
175
|
+
|
|
176
|
+
Layout/EmptyLinesAroundModuleBody:
|
|
177
|
+
Enabled: true
|
|
178
|
+
|
|
179
|
+
Layout/TrailingWhitespace:
|
|
180
|
+
Enabled: true
|
|
181
|
+
|
|
182
|
+
Layout/TrailingEmptyLines:
|
|
183
|
+
Enabled: true
|
|
184
|
+
|
|
185
|
+
Layout/SpaceAroundOperators:
|
|
186
|
+
Enabled: true
|
|
187
|
+
|
|
188
|
+
Layout/SpaceInsideHashLiteralBraces:
|
|
189
|
+
Enabled: true
|
|
190
|
+
|
|
191
|
+
Layout/SpaceBeforeBlockBraces:
|
|
192
|
+
Enabled: true
|
|
193
|
+
|
|
194
|
+
Layout/SpaceInsideBlockBraces:
|
|
195
|
+
Enabled: true
|
|
196
|
+
|
|
197
|
+
Lint/DuplicateMethods:
|
|
198
|
+
Exclude:
|
|
199
|
+
- 'lib/signwell_sdk/configuration.rb'
|
|
200
|
+
- 'lib/signwell_sdk/models/**/*.rb'
|
data/CONTRIBUTING.md
CHANGED
|
@@ -6,6 +6,18 @@ Thank you for your interest in contributing to the SignWell Ruby SDK!
|
|
|
6
6
|
|
|
7
7
|
This SDK is auto-generated from our OpenAPI specification using [OpenAPI Generator](https://openapi-generator.tech/). Most of the code in this repository is regenerated periodically, so **direct code changes via pull requests will be overwritten**.
|
|
8
8
|
|
|
9
|
+
The generator repository is the sole orchestrator for generated SDK code. If you need to change:
|
|
10
|
+
|
|
11
|
+
- files under `lib/`
|
|
12
|
+
- files under `spec/`
|
|
13
|
+
- files under `docs/`
|
|
14
|
+
- `README.md`
|
|
15
|
+
- `signwell_sdk.gemspec`
|
|
16
|
+
|
|
17
|
+
then the durable fix belongs in the generator templates, extras, or validation workflow. Temporary emergency patches in this repo should always be mirrored back to the generator before the next regeneration.
|
|
18
|
+
|
|
19
|
+
Hand-written SDK helpers are generator extras. In generated Ruby output, custom helper implementations live under `lib/signwell_sdk/extras/`; the public entrypoint loads them so constants such as `SignWell::Webhook` and `SignWell::Embedded` remain available without placing custom implementation files beside generated API or model code.
|
|
20
|
+
|
|
9
21
|
## How to contribute
|
|
10
22
|
|
|
11
23
|
### Report a bug in the SDK
|
|
@@ -35,6 +47,7 @@ Examples in the `examples/` directory are hand-written and welcome contributions
|
|
|
35
47
|
- Changes to files under `lib/` (auto-generated, will be overwritten)
|
|
36
48
|
- Changes to files under `spec/` (auto-generated, will be overwritten)
|
|
37
49
|
- Changes to files under `docs/` (auto-generated, will be overwritten)
|
|
50
|
+
- Direct fixes to generated README or gemspec content without a matching generator change
|
|
38
51
|
|
|
39
52
|
## Security
|
|
40
53
|
|