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.
- checksums.yaml +7 -0
- data/README.md +151 -0
- data/lib/sink/base_client.rb +404 -0
- data/lib/sink/base_model.rb +226 -0
- data/lib/sink/client.rb +391 -0
- data/lib/sink/fake_page.rb +44 -0
- data/lib/sink/models/address.rb +55 -0
- data/lib/sink/models/allof_base_parent.rb +18 -0
- data/lib/sink/models/allof_multiple_inline_entries.rb +15 -0
- data/lib/sink/models/api_status.rb +18 -0
- data/lib/sink/models/array_float_items_response.rb +6 -0
- data/lib/sink/models/array_missing_items_response.rb +18 -0
- data/lib/sink/models/array_object_items.rb +18 -0
- data/lib/sink/models/array_object_items_response.rb +18 -0
- data/lib/sink/models/array_recursion.rb +6 -0
- data/lib/sink/models/balance.rb +18 -0
- data/lib/sink/models/basic_shared_model_object.rb +23 -0
- data/lib/sink/models/body_param_top_level_all_of_response.rb +28 -0
- data/lib/sink/models/body_param_top_level_any_of_response.rb +6 -0
- data/lib/sink/models/body_param_top_level_one_of_response.rb +6 -0
- data/lib/sink/models/body_param_union_overlapping_prop_response.rb +19 -0
- data/lib/sink/models/card.rb +211 -0
- data/lib/sink/models/card_list_response.rb +36 -0
- data/lib/sink/models/card_provision_foo_response.rb +18 -0
- data/lib/sink/models/child_inlined_response_response.rb +18 -0
- data/lib/sink/models/child_model.rb +36 -0
- data/lib/sink/models/class_.rb +18 -0
- data/lib/sink/models/client.rb +23 -0
- data/lib/sink/models/company.rb +18 -0
- data/lib/sink/models/company_payment.rb +18 -0
- data/lib/sink/models/complex_query_array_query_response.rb +26 -0
- data/lib/sink/models/config_tool_model_ref_from_nested_response_body_response.rb +32 -0
- data/lib/sink/models/currency.rb +23 -0
- data/lib/sink/models/decorator_test_keep_me_response.rb +18 -0
- data/lib/sink/models/docstring_leading_double_quote_response.rb +20 -0
- data/lib/sink/models/docstring_trailing_double_quote_response.rb +32 -0
- data/lib/sink/models/documents.rb +23 -0
- data/lib/sink/models/eeoc.rb +18 -0
- data/lib/sink/models/employment_data.rb +18 -0
- data/lib/sink/models/enum_basic_response.rb +62 -0
- data/lib/sink/models/envelope_inline_response_response.rb +18 -0
- data/lib/sink/models/envelope_wrapped_array_response.rb +6 -0
- data/lib/sink/models/export.rb +19 -0
- data/lib/sink/models/file_create_multipart_response.rb +18 -0
- data/lib/sink/models/file_everything_multipart_response.rb +19 -0
- data/lib/sink/models/file_no_file_multipart_response.rb +18 -0
- data/lib/sink/models/file_with_optional_param_response.rb +18 -0
- data/lib/sink/models/funding_account.rb +100 -0
- data/lib/sink/models/import.rb +18 -0
- data/lib/sink/models/interface.rb +18 -0
- data/lib/sink/models/keep_this_resource_keep_this_method_response.rb +19 -0
- data/lib/sink/models/make_ambiguous_schemas_explicit_make_ambiguous_schemas_explicit_response.rb +45 -0
- data/lib/sink/models/make_ambiguous_schemas_looser_make_ambiguous_schemas_looser_response.rb +45 -0
- data/lib/sink/models/map_nullable_items_response.rb +28 -0
- data/lib/sink/models/method_config_skipped_tests_all_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_go_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_java_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_kotlin_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_node_and_python_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_node_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_python_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_ruby_response.rb +19 -0
- data/lib/sink/models/model_from_nested_path.rb +39 -0
- data/lib/sink/models/model_from_nested_response_body_ref.rb +18 -0
- data/lib/sink/models/model_from_schemas_ref.rb +18 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri.rb +18 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jmespath.rb +19 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jsonpath.rb +19 -0
- data/lib/sink/models/model_level_1.rb +22 -0
- data/lib/sink/models/model_level_2.rb +22 -0
- data/lib/sink/models/model_level_3.rb +22 -0
- data/lib/sink/models/model_referenced_in_parent_and_child.rb +19 -0
- data/lib/sink/models/model_with_nested_model.rb +24 -0
- data/lib/sink/models/my_model.rb +18 -0
- data/lib/sink/models/name_child_prop_import_clash_response.rb +37 -0
- data/lib/sink/models/name_properties_common_conflicts_response.rb +84 -0
- data/lib/sink/models/name_properties_illegal_go_identifiers_response.rb +19 -0
- data/lib/sink/models/name_properties_illegal_javascript_identifiers_response.rb +6 -0
- data/lib/sink/models/name_response_property_clashes_model_import_response.rb +24 -0
- data/lib/sink/models/name_response_shadows_pydantic_response.rb +24 -0
- data/lib/sink/models/nested_request_model_a.rb +18 -0
- data/lib/sink/models/nested_request_model_b.rb +18 -0
- data/lib/sink/models/nested_request_model_c.rb +31 -0
- data/lib/sink/models/object_missing_items_response.rb +18 -0
- data/lib/sink/models/object_mixed_known_and_unknown_response.rb +19 -0
- data/lib/sink/models/object_multiple_array_properties_same_ref_response.rb +73 -0
- data/lib/sink/models/object_multiple_properties_same_model_response.rb +29 -0
- data/lib/sink/models/object_multiple_properties_same_ref_response.rb +68 -0
- data/lib/sink/models/object_skipped_props.rb +38 -0
- data/lib/sink/models/object_two_dimensional_array_primitive_property_response.rb +34 -0
- data/lib/sink/models/object_with_any_of_null_property.rb +31 -0
- data/lib/sink/models/object_with_child_ref.rb +23 -0
- data/lib/sink/models/object_with_one_of_null_property.rb +31 -0
- data/lib/sink/models/object_with_union_properties.rb +23 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_response.rb +19 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_with_null_response.rb +19 -0
- data/lib/sink/models/openapi_special_used_used_as_property_name_response.rb +19 -0
- data/lib/sink/models/page_cursor_shared_ref_pagination.rb +23 -0
- data/lib/sink/models/parent_model_with_child_ref.rb +28 -0
- data/lib/sink/models/path_param_colon_suffix_response.rb +18 -0
- data/lib/sink/models/path_param_file_extension_response.rb +18 -0
- data/lib/sink/models/path_param_multiple_response.rb +18 -0
- data/lib/sink/models/path_param_query_param_response.rb +18 -0
- data/lib/sink/models/path_param_singular_response.rb +18 -0
- data/lib/sink/models/primitive_strings_response.rb +18 -0
- data/lib/sink/models/private.rb +18 -0
- data/lib/sink/models/public.rb +18 -0
- data/lib/sink/models/recursion_create_envelope_response.rb +19 -0
- data/lib/sink/models/response_allof_simple_response.rb +23 -0
- data/lib/sink/models/response_array_object_with_union_properties_response.rb +6 -0
- data/lib/sink/models/response_array_response_response.rb +6 -0
- data/lib/sink/models/response_missing_required_response.rb +24 -0
- data/lib/sink/models/response_nested_array_response.rb +36 -0
- data/lib/sink/models/response_object_all_properties_response.rb +65 -0
- data/lib/sink/models/response_object_no_properties_response.rb +14 -0
- data/lib/sink/models/response_object_with_additional_properties_prop_response.rb +32 -0
- data/lib/sink/models/response_object_with_heavily_nested_union_response.rb +19 -0
- data/lib/sink/models/response_only_read_only_properties_response.rb +25 -0
- data/lib/sink/models/responses_allof_cross_object.rb +23 -0
- data/lib/sink/models/return_.rb +18 -0
- data/lib/sink/models/root_response.rb +31 -0
- data/lib/sink/models/self_recursion.rb +23 -0
- data/lib/sink/models/shared_cursor_nested_response_prop_meta.rb +33 -0
- data/lib/sink/models/shared_self_recursion.rb +23 -0
- data/lib/sink/models/shipping_address.rb +85 -0
- data/lib/sink/models/simple_allof.rb +28 -0
- data/lib/sink/models/simple_object.rb +32 -0
- data/lib/sink/models/skip_this_resource_i_never_appear_response.rb +19 -0
- data/lib/sink/models/streaming_basic_response.rb +23 -0
- data/lib/sink/models/streaming_nested_params_response.rb +23 -0
- data/lib/sink/models/streaming_no_discriminator_response.rb +24 -0
- data/lib/sink/models/streaming_query_param_discriminator_response.rb +24 -0
- data/lib/sink/models/streaming_with_unrelated_default_param_response.rb +24 -0
- data/lib/sink/models/type_dates_response.rb +38 -0
- data/lib/sink/models/type_datetimes_response.rb +38 -0
- data/lib/sink/models/union_discriminated_variant_a.rb +27 -0
- data/lib/sink/models/union_discriminated_variant_b.rb +27 -0
- data/lib/sink/models/union_response_discriminated_by_property_name_response.rb +6 -0
- data/lib/sink/models/union_response_discriminated_with_basic_mapping_response.rb +6 -0
- data/lib/sink/models/union_type_mixed_types_response.rb +6 -0
- data/lib/sink/models/union_type_nullable_union_response.rb +6 -0
- data/lib/sink/models/union_type_objects_response.rb +6 -0
- data/lib/sink/models/union_type_super_mixed_types_response.rb +6 -0
- data/lib/sink/models/union_type_unknown_variant_response.rb +6 -0
- data/lib/sink/models/version_1_30_name_create_response.rb +18 -0
- data/lib/sink/models/widget.rb +19 -0
- data/lib/sink/models/write_only_response_simple_response.rb +21 -0
- data/lib/sink/page_cursor.rb +54 -0
- data/lib/sink/page_cursor_from_headers.rb +54 -0
- data/lib/sink/page_cursor_id.rb +50 -0
- data/lib/sink/page_cursor_nested_items.rb +84 -0
- data/lib/sink/page_cursor_nested_object_ref.rb +71 -0
- data/lib/sink/page_cursor_shared_ref.rb +72 -0
- data/lib/sink/page_cursor_top_level_array.rb +51 -0
- data/lib/sink/page_cursor_url.rb +51 -0
- data/lib/sink/page_cursor_with_reverse.rb +58 -0
- data/lib/sink/page_offset.rb +54 -0
- data/lib/sink/page_offset_no_start_field.rb +50 -0
- data/lib/sink/page_offset_total_count.rb +58 -0
- data/lib/sink/page_page_number.rb +58 -0
- data/lib/sink/page_page_number_without_current_page_response.rb +50 -0
- data/lib/sink/pooled_net_requester.rb +72 -0
- data/lib/sink/request_options.rb +89 -0
- data/lib/sink/resources/body_params/objects.rb +34 -0
- data/lib/sink/resources/body_params/unions.rb +34 -0
- data/lib/sink/resources/body_params.rb +630 -0
- data/lib/sink/resources/cards.rb +508 -0
- data/lib/sink/resources/casing/eeoc.rb +34 -0
- data/lib/sink/resources/casing.rb +16 -0
- data/lib/sink/resources/clients.rb +30 -0
- data/lib/sink/resources/company/payments.rb +30 -0
- data/lib/sink/resources/company.rb +18 -0
- data/lib/sink/resources/complex_queries.rb +60 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python/child_only_skip_python.rb +99 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python.rb +101 -0
- data/lib/sink/resources/config_tools.rb +40 -0
- data/lib/sink/resources/decorator_tests/keep_this_resource.rb +29 -0
- data/lib/sink/resources/decorator_tests/languages.rb +59 -0
- data/lib/sink/resources/decorator_tests/skip_this_resource.rb +28 -0
- data/lib/sink/resources/decorator_tests.rb +38 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb +33 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two.rb +35 -0
- data/lib/sink/resources/deeply_nested/level_one.rb +33 -0
- data/lib/sink/resources/deeply_nested.rb +16 -0
- data/lib/sink/resources/docstrings.rb +82 -0
- data/lib/sink/resources/empty_body.rb +60 -0
- data/lib/sink/resources/envelopes.rb +74 -0
- data/lib/sink/resources/files.rb +101 -0
- data/lib/sink/resources/header_params.rb +81 -0
- data/lib/sink/resources/invalid_schemas/arrays.rb +26 -0
- data/lib/sink/resources/invalid_schemas/objects.rb +26 -0
- data/lib/sink/resources/invalid_schemas.rb +20 -0
- data/lib/sink/resources/make_ambiguous_schemas_explicit.rb +26 -0
- data/lib/sink/resources/make_ambiguous_schemas_looser.rb +26 -0
- data/lib/sink/resources/method_config.rb +167 -0
- data/lib/sink/resources/mixed_params/duplicates.rb +79 -0
- data/lib/sink/resources/mixed_params.rb +88 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child/child.rb +26 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child.rb +28 -0
- data/lib/sink/resources/names/can_cause_clashes/employment_data.rb +16 -0
- data/lib/sink/resources/names/can_cause_clashes/response.rb +32 -0
- data/lib/sink/resources/names/can_cause_clashes.rb +23 -0
- data/lib/sink/resources/names/documents.rb +28 -0
- data/lib/sink/resources/names/openapi_specials.rb +26 -0
- data/lib/sink/resources/names/params.rb +52 -0
- data/lib/sink/resources/names/reserved_names/import.rb +31 -0
- data/lib/sink/resources/names/reserved_names/methods.rb +40 -0
- data/lib/sink/resources/names/reserved_names/public/class_.rb +30 -0
- data/lib/sink/resources/names/reserved_names/public/interface.rb +30 -0
- data/lib/sink/resources/names/reserved_names/public/private.rb +30 -0
- data/lib/sink/resources/names/reserved_names/public.rb +40 -0
- data/lib/sink/resources/names/reserved_names.rb +46 -0
- data/lib/sink/resources/names.rb +170 -0
- data/lib/sink/resources/openapi_formats.rb +53 -0
- data/lib/sink/resources/pagination_tests/cursor.rb +57 -0
- data/lib/sink/resources/pagination_tests/cursor_id.rb +34 -0
- data/lib/sink/resources/pagination_tests/cursor_url.rb +34 -0
- data/lib/sink/resources/pagination_tests/fake_pages.rb +33 -0
- data/lib/sink/resources/pagination_tests/items_types.rb +34 -0
- data/lib/sink/resources/pagination_tests/nested_items.rb +34 -0
- data/lib/sink/resources/pagination_tests/offset.rb +74 -0
- data/lib/sink/resources/pagination_tests/page_number.rb +54 -0
- data/lib/sink/resources/pagination_tests/page_number_without_current_page_response.rb +55 -0
- data/lib/sink/resources/pagination_tests/refs.rb +55 -0
- data/lib/sink/resources/pagination_tests/response_headers.rb +34 -0
- data/lib/sink/resources/pagination_tests/schema_types.rb +54 -0
- data/lib/sink/resources/pagination_tests/top_level_arrays.rb +34 -0
- data/lib/sink/resources/pagination_tests.rb +64 -0
- data/lib/sink/resources/parent/child.rb +30 -0
- data/lib/sink/resources/parent.rb +18 -0
- data/lib/sink/resources/path_params.rb +210 -0
- data/lib/sink/resources/positional_params.rb +237 -0
- data/lib/sink/resources/query_params.rb +166 -0
- data/lib/sink/resources/recursion/shared_responses.rb +26 -0
- data/lib/sink/resources/recursion.rb +68 -0
- data/lib/sink/resources/resource_refs/paginated_model_first_ref.rb +14 -0
- data/lib/sink/resources/resource_refs/paginated_model_second_ref.rb +14 -0
- data/lib/sink/resources/resource_refs/parent/child.rb +31 -0
- data/lib/sink/resources/resource_refs/parent.rb +32 -0
- data/lib/sink/resources/resource_refs.rb +24 -0
- data/lib/sink/resources/resources.rb +26 -0
- data/lib/sink/resources/responses/union_types.rb +98 -0
- data/lib/sink/resources/responses.rb +319 -0
- data/lib/sink/resources/shared_query_params.rb +48 -0
- data/lib/sink/resources/streaming.rb +106 -0
- data/lib/sink/resources/testing.rb +24 -0
- data/lib/sink/resources/tests.rb +26 -0
- data/lib/sink/resources/tools.rb +33 -0
- data/lib/sink/resources/types/allofs.rb +14 -0
- data/lib/sink/resources/types/arrays.rb +62 -0
- data/lib/sink/resources/types/enums.rb +95 -0
- data/lib/sink/resources/types/maps.rb +29 -0
- data/lib/sink/resources/types/objects.rb +105 -0
- data/lib/sink/resources/types/primitives.rb +34 -0
- data/lib/sink/resources/types/read_only_params.rb +34 -0
- data/lib/sink/resources/types/unions.rb +126 -0
- data/lib/sink/resources/types/write_only_responses.rb +28 -0
- data/lib/sink/resources/types.rb +95 -0
- data/lib/sink/resources/undocumented_resource.rb +47 -0
- data/lib/sink/resources/version_1_30_names.rb +41 -0
- data/lib/sink/resources/widgets.rb +30 -0
- data/lib/sink/util.rb +78 -0
- data/lib/sink/version.rb +5 -0
- data/lib/sink.rb +276 -0
- metadata +322 -0
@@ -0,0 +1,237 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class PositionalParams
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Endpoint with no positional params and a body param.
|
12
|
+
#
|
13
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
14
|
+
# @option params [String] :key1
|
15
|
+
# @option params [String, nil] :options
|
16
|
+
#
|
17
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
18
|
+
#
|
19
|
+
# @return [nil]
|
20
|
+
def basic_body(params = {}, opts = {})
|
21
|
+
req = {
|
22
|
+
method: :post,
|
23
|
+
path: "/positional_params/basic_body",
|
24
|
+
body: params,
|
25
|
+
headers: {"Content-Type" => "application/json"},
|
26
|
+
model: NilClass
|
27
|
+
}
|
28
|
+
@client.request(req, opts)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Endpoint with no positional params and a query object.
|
32
|
+
#
|
33
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
34
|
+
# @option params [String] :key1
|
35
|
+
#
|
36
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
37
|
+
#
|
38
|
+
# @return [nil]
|
39
|
+
def basic_query(params = {}, opts = {})
|
40
|
+
req = {
|
41
|
+
method: :get,
|
42
|
+
path: "/positional_params/basic_query",
|
43
|
+
query: params,
|
44
|
+
model: NilClass
|
45
|
+
}
|
46
|
+
@client.request(req, opts)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Endpoint with no positional params and a body object.
|
50
|
+
#
|
51
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
52
|
+
# @option params [String, nil] :foo
|
53
|
+
#
|
54
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
55
|
+
#
|
56
|
+
# @return [nil]
|
57
|
+
def body(params = {}, opts = {})
|
58
|
+
req = {
|
59
|
+
method: :post,
|
60
|
+
path: "/positional_params/body",
|
61
|
+
body: params,
|
62
|
+
headers: {"Content-Type" => "application/json"},
|
63
|
+
model: NilClass
|
64
|
+
}
|
65
|
+
@client.request(req, opts)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Endpoint with no positional params and a body object.
|
69
|
+
#
|
70
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
71
|
+
# @option params [String] :extra_key
|
72
|
+
# @option params [String, nil] :foo
|
73
|
+
#
|
74
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
75
|
+
#
|
76
|
+
# @return [nil]
|
77
|
+
def body_extra_param(params = {}, opts = {})
|
78
|
+
req = {
|
79
|
+
method: :post,
|
80
|
+
path: "/positional_params/body_extra_param",
|
81
|
+
body: params,
|
82
|
+
headers: {"Content-Type" => "application/json"},
|
83
|
+
model: NilClass
|
84
|
+
}
|
85
|
+
@client.request(req, opts)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Endpoint with everything under the sun (to excercise positional params).
|
89
|
+
#
|
90
|
+
# @param id [String] Path param:
|
91
|
+
#
|
92
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
93
|
+
# @option params [String] :key Path param:
|
94
|
+
# @option params [String] :im_a_camel Query param:
|
95
|
+
# @option params [Boolean] :option1 Query param:
|
96
|
+
# @option params [String] :camel_case Body param:
|
97
|
+
# @option params [String, nil] :option2 Query param:
|
98
|
+
# @option params [String, nil] :really_cool_snake Query param:
|
99
|
+
# @option params [Float, nil] :bar Body param: Some cool description.
|
100
|
+
# @option params [String, nil] :options Body param:
|
101
|
+
# @option params [String, nil] :x_custom_header Header param:
|
102
|
+
#
|
103
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
104
|
+
#
|
105
|
+
# @return [nil]
|
106
|
+
def kitchen_sink(id, params = {}, opts = {})
|
107
|
+
query_params = [:imACamel, :option1, :option2, :really_cool_snake]
|
108
|
+
req = {
|
109
|
+
method: :post,
|
110
|
+
path: "/positional_params/query/#{id}/kitchen_sink/#{params.fetch(:key)}",
|
111
|
+
query: params.slice(*query_params),
|
112
|
+
body: params.except(*query_params),
|
113
|
+
headers: {"Content-Type" => "application/json"},
|
114
|
+
model: NilClass
|
115
|
+
}
|
116
|
+
@client.request(req, opts)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Endpoint with a positional path parameter in the middle.
|
120
|
+
#
|
121
|
+
# @param second [String] Path param:
|
122
|
+
#
|
123
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
124
|
+
# @option params [String] :first Path param: Something first.
|
125
|
+
# @option params [String] :last Path param: Something Last.
|
126
|
+
# @option params [String] :name Body param:
|
127
|
+
# @option params [String, nil] :options Body param:
|
128
|
+
#
|
129
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
130
|
+
#
|
131
|
+
# @return [nil]
|
132
|
+
def multiple_path_params(second, params = {}, opts = {})
|
133
|
+
req = {
|
134
|
+
method: :post,
|
135
|
+
path: "/positional_params/#{params.fetch(:first)}/#{second}/#{params.fetch(:last)}",
|
136
|
+
body: params,
|
137
|
+
headers: {"Content-Type" => "application/json"},
|
138
|
+
model: NilClass
|
139
|
+
}
|
140
|
+
@client.request(req, opts)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Endpoint with a positional query parameter.
|
144
|
+
#
|
145
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
146
|
+
# @option params [String] :foo
|
147
|
+
#
|
148
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
149
|
+
#
|
150
|
+
# @return [nil]
|
151
|
+
def query(params = {}, opts = {})
|
152
|
+
req = {
|
153
|
+
method: :get,
|
154
|
+
path: "/positional_params/query",
|
155
|
+
query: params,
|
156
|
+
model: NilClass
|
157
|
+
}
|
158
|
+
@client.request(req, opts)
|
159
|
+
end
|
160
|
+
|
161
|
+
# Endpoint with a positional path parameter and a query parameter.
|
162
|
+
#
|
163
|
+
# @param id [String]
|
164
|
+
#
|
165
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
166
|
+
# @option params [Float] :bar
|
167
|
+
#
|
168
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
169
|
+
#
|
170
|
+
# @return [nil]
|
171
|
+
def query_and_path(id, params = {}, opts = {})
|
172
|
+
req = {
|
173
|
+
method: :post,
|
174
|
+
path: "/positional_params/query/#{id}",
|
175
|
+
query: params,
|
176
|
+
model: NilClass
|
177
|
+
}
|
178
|
+
@client.request(req, opts)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Endpoint with a positional query parameter.
|
182
|
+
#
|
183
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
184
|
+
# @option params [String] :bar Some description about bar.
|
185
|
+
# @option params [String] :foo Some description about foo.
|
186
|
+
#
|
187
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
188
|
+
#
|
189
|
+
# @return [nil]
|
190
|
+
def query_multiple(params = {}, opts = {})
|
191
|
+
req = {
|
192
|
+
method: :get,
|
193
|
+
path: "/positional_params/query_multiple",
|
194
|
+
query: params,
|
195
|
+
model: NilClass
|
196
|
+
}
|
197
|
+
@client.request(req, opts)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Endpoint with a single positional path parameter.
|
201
|
+
#
|
202
|
+
# @param single [String]
|
203
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
204
|
+
#
|
205
|
+
# @return [nil]
|
206
|
+
def single(single, opts = {})
|
207
|
+
req = {
|
208
|
+
method: :get,
|
209
|
+
path: "/positional_params/#{single}",
|
210
|
+
model: NilClass
|
211
|
+
}
|
212
|
+
@client.request(req, opts)
|
213
|
+
end
|
214
|
+
|
215
|
+
# Endpoint with no positional params and a body object.
|
216
|
+
#
|
217
|
+
# @param id [String] Some id.
|
218
|
+
#
|
219
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
220
|
+
# @option params [Symbol, Kind] :kind
|
221
|
+
#
|
222
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
223
|
+
#
|
224
|
+
# @return [nil]
|
225
|
+
def union_body_and_path(id, params = {}, opts = {})
|
226
|
+
req = {
|
227
|
+
method: :post,
|
228
|
+
path: "/positional_params/body/union/#{id}",
|
229
|
+
body: params,
|
230
|
+
headers: {"Content-Type" => "application/json"},
|
231
|
+
model: NilClass
|
232
|
+
}
|
233
|
+
@client.request(req, opts)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
@@ -0,0 +1,166 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class QueryParams
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Endpoint with allOf query params
|
12
|
+
#
|
13
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
14
|
+
# @option params [FooAndBar, nil] :foo_and_bar
|
15
|
+
#
|
16
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
17
|
+
#
|
18
|
+
# @return [nil]
|
19
|
+
def all_of(params = {}, opts = {})
|
20
|
+
req = {
|
21
|
+
method: :get,
|
22
|
+
path: "/query_params/allOf",
|
23
|
+
query: params,
|
24
|
+
model: NilClass
|
25
|
+
}
|
26
|
+
@client.request(req, opts)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Endpoint with anyOf query params
|
30
|
+
#
|
31
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
32
|
+
# @option params [Integer, String, nil] :string_or_integer
|
33
|
+
#
|
34
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
35
|
+
#
|
36
|
+
# @return [nil]
|
37
|
+
def any_of(params = {}, opts = {})
|
38
|
+
req = {
|
39
|
+
method: :get,
|
40
|
+
path: "/query_params/anyOf",
|
41
|
+
query: params,
|
42
|
+
model: NilClass
|
43
|
+
}
|
44
|
+
@client.request(req, opts)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Endpoint with anyOf query param that's string or array of strings
|
48
|
+
#
|
49
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
50
|
+
# @option params [Array<String>, String, nil] :ids
|
51
|
+
#
|
52
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
53
|
+
#
|
54
|
+
# @return [nil]
|
55
|
+
def any_of_string_or_array(params = {}, opts = {})
|
56
|
+
req = {
|
57
|
+
method: :get,
|
58
|
+
path: "/query_params/anyOfStringOrArray",
|
59
|
+
query: params,
|
60
|
+
model: NilClass
|
61
|
+
}
|
62
|
+
@client.request(req, opts)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Endpoint with array query params
|
66
|
+
#
|
67
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
68
|
+
# @option params [Array<Integer>, nil] :integer_array_param
|
69
|
+
# @option params [Array<String>, nil] :string_array_param
|
70
|
+
#
|
71
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
72
|
+
#
|
73
|
+
# @return [nil]
|
74
|
+
def array(params = {}, opts = {})
|
75
|
+
req = {
|
76
|
+
method: :get,
|
77
|
+
path: "/query_params/array",
|
78
|
+
query: params,
|
79
|
+
model: NilClass
|
80
|
+
}
|
81
|
+
@client.request(req, opts)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Endpoint with enum query params
|
85
|
+
#
|
86
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
87
|
+
# @option params [Integer, nil] :integer_enum_param
|
88
|
+
# @option params [Integer, nil] :nullable_integer_enum_param
|
89
|
+
# @option params [Float, nil] :nullable_number_enum_param
|
90
|
+
# @option params [Symbol, NullableStringEnumParam, nil] :nullable_string_enum_param
|
91
|
+
# @option params [Float, nil] :number_enum_param
|
92
|
+
# @option params [Symbol, StringEnumParam, nil] :string_enum_param
|
93
|
+
#
|
94
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
95
|
+
#
|
96
|
+
# @return [nil]
|
97
|
+
def enum(params = {}, opts = {})
|
98
|
+
req = {
|
99
|
+
method: :get,
|
100
|
+
path: "/query_params/enum",
|
101
|
+
query: params,
|
102
|
+
model: NilClass
|
103
|
+
}
|
104
|
+
@client.request(req, opts)
|
105
|
+
end
|
106
|
+
|
107
|
+
# Endpoint with object query params
|
108
|
+
#
|
109
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
110
|
+
# @option params [ObjectParam, nil] :object_param
|
111
|
+
# @option params [ObjectRefParam, nil] :object_ref_param
|
112
|
+
#
|
113
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
114
|
+
#
|
115
|
+
# @return [nil]
|
116
|
+
def object(params = {}, opts = {})
|
117
|
+
req = {
|
118
|
+
method: :get,
|
119
|
+
path: "/query_params/object",
|
120
|
+
query: params,
|
121
|
+
model: NilClass
|
122
|
+
}
|
123
|
+
@client.request(req, opts)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Endpoint with oneOf query params
|
127
|
+
#
|
128
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
129
|
+
# @option params [Integer, String, nil] :string_or_integer
|
130
|
+
#
|
131
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
132
|
+
#
|
133
|
+
# @return [nil]
|
134
|
+
def one_of(params = {}, opts = {})
|
135
|
+
req = {
|
136
|
+
method: :get,
|
137
|
+
path: "/query_params/oneOf",
|
138
|
+
query: params,
|
139
|
+
model: NilClass
|
140
|
+
}
|
141
|
+
@client.request(req, opts)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Endpoint with a set of primitive type query params
|
145
|
+
#
|
146
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
147
|
+
# @option params [Boolean, nil] :boolean_param
|
148
|
+
# @option params [Integer, nil] :integer_param
|
149
|
+
# @option params [Float, nil] :number_param
|
150
|
+
# @option params [String, nil] :string_param
|
151
|
+
#
|
152
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
153
|
+
#
|
154
|
+
# @return [nil]
|
155
|
+
def primitives(params = {}, opts = {})
|
156
|
+
req = {
|
157
|
+
method: :get,
|
158
|
+
path: "/query_params/primitives",
|
159
|
+
query: params,
|
160
|
+
model: NilClass
|
161
|
+
}
|
162
|
+
@client.request(req, opts)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Recursion
|
6
|
+
class SharedResponses
|
7
|
+
# @param client [Sink::Client]
|
8
|
+
def initialize(client:)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
13
|
+
#
|
14
|
+
# @return [Sink::Models::SharedSelfRecursion]
|
15
|
+
def create_self(opts = {})
|
16
|
+
req = {
|
17
|
+
method: :post,
|
18
|
+
path: "/recursion/shared/responses/self",
|
19
|
+
model: Sink::Models::SharedSelfRecursion
|
20
|
+
}
|
21
|
+
@client.request(req, opts)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Recursion
|
6
|
+
# @return [Sink::Resources::Recursion::SharedResponses]
|
7
|
+
attr_reader :shared_responses
|
8
|
+
|
9
|
+
# @param client [Sink::Client]
|
10
|
+
def initialize(client:)
|
11
|
+
@client = client
|
12
|
+
@shared_responses = Sink::Resources::Recursion::SharedResponses.new(client: client)
|
13
|
+
end
|
14
|
+
|
15
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
16
|
+
# @option params [Array<Array<Float, Object>, Float>] :create_array
|
17
|
+
#
|
18
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
19
|
+
#
|
20
|
+
# @return [Array<Array<Float, Object>, Float>]
|
21
|
+
def create_array(params = {}, opts = {})
|
22
|
+
req = {
|
23
|
+
method: :post,
|
24
|
+
path: "/recursion/array",
|
25
|
+
body: params[:create_array],
|
26
|
+
headers: {"Content-Type" => "application/json"},
|
27
|
+
model: Sink::ArrayOf.new(Sink::Unknown)
|
28
|
+
}
|
29
|
+
@client.request(req, opts)
|
30
|
+
end
|
31
|
+
|
32
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
33
|
+
# @option params [Sink::Models::SelfRecursion, nil] :data
|
34
|
+
#
|
35
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
36
|
+
#
|
37
|
+
# @return [Sink::Models::RecursionCreateEnvelopeResponse]
|
38
|
+
def create_envelope(params = {}, opts = {})
|
39
|
+
req = {
|
40
|
+
method: :post,
|
41
|
+
path: "/recursion/envelope",
|
42
|
+
body: params,
|
43
|
+
headers: {"Content-Type" => "application/json"},
|
44
|
+
model: Sink::Models::RecursionCreateEnvelopeResponse
|
45
|
+
}
|
46
|
+
@client.request(req, opts)
|
47
|
+
end
|
48
|
+
|
49
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
50
|
+
# @option params [String] :name
|
51
|
+
# @option params [Sink::Models::SelfRecursion, nil] :child
|
52
|
+
#
|
53
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
54
|
+
#
|
55
|
+
# @return [Sink::Models::SelfRecursion]
|
56
|
+
def create_self(params = {}, opts = {})
|
57
|
+
req = {
|
58
|
+
method: :post,
|
59
|
+
path: "/recursion/self",
|
60
|
+
body: params,
|
61
|
+
headers: {"Content-Type" => "application/json"},
|
62
|
+
model: Sink::Models::SelfRecursion
|
63
|
+
}
|
64
|
+
@client.request(req, opts)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ResourceRefs
|
6
|
+
class Parent
|
7
|
+
class Child
|
8
|
+
# @param client [Sink::Client]
|
9
|
+
def initialize(client:)
|
10
|
+
@client = client
|
11
|
+
end
|
12
|
+
|
13
|
+
# endpoint that returns a model that is referenced from a model in a parent
|
14
|
+
# resource
|
15
|
+
#
|
16
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
17
|
+
#
|
18
|
+
# @return [Sink::Models::ChildModel]
|
19
|
+
def returns_child_model(opts = {})
|
20
|
+
req = {
|
21
|
+
method: :get,
|
22
|
+
path: "/resource_refs/child",
|
23
|
+
model: Sink::Models::ChildModel
|
24
|
+
}
|
25
|
+
@client.request(req, opts)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ResourceRefs
|
6
|
+
class Parent
|
7
|
+
# @return [Sink::Resources::ResourceRefs::Parent::Child]
|
8
|
+
attr_reader :child
|
9
|
+
|
10
|
+
# @param client [Sink::Client]
|
11
|
+
def initialize(client:)
|
12
|
+
@client = client
|
13
|
+
@child = Sink::Resources::ResourceRefs::Parent::Child.new(client: client)
|
14
|
+
end
|
15
|
+
|
16
|
+
# endpoint that returns a model that has a nested reference to a child model
|
17
|
+
#
|
18
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
19
|
+
#
|
20
|
+
# @return [Sink::Models::ParentModelWithChildRef]
|
21
|
+
def returns_parent_model_with_child_ref(opts = {})
|
22
|
+
req = {
|
23
|
+
method: :get,
|
24
|
+
path: "/resource_refs/parent_with_child_ref",
|
25
|
+
model: Sink::Models::ParentModelWithChildRef
|
26
|
+
}
|
27
|
+
@client.request(req, opts)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class ResourceRefs
|
6
|
+
# @return [Sink::Resources::ResourceRefs::PaginatedModelFirstRef]
|
7
|
+
attr_reader :paginated_model_first_ref
|
8
|
+
|
9
|
+
# @return [Sink::Resources::ResourceRefs::PaginatedModelSecondRef]
|
10
|
+
attr_reader :paginated_model_second_ref
|
11
|
+
|
12
|
+
# @return [Sink::Resources::ResourceRefs::Parent]
|
13
|
+
attr_reader :parent
|
14
|
+
|
15
|
+
# @param client [Sink::Client]
|
16
|
+
def initialize(client:)
|
17
|
+
@client = client
|
18
|
+
@paginated_model_first_ref = Sink::Resources::ResourceRefs::PaginatedModelFirstRef.new(client: client)
|
19
|
+
@paginated_model_second_ref = Sink::Resources::ResourceRefs::PaginatedModelSecondRef.new(client: client)
|
20
|
+
@parent = Sink::Resources::ResourceRefs::Parent.new(client: client)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Resources
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Endpoint returning no response
|
12
|
+
#
|
13
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
14
|
+
#
|
15
|
+
# @return [nil]
|
16
|
+
def foo(opts = {})
|
17
|
+
req = {
|
18
|
+
method: :post,
|
19
|
+
path: "/no_response",
|
20
|
+
model: NilClass
|
21
|
+
}
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|