test-test-sink-test-test 0.0.2.pre.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +151 -0
  3. data/lib/sink/base_client.rb +404 -0
  4. data/lib/sink/base_model.rb +226 -0
  5. data/lib/sink/client.rb +391 -0
  6. data/lib/sink/fake_page.rb +44 -0
  7. data/lib/sink/models/address.rb +55 -0
  8. data/lib/sink/models/allof_base_parent.rb +18 -0
  9. data/lib/sink/models/allof_multiple_inline_entries.rb +15 -0
  10. data/lib/sink/models/api_status.rb +18 -0
  11. data/lib/sink/models/array_float_items_response.rb +6 -0
  12. data/lib/sink/models/array_missing_items_response.rb +18 -0
  13. data/lib/sink/models/array_object_items.rb +18 -0
  14. data/lib/sink/models/array_object_items_response.rb +18 -0
  15. data/lib/sink/models/array_recursion.rb +6 -0
  16. data/lib/sink/models/balance.rb +18 -0
  17. data/lib/sink/models/basic_shared_model_object.rb +23 -0
  18. data/lib/sink/models/body_param_top_level_all_of_response.rb +28 -0
  19. data/lib/sink/models/body_param_top_level_any_of_response.rb +6 -0
  20. data/lib/sink/models/body_param_top_level_one_of_response.rb +6 -0
  21. data/lib/sink/models/body_param_union_overlapping_prop_response.rb +19 -0
  22. data/lib/sink/models/card.rb +211 -0
  23. data/lib/sink/models/card_list_response.rb +36 -0
  24. data/lib/sink/models/card_provision_foo_response.rb +18 -0
  25. data/lib/sink/models/child_inlined_response_response.rb +18 -0
  26. data/lib/sink/models/child_model.rb +36 -0
  27. data/lib/sink/models/class_.rb +18 -0
  28. data/lib/sink/models/client.rb +23 -0
  29. data/lib/sink/models/company.rb +18 -0
  30. data/lib/sink/models/company_payment.rb +18 -0
  31. data/lib/sink/models/complex_query_array_query_response.rb +26 -0
  32. data/lib/sink/models/config_tool_model_ref_from_nested_response_body_response.rb +32 -0
  33. data/lib/sink/models/currency.rb +23 -0
  34. data/lib/sink/models/decorator_test_keep_me_response.rb +18 -0
  35. data/lib/sink/models/docstring_leading_double_quote_response.rb +20 -0
  36. data/lib/sink/models/docstring_trailing_double_quote_response.rb +32 -0
  37. data/lib/sink/models/documents.rb +23 -0
  38. data/lib/sink/models/eeoc.rb +18 -0
  39. data/lib/sink/models/employment_data.rb +18 -0
  40. data/lib/sink/models/enum_basic_response.rb +62 -0
  41. data/lib/sink/models/envelope_inline_response_response.rb +18 -0
  42. data/lib/sink/models/envelope_wrapped_array_response.rb +6 -0
  43. data/lib/sink/models/export.rb +19 -0
  44. data/lib/sink/models/file_create_multipart_response.rb +18 -0
  45. data/lib/sink/models/file_everything_multipart_response.rb +19 -0
  46. data/lib/sink/models/file_no_file_multipart_response.rb +18 -0
  47. data/lib/sink/models/file_with_optional_param_response.rb +18 -0
  48. data/lib/sink/models/funding_account.rb +100 -0
  49. data/lib/sink/models/import.rb +18 -0
  50. data/lib/sink/models/interface.rb +18 -0
  51. data/lib/sink/models/keep_this_resource_keep_this_method_response.rb +19 -0
  52. data/lib/sink/models/make_ambiguous_schemas_explicit_make_ambiguous_schemas_explicit_response.rb +45 -0
  53. data/lib/sink/models/make_ambiguous_schemas_looser_make_ambiguous_schemas_looser_response.rb +45 -0
  54. data/lib/sink/models/map_nullable_items_response.rb +28 -0
  55. data/lib/sink/models/method_config_skipped_tests_all_response.rb +19 -0
  56. data/lib/sink/models/method_config_skipped_tests_go_response.rb +19 -0
  57. data/lib/sink/models/method_config_skipped_tests_java_response.rb +19 -0
  58. data/lib/sink/models/method_config_skipped_tests_kotlin_response.rb +19 -0
  59. data/lib/sink/models/method_config_skipped_tests_node_and_python_response.rb +19 -0
  60. data/lib/sink/models/method_config_skipped_tests_node_response.rb +19 -0
  61. data/lib/sink/models/method_config_skipped_tests_python_response.rb +19 -0
  62. data/lib/sink/models/method_config_skipped_tests_ruby_response.rb +19 -0
  63. data/lib/sink/models/model_from_nested_path.rb +39 -0
  64. data/lib/sink/models/model_from_nested_response_body_ref.rb +18 -0
  65. data/lib/sink/models/model_from_schemas_ref.rb +18 -0
  66. data/lib/sink/models/model_from_schemas_ref_openapi_uri.rb +18 -0
  67. data/lib/sink/models/model_from_schemas_ref_openapi_uri_jmespath.rb +19 -0
  68. data/lib/sink/models/model_from_schemas_ref_openapi_uri_jsonpath.rb +19 -0
  69. data/lib/sink/models/model_level_1.rb +22 -0
  70. data/lib/sink/models/model_level_2.rb +22 -0
  71. data/lib/sink/models/model_level_3.rb +22 -0
  72. data/lib/sink/models/model_referenced_in_parent_and_child.rb +19 -0
  73. data/lib/sink/models/model_with_nested_model.rb +24 -0
  74. data/lib/sink/models/my_model.rb +18 -0
  75. data/lib/sink/models/name_child_prop_import_clash_response.rb +37 -0
  76. data/lib/sink/models/name_properties_common_conflicts_response.rb +84 -0
  77. data/lib/sink/models/name_properties_illegal_go_identifiers_response.rb +19 -0
  78. data/lib/sink/models/name_properties_illegal_javascript_identifiers_response.rb +6 -0
  79. data/lib/sink/models/name_response_property_clashes_model_import_response.rb +24 -0
  80. data/lib/sink/models/name_response_shadows_pydantic_response.rb +24 -0
  81. data/lib/sink/models/nested_request_model_a.rb +18 -0
  82. data/lib/sink/models/nested_request_model_b.rb +18 -0
  83. data/lib/sink/models/nested_request_model_c.rb +31 -0
  84. data/lib/sink/models/object_missing_items_response.rb +18 -0
  85. data/lib/sink/models/object_mixed_known_and_unknown_response.rb +19 -0
  86. data/lib/sink/models/object_multiple_array_properties_same_ref_response.rb +73 -0
  87. data/lib/sink/models/object_multiple_properties_same_model_response.rb +29 -0
  88. data/lib/sink/models/object_multiple_properties_same_ref_response.rb +68 -0
  89. data/lib/sink/models/object_skipped_props.rb +38 -0
  90. data/lib/sink/models/object_two_dimensional_array_primitive_property_response.rb +34 -0
  91. data/lib/sink/models/object_with_any_of_null_property.rb +31 -0
  92. data/lib/sink/models/object_with_child_ref.rb +23 -0
  93. data/lib/sink/models/object_with_one_of_null_property.rb +31 -0
  94. data/lib/sink/models/object_with_union_properties.rb +23 -0
  95. data/lib/sink/models/openapi_format_array_type_one_entry_response.rb +19 -0
  96. data/lib/sink/models/openapi_format_array_type_one_entry_with_null_response.rb +19 -0
  97. data/lib/sink/models/openapi_special_used_used_as_property_name_response.rb +19 -0
  98. data/lib/sink/models/page_cursor_shared_ref_pagination.rb +23 -0
  99. data/lib/sink/models/parent_model_with_child_ref.rb +28 -0
  100. data/lib/sink/models/path_param_colon_suffix_response.rb +18 -0
  101. data/lib/sink/models/path_param_file_extension_response.rb +18 -0
  102. data/lib/sink/models/path_param_multiple_response.rb +18 -0
  103. data/lib/sink/models/path_param_query_param_response.rb +18 -0
  104. data/lib/sink/models/path_param_singular_response.rb +18 -0
  105. data/lib/sink/models/primitive_strings_response.rb +18 -0
  106. data/lib/sink/models/private.rb +18 -0
  107. data/lib/sink/models/public.rb +18 -0
  108. data/lib/sink/models/recursion_create_envelope_response.rb +19 -0
  109. data/lib/sink/models/response_allof_simple_response.rb +23 -0
  110. data/lib/sink/models/response_array_object_with_union_properties_response.rb +6 -0
  111. data/lib/sink/models/response_array_response_response.rb +6 -0
  112. data/lib/sink/models/response_missing_required_response.rb +24 -0
  113. data/lib/sink/models/response_nested_array_response.rb +36 -0
  114. data/lib/sink/models/response_object_all_properties_response.rb +65 -0
  115. data/lib/sink/models/response_object_no_properties_response.rb +14 -0
  116. data/lib/sink/models/response_object_with_additional_properties_prop_response.rb +32 -0
  117. data/lib/sink/models/response_object_with_heavily_nested_union_response.rb +19 -0
  118. data/lib/sink/models/response_only_read_only_properties_response.rb +25 -0
  119. data/lib/sink/models/responses_allof_cross_object.rb +23 -0
  120. data/lib/sink/models/return_.rb +18 -0
  121. data/lib/sink/models/root_response.rb +31 -0
  122. data/lib/sink/models/self_recursion.rb +23 -0
  123. data/lib/sink/models/shared_cursor_nested_response_prop_meta.rb +33 -0
  124. data/lib/sink/models/shared_self_recursion.rb +23 -0
  125. data/lib/sink/models/shipping_address.rb +85 -0
  126. data/lib/sink/models/simple_allof.rb +28 -0
  127. data/lib/sink/models/simple_object.rb +32 -0
  128. data/lib/sink/models/skip_this_resource_i_never_appear_response.rb +19 -0
  129. data/lib/sink/models/streaming_basic_response.rb +23 -0
  130. data/lib/sink/models/streaming_nested_params_response.rb +23 -0
  131. data/lib/sink/models/streaming_no_discriminator_response.rb +24 -0
  132. data/lib/sink/models/streaming_query_param_discriminator_response.rb +24 -0
  133. data/lib/sink/models/streaming_with_unrelated_default_param_response.rb +24 -0
  134. data/lib/sink/models/type_dates_response.rb +38 -0
  135. data/lib/sink/models/type_datetimes_response.rb +38 -0
  136. data/lib/sink/models/union_discriminated_variant_a.rb +27 -0
  137. data/lib/sink/models/union_discriminated_variant_b.rb +27 -0
  138. data/lib/sink/models/union_response_discriminated_by_property_name_response.rb +6 -0
  139. data/lib/sink/models/union_response_discriminated_with_basic_mapping_response.rb +6 -0
  140. data/lib/sink/models/union_type_mixed_types_response.rb +6 -0
  141. data/lib/sink/models/union_type_nullable_union_response.rb +6 -0
  142. data/lib/sink/models/union_type_objects_response.rb +6 -0
  143. data/lib/sink/models/union_type_super_mixed_types_response.rb +6 -0
  144. data/lib/sink/models/union_type_unknown_variant_response.rb +6 -0
  145. data/lib/sink/models/version_1_30_name_create_response.rb +18 -0
  146. data/lib/sink/models/widget.rb +19 -0
  147. data/lib/sink/models/write_only_response_simple_response.rb +21 -0
  148. data/lib/sink/page_cursor.rb +54 -0
  149. data/lib/sink/page_cursor_from_headers.rb +54 -0
  150. data/lib/sink/page_cursor_id.rb +50 -0
  151. data/lib/sink/page_cursor_nested_items.rb +84 -0
  152. data/lib/sink/page_cursor_nested_object_ref.rb +71 -0
  153. data/lib/sink/page_cursor_shared_ref.rb +72 -0
  154. data/lib/sink/page_cursor_top_level_array.rb +51 -0
  155. data/lib/sink/page_cursor_url.rb +51 -0
  156. data/lib/sink/page_cursor_with_reverse.rb +58 -0
  157. data/lib/sink/page_offset.rb +54 -0
  158. data/lib/sink/page_offset_no_start_field.rb +50 -0
  159. data/lib/sink/page_offset_total_count.rb +58 -0
  160. data/lib/sink/page_page_number.rb +58 -0
  161. data/lib/sink/page_page_number_without_current_page_response.rb +50 -0
  162. data/lib/sink/pooled_net_requester.rb +72 -0
  163. data/lib/sink/request_options.rb +89 -0
  164. data/lib/sink/resources/body_params/objects.rb +34 -0
  165. data/lib/sink/resources/body_params/unions.rb +34 -0
  166. data/lib/sink/resources/body_params.rb +630 -0
  167. data/lib/sink/resources/cards.rb +508 -0
  168. data/lib/sink/resources/casing/eeoc.rb +34 -0
  169. data/lib/sink/resources/casing.rb +16 -0
  170. data/lib/sink/resources/clients.rb +30 -0
  171. data/lib/sink/resources/company/payments.rb +30 -0
  172. data/lib/sink/resources/company.rb +18 -0
  173. data/lib/sink/resources/complex_queries.rb +60 -0
  174. data/lib/sink/resources/config_tools/parent_with_skip_node_python/child_only_skip_python.rb +99 -0
  175. data/lib/sink/resources/config_tools/parent_with_skip_node_python.rb +101 -0
  176. data/lib/sink/resources/config_tools.rb +40 -0
  177. data/lib/sink/resources/decorator_tests/keep_this_resource.rb +29 -0
  178. data/lib/sink/resources/decorator_tests/languages.rb +59 -0
  179. data/lib/sink/resources/decorator_tests/skip_this_resource.rb +28 -0
  180. data/lib/sink/resources/decorator_tests.rb +38 -0
  181. data/lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb +33 -0
  182. data/lib/sink/resources/deeply_nested/level_one/level_two.rb +35 -0
  183. data/lib/sink/resources/deeply_nested/level_one.rb +33 -0
  184. data/lib/sink/resources/deeply_nested.rb +16 -0
  185. data/lib/sink/resources/docstrings.rb +82 -0
  186. data/lib/sink/resources/empty_body.rb +60 -0
  187. data/lib/sink/resources/envelopes.rb +74 -0
  188. data/lib/sink/resources/files.rb +101 -0
  189. data/lib/sink/resources/header_params.rb +81 -0
  190. data/lib/sink/resources/invalid_schemas/arrays.rb +26 -0
  191. data/lib/sink/resources/invalid_schemas/objects.rb +26 -0
  192. data/lib/sink/resources/invalid_schemas.rb +20 -0
  193. data/lib/sink/resources/make_ambiguous_schemas_explicit.rb +26 -0
  194. data/lib/sink/resources/make_ambiguous_schemas_looser.rb +26 -0
  195. data/lib/sink/resources/method_config.rb +167 -0
  196. data/lib/sink/resources/mixed_params/duplicates.rb +79 -0
  197. data/lib/sink/resources/mixed_params.rb +88 -0
  198. data/lib/sink/resources/model_referenced_in_parent_and_child/child.rb +26 -0
  199. data/lib/sink/resources/model_referenced_in_parent_and_child.rb +28 -0
  200. data/lib/sink/resources/names/can_cause_clashes/employment_data.rb +16 -0
  201. data/lib/sink/resources/names/can_cause_clashes/response.rb +32 -0
  202. data/lib/sink/resources/names/can_cause_clashes.rb +23 -0
  203. data/lib/sink/resources/names/documents.rb +28 -0
  204. data/lib/sink/resources/names/openapi_specials.rb +26 -0
  205. data/lib/sink/resources/names/params.rb +52 -0
  206. data/lib/sink/resources/names/reserved_names/import.rb +31 -0
  207. data/lib/sink/resources/names/reserved_names/methods.rb +40 -0
  208. data/lib/sink/resources/names/reserved_names/public/class_.rb +30 -0
  209. data/lib/sink/resources/names/reserved_names/public/interface.rb +30 -0
  210. data/lib/sink/resources/names/reserved_names/public/private.rb +30 -0
  211. data/lib/sink/resources/names/reserved_names/public.rb +40 -0
  212. data/lib/sink/resources/names/reserved_names.rb +46 -0
  213. data/lib/sink/resources/names.rb +170 -0
  214. data/lib/sink/resources/openapi_formats.rb +53 -0
  215. data/lib/sink/resources/pagination_tests/cursor.rb +57 -0
  216. data/lib/sink/resources/pagination_tests/cursor_id.rb +34 -0
  217. data/lib/sink/resources/pagination_tests/cursor_url.rb +34 -0
  218. data/lib/sink/resources/pagination_tests/fake_pages.rb +33 -0
  219. data/lib/sink/resources/pagination_tests/items_types.rb +34 -0
  220. data/lib/sink/resources/pagination_tests/nested_items.rb +34 -0
  221. data/lib/sink/resources/pagination_tests/offset.rb +74 -0
  222. data/lib/sink/resources/pagination_tests/page_number.rb +54 -0
  223. data/lib/sink/resources/pagination_tests/page_number_without_current_page_response.rb +55 -0
  224. data/lib/sink/resources/pagination_tests/refs.rb +55 -0
  225. data/lib/sink/resources/pagination_tests/response_headers.rb +34 -0
  226. data/lib/sink/resources/pagination_tests/schema_types.rb +54 -0
  227. data/lib/sink/resources/pagination_tests/top_level_arrays.rb +34 -0
  228. data/lib/sink/resources/pagination_tests.rb +64 -0
  229. data/lib/sink/resources/parent/child.rb +30 -0
  230. data/lib/sink/resources/parent.rb +18 -0
  231. data/lib/sink/resources/path_params.rb +210 -0
  232. data/lib/sink/resources/positional_params.rb +237 -0
  233. data/lib/sink/resources/query_params.rb +166 -0
  234. data/lib/sink/resources/recursion/shared_responses.rb +26 -0
  235. data/lib/sink/resources/recursion.rb +68 -0
  236. data/lib/sink/resources/resource_refs/paginated_model_first_ref.rb +14 -0
  237. data/lib/sink/resources/resource_refs/paginated_model_second_ref.rb +14 -0
  238. data/lib/sink/resources/resource_refs/parent/child.rb +31 -0
  239. data/lib/sink/resources/resource_refs/parent.rb +32 -0
  240. data/lib/sink/resources/resource_refs.rb +24 -0
  241. data/lib/sink/resources/resources.rb +26 -0
  242. data/lib/sink/resources/responses/union_types.rb +98 -0
  243. data/lib/sink/resources/responses.rb +319 -0
  244. data/lib/sink/resources/shared_query_params.rb +48 -0
  245. data/lib/sink/resources/streaming.rb +106 -0
  246. data/lib/sink/resources/testing.rb +24 -0
  247. data/lib/sink/resources/tests.rb +26 -0
  248. data/lib/sink/resources/tools.rb +33 -0
  249. data/lib/sink/resources/types/allofs.rb +14 -0
  250. data/lib/sink/resources/types/arrays.rb +62 -0
  251. data/lib/sink/resources/types/enums.rb +95 -0
  252. data/lib/sink/resources/types/maps.rb +29 -0
  253. data/lib/sink/resources/types/objects.rb +105 -0
  254. data/lib/sink/resources/types/primitives.rb +34 -0
  255. data/lib/sink/resources/types/read_only_params.rb +34 -0
  256. data/lib/sink/resources/types/unions.rb +126 -0
  257. data/lib/sink/resources/types/write_only_responses.rb +28 -0
  258. data/lib/sink/resources/types.rb +95 -0
  259. data/lib/sink/resources/undocumented_resource.rb +47 -0
  260. data/lib/sink/resources/version_1_30_names.rb +41 -0
  261. data/lib/sink/resources/widgets.rb +30 -0
  262. data/lib/sink/util.rb +78 -0
  263. data/lib/sink/version.rb +5 -0
  264. data/lib/sink.rb +276 -0
  265. metadata +322 -0
@@ -0,0 +1,630 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sink
4
+ module Resources
5
+ class BodyParams
6
+ # @return [Sink::Resources::BodyParams::Objects]
7
+ attr_reader :objects
8
+
9
+ # @return [Sink::Resources::BodyParams::Unions]
10
+ attr_reader :unions
11
+
12
+ # @param client [Sink::Client]
13
+ def initialize(client:)
14
+ @client = client
15
+ @objects = Sink::Resources::BodyParams::Objects.new(client: client)
16
+ @unions = Sink::Resources::BodyParams::Unions.new(client: client)
17
+ end
18
+
19
+ # Endpoint with a `requestBody` that has an `type: string` schema and content
20
+ # `application/octet-stream` that is defined as a model in the config.
21
+ #
22
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
23
+ # @option params [String] :binary_string_body
24
+ #
25
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
26
+ #
27
+ # @return [nil]
28
+ def binary_string_type(params = {}, opts = {})
29
+ req = {
30
+ method: :post,
31
+ path: "/body_params/binary_string_type",
32
+ body: params[:binary_string_body],
33
+ headers: {"Content-Type" => "application/octet-stream"},
34
+ model: NilClass
35
+ }
36
+ @client.request(req, opts)
37
+ end
38
+
39
+ # An edge case where there are nested sub-properties of the same name with
40
+ # possible clashes.
41
+ #
42
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
43
+ # @option params [Baz, nil] :baz
44
+ # @option params [Foo, nil] :foo
45
+ # @option params [FooBar, nil] :foo_bar
46
+ # @option params [Mapping, nil] :mapping
47
+ # @option params [Array<Mapping>, nil] :mappings
48
+ #
49
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
50
+ #
51
+ # @return [Sink::Models::ModelWithNestedModel]
52
+ def duplicate_subproperty(params = {}, opts = {})
53
+ req = {
54
+ method: :post,
55
+ path: "/body_params/with_duplicate_subproperty",
56
+ body: params,
57
+ headers: {"Content-Type" => "application/json"},
58
+ model: Sink::Models::ModelWithNestedModel
59
+ }
60
+ @client.request(req, opts)
61
+ end
62
+
63
+ # Endpoint with a `requestBody` with various enums properties
64
+ #
65
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
66
+ # @option params [Integer, nil] :code
67
+ # @option params [Float, nil] :cost
68
+ # @option params [Boolean, nil] :enabled
69
+ # @option params [Symbol, Kind, nil] :kind
70
+ #
71
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
72
+ #
73
+ # @return [nil]
74
+ def enum_properties(params = {}, opts = {})
75
+ req = {
76
+ method: :post,
77
+ path: "/body_params/enum_properties",
78
+ body: params,
79
+ headers: {"Content-Type" => "application/json"},
80
+ model: NilClass
81
+ }
82
+ @client.request(req, opts)
83
+ end
84
+
85
+ # Should return a ModelWithNestedModel object with a `properties` field that we
86
+ # can rename in the Stainless config to a prettier name.
87
+ #
88
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
89
+ # @option params [Sink::Models::NestedRequestModelA, nil] :data
90
+ #
91
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
92
+ #
93
+ # @return [Sink::Models::ModelWithNestedModel]
94
+ def nested_request_models(params = {}, opts = {})
95
+ req = {
96
+ method: :post,
97
+ path: "/body_params/with_nested_models",
98
+ body: params,
99
+ headers: {"Content-Type" => "application/json"},
100
+ model: Sink::Models::ModelWithNestedModel
101
+ }
102
+ @client.request(req, opts)
103
+ end
104
+
105
+ # Endpoint with a `requestBody` that has an `type: null` schema that is defined as
106
+ # a model in the config.
107
+ #
108
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
109
+ # @option params [String] :name
110
+ # @option params [nil] :null_type_prop
111
+ #
112
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
113
+ #
114
+ # @return [nil]
115
+ def null_type(params = {}, opts = {})
116
+ req = {
117
+ method: :post,
118
+ path: "/body_params/null_type",
119
+ body: params,
120
+ headers: {"Content-Type" => "application/json"},
121
+ model: NilClass
122
+ }
123
+ @client.request(req, opts)
124
+ end
125
+
126
+ # Endpoint with a `requestBody` that has an `additionalProperties` object schema
127
+ # that is defined as a model in the config.
128
+ #
129
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
130
+ # @option params [Hash] :model_ref
131
+ # @option params [String] :name
132
+ #
133
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
134
+ #
135
+ # @return [nil]
136
+ def object_map_model_ref(params = {}, opts = {})
137
+ req = {
138
+ method: :post,
139
+ path: "/body_params/object_map_model_ref",
140
+ body: params,
141
+ headers: {"Content-Type" => "application/json"},
142
+ model: NilClass
143
+ }
144
+ @client.request(req, opts)
145
+ end
146
+
147
+ # Endpoint with an object `requestBody` that has an array property with `object`
148
+ # items.
149
+ #
150
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
151
+ # @option params [Array<ArrayProp>, nil] :array_prop
152
+ #
153
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
154
+ #
155
+ # @return [nil]
156
+ def object_with_array_of_objects(params = {}, opts = {})
157
+ req = {
158
+ method: :post,
159
+ path: "/body_params/object_with_array_of_objects",
160
+ body: params,
161
+ headers: {"Content-Type" => "application/json"},
162
+ model: NilClass
163
+ }
164
+ @client.request(req, opts)
165
+ end
166
+
167
+ # Endpoint with an object `requestBody` that has properties with union types.
168
+ #
169
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
170
+ # @option params [Bar::UnnamedTypeWithunionParent8, Sink::Models::SimpleObject] :bar
171
+ # @option params [Boolean, Float, Object, String] :foo
172
+ #
173
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
174
+ #
175
+ # @return [nil]
176
+ def object_with_union_properties(params = {}, opts = {})
177
+ req = {
178
+ method: :post,
179
+ path: "/body_params/object_with_union_properties",
180
+ body: params,
181
+ headers: {"Content-Type" => "application/json"},
182
+ model: NilClass
183
+ }
184
+ @client.request(req, opts)
185
+ end
186
+
187
+ # Endpoint with a `requestBody` that only has `readOnly` properties
188
+ #
189
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
190
+ #
191
+ # @return [nil]
192
+ def only_read_only_properties(opts = {})
193
+ req = {
194
+ method: :patch,
195
+ path: "/body_params/only_read_only_properties",
196
+ headers: {"Content-Type" => "application/json"},
197
+ model: NilClass
198
+ }
199
+ @client.request(req, opts)
200
+ end
201
+
202
+ # Endpoint with a `requestBody` that has a schema that is defined as a model in
203
+ # the config with "param" in the name.
204
+ #
205
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
206
+ # @option params [Hash] :model_ref
207
+ # @option params [String] :name
208
+ #
209
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
210
+ #
211
+ # @return [nil]
212
+ def param_in_model_name_ref(params = {}, opts = {})
213
+ req = {
214
+ method: :post,
215
+ path: "/body_params/param_in_model_name_ref",
216
+ body: params,
217
+ headers: {"Content-Type" => "application/json"},
218
+ model: NilClass
219
+ }
220
+ @client.request(req, opts)
221
+ end
222
+
223
+ # Endpoint with a `requestBody` that has a property that is defined as a model in
224
+ # the config.
225
+ #
226
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
227
+ # @option params [Sink::Models::MyModel] :model_ref
228
+ # @option params [String] :name
229
+ #
230
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
231
+ #
232
+ # @return [nil]
233
+ def property_model_ref(params = {}, opts = {})
234
+ req = {
235
+ method: :post,
236
+ path: "/body_params/property_model_ref",
237
+ body: params,
238
+ headers: {"Content-Type" => "application/json"},
239
+ model: NilClass
240
+ }
241
+ @client.request(req, opts)
242
+ end
243
+
244
+ # Endpoint with a `requestBody` that has a property that is a union type of
245
+ # complex types.
246
+ #
247
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
248
+ # @option params [String] :name
249
+ # @option params [Unions::UnnamedTypeWithunionParent10, Unions::UnnamedTypeWithunionParent9] :unions This is an object with required properties
250
+ #
251
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
252
+ #
253
+ # @return [nil]
254
+ def property_with_complex_union(params = {}, opts = {})
255
+ req = {
256
+ method: :post,
257
+ path: "/body_params/property_with_complex_union",
258
+ body: params,
259
+ headers: {"Content-Type" => "application/json"},
260
+ model: NilClass
261
+ }
262
+ @client.request(req, opts)
263
+ end
264
+
265
+ # Endpoint with a `requestBody` that has a property that is a union type of
266
+ # complex types with a lot of nesting.
267
+ #
268
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
269
+ # @option params [Array<Filter::UnnamedTypeWithunionParent11, Filter::UnnamedTypeWithunionParent12>, nil] :filters
270
+ #
271
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
272
+ #
273
+ # @return [nil]
274
+ def property_with_heavily_nested_complex_union(params = {}, opts = {})
275
+ req = {
276
+ method: :post,
277
+ path: "/body_params/property_with_heavily_nested_complex_union",
278
+ body: params,
279
+ headers: {"Content-Type" => "application/json"},
280
+ model: NilClass
281
+ }
282
+ @client.request(req, opts)
283
+ end
284
+
285
+ # Endpoint with a `requestBody` that sets `readOnly` to `true` on top level
286
+ # properties
287
+ #
288
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
289
+ # @option params [Boolean, nil] :in_both
290
+ #
291
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
292
+ #
293
+ # @return [nil]
294
+ def read_only_properties(params = {}, opts = {})
295
+ req = {
296
+ method: :post,
297
+ path: "/body_params/read_only_properties",
298
+ body: params,
299
+ headers: {"Content-Type" => "application/json"},
300
+ model: NilClass
301
+ }
302
+ @client.request(req, opts)
303
+ end
304
+
305
+ # Endpoint with a `requestBody` that has an `additionalProperties` string schema
306
+ # that is defined as a model in the config.
307
+ #
308
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
309
+ # @option params [Hash] :model_ref
310
+ # @option params [String] :name
311
+ #
312
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
313
+ #
314
+ # @return [nil]
315
+ def string_map_model_ref(params = {}, opts = {})
316
+ req = {
317
+ method: :post,
318
+ path: "/body_params/string_map_model_ref",
319
+ body: params,
320
+ headers: {"Content-Type" => "application/json"},
321
+ model: NilClass
322
+ }
323
+ @client.request(req, opts)
324
+ end
325
+
326
+ # Endpoint with a `requestBody` making use of allOf.
327
+ #
328
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
329
+ # @option params [Boolean] :is_foo
330
+ # @option params [Symbol, Kind] :kind
331
+ #
332
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
333
+ #
334
+ # @return [Sink::Models::BodyParamTopLevelAllOfResponse]
335
+ def top_level_all_of(params = {}, opts = {})
336
+ req = {
337
+ method: :post,
338
+ path: "/body_params/top_level_allOf",
339
+ body: params,
340
+ headers: {"Content-Type" => "application/json"},
341
+ model: Sink::Models::BodyParamTopLevelAllOfResponse
342
+ }
343
+ @client.request(req, opts)
344
+ end
345
+
346
+ # Endpoint with a `requestBody` making use of allOf where one of the properties is
347
+ # an object type.
348
+ #
349
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
350
+ # @option params [Symbol, Kind] :kind
351
+ # @option params [NestedObj, nil] :nested_obj This is an object with required properties
352
+ #
353
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
354
+ #
355
+ # @return [nil]
356
+ def top_level_all_of_nested_object(params = {}, opts = {})
357
+ req = {
358
+ method: :post,
359
+ path: "/body_params/top_level_allOf_nested_object",
360
+ body: params,
361
+ headers: {"Content-Type" => "application/json"},
362
+ model: NilClass
363
+ }
364
+ @client.request(req, opts)
365
+ end
366
+
367
+ # Endpoint with a `requestBody` making use of anyOf.
368
+ #
369
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
370
+ # @option params [Symbol, Kind] :kind
371
+ # @option params [Boolean] :is_foo
372
+ #
373
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
374
+ #
375
+ # @return [Sink::Models::BodyParamTopLevelAnyOfResponse::UnnamedTypeWithunionParent13, Sink::Models::BodyParamTopLevelAnyOfResponse::UnnamedTypeWithunionParent14]
376
+ def top_level_any_of(params = {}, opts = {})
377
+ req = {
378
+ method: :post,
379
+ path: "/body_params/top_level_anyOf",
380
+ body: params,
381
+ headers: {"Content-Type" => "application/json"},
382
+ model: Sink::Unknown
383
+ }
384
+ @client.request(req, opts)
385
+ end
386
+
387
+ # Endpoint with a `requestBody` pointing to a $ref'd schema that is an `anyOf`.
388
+ #
389
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
390
+ # @option params [Symbol, Kind] :kind
391
+ # @option params [Boolean] :is_foo
392
+ #
393
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
394
+ #
395
+ # @return [Sink::Models::BasicSharedModelObject]
396
+ def top_level_any_of_with_ref(params = {}, opts = {})
397
+ req = {
398
+ method: :post,
399
+ path: "/body_params/top_level_anyOf_with_ref",
400
+ body: params,
401
+ headers: {"Content-Type" => "application/json"},
402
+ model: Sink::Models::BasicSharedModelObject
403
+ }
404
+ @client.request(req, opts)
405
+ end
406
+
407
+ # Endpoint with a `requestBody` that is an `array` type.
408
+ #
409
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
410
+ # @option params [Array<Sink::Models::BasicSharedModelObject>] :items
411
+ #
412
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
413
+ #
414
+ # @return [nil]
415
+ def top_level_array(params = {}, opts = {})
416
+ req = {
417
+ method: :post,
418
+ path: "/body_params/top_level_array",
419
+ body: params[:items],
420
+ headers: {"Content-Type" => "application/json"},
421
+ model: NilClass
422
+ }
423
+ @client.request(req, opts)
424
+ end
425
+
426
+ # Endpoint with a `requestBody` that is an `array` type with non-model children.
427
+ #
428
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
429
+ # @option params [Array<Item>] :items
430
+ #
431
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
432
+ #
433
+ # @return [nil]
434
+ def top_level_array_with_children(params = {}, opts = {})
435
+ req = {
436
+ method: :post,
437
+ path: "/body_params/top_level_array_with_children",
438
+ body: params[:items],
439
+ headers: {"Content-Type" => "application/json"},
440
+ model: NilClass
441
+ }
442
+ @client.request(req, opts)
443
+ end
444
+
445
+ # Endpoint with a `requestBody` that is an `array` type.
446
+ #
447
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
448
+ # @option params [String] :id Query param:
449
+ # @option params [Array<Sink::Models::BasicSharedModelObject>] :items Body param:
450
+ #
451
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
452
+ #
453
+ # @return [nil]
454
+ def top_level_array_with_other_params(params = {}, opts = {})
455
+ req = {
456
+ method: :post,
457
+ path: "/body_params/top_level_array_with_other_params",
458
+ body: params[:items],
459
+ query: params.except(:items),
460
+ headers: {"Content-Type" => "application/json"},
461
+ model: NilClass
462
+ }
463
+ @client.request(req, opts)
464
+ end
465
+
466
+ # Endpoint with a `requestBody` making use of oneOf.
467
+ #
468
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
469
+ # @option params [Symbol, Kind] :kind
470
+ # @option params [Boolean] :is_foo
471
+ #
472
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
473
+ #
474
+ # @return [Sink::Models::BodyParamTopLevelOneOfResponse::UnnamedTypeWithunionParent15, Sink::Models::BodyParamTopLevelOneOfResponse::UnnamedTypeWithunionParent16]
475
+ def top_level_one_of(params = {}, opts = {})
476
+ req = {
477
+ method: :post,
478
+ path: "/body_params/top_level_oneOf",
479
+ body: params,
480
+ headers: {"Content-Type" => "application/json"},
481
+ model: Sink::Unknown
482
+ }
483
+ @client.request(req, opts)
484
+ end
485
+
486
+ # Endpoint with a `requestBody` making use of oneOf but only contains one entry in
487
+ # the union.
488
+ #
489
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
490
+ # @option params [Symbol, Kind] :kind
491
+ #
492
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
493
+ #
494
+ # @return [nil]
495
+ def top_level_one_of_one_entry(params = {}, opts = {})
496
+ req = {
497
+ method: :post,
498
+ path: "/body_params/top_level_oneOf_one_entry",
499
+ body: params,
500
+ headers: {"Content-Type" => "application/json"},
501
+ model: NilClass
502
+ }
503
+ @client.request(req, opts)
504
+ end
505
+
506
+ # The request body being set to a $ref that is a shared type in the stainless
507
+ # config correctly references it.
508
+ #
509
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
510
+ # @option params [Sink::Models::SimpleObject, nil] :bar
511
+ # @option params [String, nil] :foo
512
+ #
513
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
514
+ #
515
+ # @return [nil]
516
+ def top_level_shared_type(params = {}, opts = {})
517
+ req = {
518
+ method: :post,
519
+ path: "/body_params/top_level_shared_type",
520
+ body: params,
521
+ headers: {"Content-Type" => "application/json"},
522
+ model: NilClass
523
+ }
524
+ @client.request(req, opts)
525
+ end
526
+
527
+ # Endpoint with a `requestBody` making use of anyOf where the same property is
528
+ # defined in both variants.
529
+ #
530
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
531
+ # @option params [Boolean, nil] :foo FOO 2
532
+ #
533
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
534
+ #
535
+ # @return [Sink::Models::BodyParamUnionOverlappingPropResponse]
536
+ def union_overlapping_prop(params = {}, opts = {})
537
+ req = {
538
+ method: :post,
539
+ path: "/body_params/top_level_anyOf_overlapping_property",
540
+ body: params,
541
+ headers: {"Content-Type" => "application/json"},
542
+ model: Sink::Models::BodyParamUnionOverlappingPropResponse
543
+ }
544
+ @client.request(req, opts)
545
+ end
546
+
547
+ # Endpoint with a `requestBody` that has an untyped object schema that is defined
548
+ # as a model in the config.
549
+ #
550
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
551
+ # @option params [String] :name
552
+ # @option params [Object] :unknown_object_prop
553
+ #
554
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
555
+ #
556
+ # @return [nil]
557
+ def unknown_object(params = {}, opts = {})
558
+ req = {
559
+ method: :post,
560
+ path: "/body_params/unknown_object",
561
+ body: params,
562
+ headers: {"Content-Type" => "application/json"},
563
+ model: NilClass
564
+ }
565
+ @client.request(req, opts)
566
+ end
567
+
568
+ # Endpoint with an optional request property that has a default value set.
569
+ #
570
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
571
+ # @option params [String, nil] :my_version_body_param
572
+ # @option params [Boolean, nil] :normal_param
573
+ #
574
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
575
+ #
576
+ # @return [nil]
577
+ def with_default_body_param_optional(params = {}, opts = {})
578
+ req = {
579
+ method: :post,
580
+ path: "/body_params/with_default_body_param_optional",
581
+ body: params,
582
+ headers: {"Content-Type" => "application/json"},
583
+ model: NilClass
584
+ }
585
+ @client.request(req, opts)
586
+ end
587
+
588
+ # Endpoint with a required request property that has a default value set.
589
+ #
590
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
591
+ # @option params [String] :my_version_body_param
592
+ # @option params [Boolean] :normal_param
593
+ #
594
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
595
+ #
596
+ # @return [nil]
597
+ def with_default_body_param_required(params = {}, opts = {})
598
+ req = {
599
+ method: :post,
600
+ path: "/body_params/with_default_body_param_required",
601
+ body: params,
602
+ headers: {"Content-Type" => "application/json"},
603
+ model: NilClass
604
+ }
605
+ @client.request(req, opts)
606
+ end
607
+
608
+ # Endpoint with a request body that contains a property that points to a model
609
+ # reference.
610
+ #
611
+ # @param params [Hash{Symbol => Object}] Attributes to send in this request.
612
+ # @option params [String, nil] :foo
613
+ # @option params [Sink::Models::MyModel, nil] :my_model
614
+ #
615
+ # @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
616
+ #
617
+ # @return [nil]
618
+ def with_model_property(params = {}, opts = {})
619
+ req = {
620
+ method: :post,
621
+ path: "/body_params/with_model_property",
622
+ body: params,
623
+ headers: {"Content-Type" => "application/json"},
624
+ model: NilClass
625
+ }
626
+ @client.request(req, opts)
627
+ end
628
+ end
629
+ end
630
+ end