signwell_sdk 0.1.0 → 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.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.yml +53 -0
  3. data/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.yml +35 -0
  5. data/.github/pull_request_template.md +39 -0
  6. data/.github/workflows/ci.yml +45 -0
  7. data/.github/workflows/generator-ownership.yml +53 -0
  8. data/.github/workflows/manual-release.yml +64 -0
  9. data/.github/workflows/release.yml +69 -0
  10. data/.gitignore +39 -0
  11. data/.release-please-manifest.json +3 -0
  12. data/.rspec +2 -0
  13. data/.rubocop.yml +200 -0
  14. data/CONTRIBUTING.md +13 -0
  15. data/Gemfile.lock +15 -25
  16. data/README.md +82 -6
  17. data/docs/{APIApplicationApi.md → ApiApplicationApi.md} +9 -9
  18. data/docs/BulkSendApi.md +4 -4
  19. data/docs/DocumentApi.md +7 -5
  20. data/docs/DocumentFromTemplateResponse.md +1 -1
  21. data/docs/DocumentFromTemplateResponseFieldsInnerInner.md +2 -0
  22. data/docs/DocumentResponse.md +1 -1
  23. data/docs/DocumentResponseFieldsInnerInner.md +2 -0
  24. data/docs/FileInfo.md +1 -1
  25. data/docs/RegionalApi.md +4 -4
  26. data/docs/TemplateApi.md +3 -1
  27. data/docs/WebhookResponse.md +0 -2
  28. data/examples/09_webhook_validation.rb +10 -4
  29. data/lib/signwell_sdk/api/api_application_api.rb +36 -40
  30. data/lib/signwell_sdk/api/bulk_send_api.rb +117 -111
  31. data/lib/signwell_sdk/api/document_api.rb +239 -150
  32. data/lib/signwell_sdk/api/me_api.rb +21 -20
  33. data/lib/signwell_sdk/api/regional_api.rb +48 -29
  34. data/lib/signwell_sdk/api/template_api.rb +117 -85
  35. data/lib/signwell_sdk/api/webhooks_api.rb +50 -46
  36. data/lib/signwell_sdk/api_client.rb +251 -92
  37. data/lib/signwell_sdk/api_error.rb +142 -17
  38. data/lib/signwell_sdk/configuration.rb +43 -53
  39. data/lib/signwell_sdk/{embedded → extras/embedded}/railtie.rb +2 -0
  40. data/lib/signwell_sdk/extras/embedded/view_helpers.rb +281 -0
  41. data/lib/signwell_sdk/{embedded.rb → extras/embedded.rb} +96 -54
  42. data/lib/signwell_sdk/extras/webhook.rb +257 -0
  43. data/lib/signwell_sdk/models/account_info_response.rb +110 -85
  44. data/lib/signwell_sdk/models/account_info_response_active_users_inner.rb +80 -60
  45. data/lib/signwell_sdk/models/account_info_response_preferences.rb +112 -102
  46. data/lib/signwell_sdk/models/additional_fields_inner_inner.rb +227 -145
  47. data/lib/signwell_sdk/models/additional_fields_inner_inner_value.rb +25 -23
  48. data/lib/signwell_sdk/models/additional_files_inner.rb +58 -52
  49. data/lib/signwell_sdk/models/api_application_response.rb +91 -72
  50. data/lib/signwell_sdk/models/api_application_response_owner.rb +80 -58
  51. data/lib/signwell_sdk/models/api_application_response_preferences.rb +67 -62
  52. data/lib/signwell_sdk/models/attachment_request_info.rb +66 -52
  53. data/lib/signwell_sdk/models/attachment_requests_inner.rb +68 -56
  54. data/lib/signwell_sdk/models/bulk_send_create_response.rb +110 -77
  55. data/lib/signwell_sdk/models/bulk_send_csv_request.rb +54 -48
  56. data/lib/signwell_sdk/models/bulk_send_csv_template_response.rb +46 -42
  57. data/lib/signwell_sdk/models/bulk_send_documents_response.rb +146 -102
  58. data/lib/signwell_sdk/models/bulk_send_list_item.rb +147 -97
  59. data/lib/signwell_sdk/models/bulk_send_list_response.rb +99 -72
  60. data/lib/signwell_sdk/models/bulk_send_response.rb +125 -91
  61. data/lib/signwell_sdk/models/bulk_send_response_templates_inner.rb +60 -48
  62. data/lib/signwell_sdk/models/bulk_send_validate_csv_response.rb +91 -77
  63. data/lib/signwell_sdk/models/checkbox_group_info.rb +111 -85
  64. data/lib/signwell_sdk/models/checkbox_groups_inner.rb +105 -82
  65. data/lib/signwell_sdk/models/checkbox_validation.rb +15 -16
  66. data/lib/signwell_sdk/models/completed_pdf_response.rb +24 -22
  67. data/lib/signwell_sdk/models/completed_pdf_url_response.rb +46 -42
  68. data/lib/signwell_sdk/models/copied_contact_info.rb +58 -50
  69. data/lib/signwell_sdk/models/copied_contacts_inner.rb +52 -46
  70. data/lib/signwell_sdk/models/copied_placeholders_inner.rb +57 -53
  71. data/lib/signwell_sdk/models/create_bulk_send_request.rb +107 -92
  72. data/lib/signwell_sdk/models/create_webhook_request.rb +52 -48
  73. data/lib/signwell_sdk/models/date_format.rb +16 -17
  74. data/lib/signwell_sdk/models/detailed_option.rb +60 -54
  75. data/lib/signwell_sdk/models/document_from_template_request.rb +266 -223
  76. data/lib/signwell_sdk/models/document_from_template_response.rb +291 -214
  77. data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner.rb +226 -139
  78. data/lib/signwell_sdk/models/document_from_template_response_fields_inner_inner_recipient.rb +66 -54
  79. data/lib/signwell_sdk/models/document_from_template_response_recipients_inner.rb +153 -121
  80. data/lib/signwell_sdk/models/document_list_response.rb +99 -72
  81. data/lib/signwell_sdk/models/document_request.rb +251 -214
  82. data/lib/signwell_sdk/models/document_response.rb +293 -216
  83. data/lib/signwell_sdk/models/document_response_attachment_requests_inner.rb +66 -54
  84. data/lib/signwell_sdk/models/document_response_fields_inner_inner.rb +226 -139
  85. data/lib/signwell_sdk/models/document_response_fields_inner_inner_options_inner.rb +51 -49
  86. data/lib/signwell_sdk/models/document_response_fields_inner_inner_recipient.rb +60 -48
  87. data/lib/signwell_sdk/models/document_response_fields_inner_inner_value.rb +25 -23
  88. data/lib/signwell_sdk/models/document_response_recipients_inner.rb +156 -120
  89. data/lib/signwell_sdk/models/document_template_list_response.rb +99 -72
  90. data/lib/signwell_sdk/models/document_template_request.rb +199 -166
  91. data/lib/signwell_sdk/models/document_template_response.rb +240 -181
  92. data/lib/signwell_sdk/models/document_template_response_copied_placeholders_inner.rb +83 -72
  93. data/lib/signwell_sdk/models/document_template_response_placeholders_inner.rb +90 -80
  94. data/lib/signwell_sdk/models/document_template_update_request.rb +142 -125
  95. data/lib/signwell_sdk/models/dropdown_option.rb +24 -22
  96. data/lib/signwell_sdk/models/error_response.rb +45 -45
  97. data/lib/signwell_sdk/models/error_response_meta.rb +67 -55
  98. data/lib/signwell_sdk/models/field_type.rb +27 -29
  99. data/lib/signwell_sdk/models/fields_inner_inner.rb +221 -141
  100. data/lib/signwell_sdk/models/file_format.rb +13 -14
  101. data/lib/signwell_sdk/models/file_info.rb +53 -57
  102. data/lib/signwell_sdk/models/files_inner.rb +58 -52
  103. data/lib/signwell_sdk/models/label_info.rb +45 -45
  104. data/lib/signwell_sdk/models/label_request.rb +46 -42
  105. data/lib/signwell_sdk/models/label_response.rb +52 -46
  106. data/lib/signwell_sdk/models/me_response.rb +122 -76
  107. data/lib/signwell_sdk/models/me_response_contact.rb +114 -85
  108. data/lib/signwell_sdk/models/me_response_user.rb +92 -68
  109. data/lib/signwell_sdk/models/me_response_user_preferences.rb +51 -49
  110. data/lib/signwell_sdk/models/nom151_certificate_response.rb +46 -42
  111. data/lib/signwell_sdk/models/nom151_certificate_response_nom151.rb +138 -82
  112. data/lib/signwell_sdk/models/nom151_url_response.rb +46 -42
  113. data/lib/signwell_sdk/models/pagination_meta.rb +88 -65
  114. data/lib/signwell_sdk/models/placeholders_inner.rb +71 -59
  115. data/lib/signwell_sdk/models/rate_limit_error_response.rb +46 -42
  116. data/lib/signwell_sdk/models/recipients_inner.rb +100 -80
  117. data/lib/signwell_sdk/models/reminder_recipients_inner.rb +45 -45
  118. data/lib/signwell_sdk/models/send_reminder_request.rb +40 -42
  119. data/lib/signwell_sdk/models/template_attachment_requests_inner.rb +65 -55
  120. data/lib/signwell_sdk/models/template_checkbox_groups_inner.rb +102 -81
  121. data/lib/signwell_sdk/models/template_field_values_inner.rb +60 -48
  122. data/lib/signwell_sdk/models/template_field_values_inner_value.rb +25 -23
  123. data/lib/signwell_sdk/models/template_fields_inner_inner.rb +218 -140
  124. data/lib/signwell_sdk/models/template_recipients_inner.rb +106 -84
  125. data/lib/signwell_sdk/models/text_validation.rb +23 -25
  126. data/lib/signwell_sdk/models/update_document_and_send_request.rb +170 -149
  127. data/lib/signwell_sdk/models/update_recipients_map_inner.rb +92 -68
  128. data/lib/signwell_sdk/models/update_recipients_request.rb +43 -43
  129. data/lib/signwell_sdk/models/validation_error_response.rb +43 -43
  130. data/lib/signwell_sdk/models/webhook_response.rb +68 -66
  131. data/lib/signwell_sdk/version.rb +1 -1
  132. data/lib/signwell_sdk.rb +17 -13
  133. data/openapi.yaml +425 -415
  134. data/signwell_sdk.gemspec +25 -6
  135. data/spec/api/api_application_api_spec.rb +16 -14
  136. data/spec/api/bulk_send_api_spec.rb +14 -14
  137. data/spec/api/document_api_spec.rb +17 -21
  138. data/spec/api/me_api_spec.rb +13 -11
  139. data/spec/api/regional_api_spec.rb +14 -12
  140. data/spec/api/template_api_spec.rb +13 -13
  141. data/spec/api/webhooks_api_spec.rb +13 -11
  142. data/spec/models/account_info_response_active_users_inner_spec.rb +12 -11
  143. data/spec/models/account_info_response_preferences_spec.rb +12 -11
  144. data/spec/models/account_info_response_spec.rb +12 -11
  145. data/spec/models/additional_fields_inner_inner_spec.rb +12 -11
  146. data/spec/models/additional_fields_inner_inner_value_spec.rb +10 -10
  147. data/spec/models/additional_files_inner_spec.rb +12 -11
  148. data/spec/models/api_application_response_owner_spec.rb +12 -11
  149. data/spec/models/api_application_response_preferences_spec.rb +12 -11
  150. data/spec/models/api_application_response_spec.rb +11 -10
  151. data/spec/models/attachment_request_info_spec.rb +12 -11
  152. data/spec/models/attachment_requests_inner_spec.rb +12 -11
  153. data/spec/models/bulk_send_create_response_spec.rb +11 -10
  154. data/spec/models/bulk_send_csv_request_spec.rb +12 -11
  155. data/spec/models/bulk_send_csv_template_response_spec.rb +12 -11
  156. data/spec/models/bulk_send_documents_response_spec.rb +12 -11
  157. data/spec/models/bulk_send_list_item_spec.rb +12 -11
  158. data/spec/models/bulk_send_list_response_spec.rb +11 -10
  159. data/spec/models/bulk_send_response_spec.rb +12 -11
  160. data/spec/models/bulk_send_response_templates_inner_spec.rb +12 -11
  161. data/spec/models/bulk_send_validate_csv_response_spec.rb +11 -10
  162. data/spec/models/checkbox_group_info_spec.rb +12 -11
  163. data/spec/models/checkbox_groups_inner_spec.rb +11 -10
  164. data/spec/models/checkbox_validation_spec.rb +11 -10
  165. data/spec/models/completed_pdf_response_spec.rb +10 -10
  166. data/spec/models/completed_pdf_url_response_spec.rb +12 -11
  167. data/spec/models/copied_contact_info_spec.rb +12 -11
  168. data/spec/models/copied_contacts_inner_spec.rb +12 -11
  169. data/spec/models/copied_placeholders_inner_spec.rb +12 -11
  170. data/spec/models/create_bulk_send_request_spec.rb +12 -11
  171. data/spec/models/create_webhook_request_spec.rb +12 -11
  172. data/spec/models/date_format_spec.rb +11 -10
  173. data/spec/models/detailed_option_spec.rb +12 -11
  174. data/spec/models/document_from_template_request_spec.rb +12 -11
  175. data/spec/models/document_from_template_response_fields_inner_inner_recipient_spec.rb +12 -11
  176. data/spec/models/document_from_template_response_fields_inner_inner_spec.rb +18 -11
  177. data/spec/models/document_from_template_response_recipients_inner_spec.rb +12 -11
  178. data/spec/models/document_from_template_response_spec.rb +12 -11
  179. data/spec/models/document_list_response_spec.rb +11 -10
  180. data/spec/models/document_request_spec.rb +12 -11
  181. data/spec/models/document_response_attachment_requests_inner_spec.rb +12 -11
  182. data/spec/models/document_response_fields_inner_inner_options_inner_spec.rb +12 -11
  183. data/spec/models/document_response_fields_inner_inner_recipient_spec.rb +12 -11
  184. data/spec/models/document_response_fields_inner_inner_spec.rb +18 -11
  185. data/spec/models/document_response_fields_inner_inner_value_spec.rb +10 -10
  186. data/spec/models/document_response_recipients_inner_spec.rb +12 -11
  187. data/spec/models/document_response_spec.rb +12 -11
  188. data/spec/models/document_template_list_response_spec.rb +11 -10
  189. data/spec/models/document_template_request_spec.rb +12 -11
  190. data/spec/models/document_template_response_copied_placeholders_inner_spec.rb +11 -10
  191. data/spec/models/document_template_response_placeholders_inner_spec.rb +11 -10
  192. data/spec/models/document_template_response_spec.rb +12 -11
  193. data/spec/models/document_template_update_request_spec.rb +12 -11
  194. data/spec/models/dropdown_option_spec.rb +10 -10
  195. data/spec/models/error_response_meta_spec.rb +12 -11
  196. data/spec/models/error_response_spec.rb +12 -11
  197. data/spec/models/field_type_spec.rb +11 -10
  198. data/spec/models/fields_inner_inner_spec.rb +12 -11
  199. data/spec/models/file_format_spec.rb +11 -10
  200. data/spec/models/file_info_spec.rb +12 -11
  201. data/spec/models/files_inner_spec.rb +12 -11
  202. data/spec/models/label_info_spec.rb +12 -11
  203. data/spec/models/label_request_spec.rb +12 -11
  204. data/spec/models/label_response_spec.rb +12 -11
  205. data/spec/models/me_response_contact_spec.rb +12 -11
  206. data/spec/models/me_response_spec.rb +11 -10
  207. data/spec/models/me_response_user_preferences_spec.rb +12 -11
  208. data/spec/models/me_response_user_spec.rb +11 -10
  209. data/spec/models/nom151_certificate_response_nom151_spec.rb +11 -10
  210. data/spec/models/nom151_certificate_response_spec.rb +12 -11
  211. data/spec/models/nom151_url_response_spec.rb +12 -11
  212. data/spec/models/pagination_meta_spec.rb +12 -11
  213. data/spec/models/placeholders_inner_spec.rb +12 -11
  214. data/spec/models/rate_limit_error_response_spec.rb +12 -11
  215. data/spec/models/recipients_inner_spec.rb +11 -10
  216. data/spec/models/reminder_recipients_inner_spec.rb +12 -11
  217. data/spec/models/send_reminder_request_spec.rb +12 -11
  218. data/spec/models/template_attachment_requests_inner_spec.rb +12 -11
  219. data/spec/models/template_checkbox_groups_inner_spec.rb +11 -10
  220. data/spec/models/template_field_values_inner_spec.rb +12 -11
  221. data/spec/models/template_field_values_inner_value_spec.rb +10 -10
  222. data/spec/models/template_fields_inner_inner_spec.rb +12 -11
  223. data/spec/models/template_recipients_inner_spec.rb +12 -11
  224. data/spec/models/text_validation_spec.rb +11 -10
  225. data/spec/models/update_document_and_send_request_spec.rb +12 -11
  226. data/spec/models/update_recipients_map_inner_spec.rb +11 -10
  227. data/spec/models/update_recipients_request_spec.rb +12 -11
  228. data/spec/models/validation_error_response_spec.rb +12 -11
  229. data/spec/models/webhook_response_spec.rb +12 -17
  230. data/spec/regressions/api_client_spec.rb +481 -0
  231. data/spec/regressions/bulk_send_api_spec.rb +47 -0
  232. data/spec/regressions/embedded_spec.rb +263 -0
  233. data/spec/regressions/generated_resource_helpers_spec.rb +119 -0
  234. data/spec/regressions/response_modes_spec.rb +93 -0
  235. data/spec/regressions/view_helpers_spec.rb +202 -0
  236. data/spec/regressions/webhook_spec.rb +210 -0
  237. data/spec/spec_helper.rb +11 -12
  238. metadata +127 -91
  239. data/lib/signwell_sdk/embedded/view_helpers.rb +0 -132
  240. data/lib/signwell_sdk/webhook.rb +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a977e911e6115277298236df5ce9a715dacb3cf8986d387c718a31db5138566a
4
- data.tar.gz: 1e8c8cc0051656d1ebafd9489d7564508683784d3ffb8dd6572e54c356610bc0
3
+ metadata.gz: dd4da9e3ef1dc963dfd7bfa01e6b144ba77bc2198d27d5a284fc4ed50181726a
4
+ data.tar.gz: a9624d3f48a656f44786247b760e91cc1e056a020e9c830bf5018c407cbdae21
5
5
  SHA512:
6
- metadata.gz: 1f9f4838d88deebd9c7647ed1eaf6ff06892bfd00fbd1f16de2fb0aacc9e0ff07e26db4b21aeb8e631f3f8f771a2a6afc42152570e303bec9b1608e5ddbf88c6
7
- data.tar.gz: 3a5b9325c09517a14ea25680a5b9f4afc2d54f9362c8e9f0538258364cc896101bd6df8b9cc3a9bafe4d9d09e30a10d8abef89cd39893edfb27ab9564036fe52
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,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: API Documentation
4
+ url: https://developers.signwell.com
5
+ about: Check the API docs for usage examples and reference.
@@ -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
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-pre.alpha.2"
3
+ }
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
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