testttttttttttttttomgomgomg12 0.0.1.pre.alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +128 -0
- data/lib/sink/base_client.rb +383 -0
- data/lib/sink/base_model.rb +203 -0
- data/lib/sink/client.rb +381 -0
- data/lib/sink/fake_page.rb +39 -0
- data/lib/sink/models/allof_base_parent.rb +11 -0
- data/lib/sink/models/allof_multiple_inline_entries.rb +15 -0
- data/lib/sink/models/api_status.rb +11 -0
- data/lib/sink/models/array_float_items_response.rb +6 -0
- data/lib/sink/models/array_missing_items_response.rb +11 -0
- data/lib/sink/models/array_object_items.rb +11 -0
- data/lib/sink/models/array_object_items_response.rb +11 -0
- data/lib/sink/models/array_recursion.rb +6 -0
- data/lib/sink/models/balance.rb +11 -0
- data/lib/sink/models/basic_shared_model_object.rb +15 -0
- data/lib/sink/models/body_param_top_level_all_of_response.rb +20 -0
- data/lib/sink/models/body_param_union_overlapping_prop_response.rb +11 -0
- data/lib/sink/models/card.rb +144 -0
- data/lib/sink/models/card_list_response.rb +26 -0
- data/lib/sink/models/card_provision_foo_response.rb +11 -0
- data/lib/sink/models/child_inlined_response_response.rb +11 -0
- data/lib/sink/models/child_model.rb +21 -0
- data/lib/sink/models/class_.rb +11 -0
- data/lib/sink/models/client.rb +15 -0
- data/lib/sink/models/company.rb +11 -0
- data/lib/sink/models/company_payment.rb +11 -0
- data/lib/sink/models/complex_query_array_query_response.rb +22 -0
- data/lib/sink/models/config_tool_model_ref_from_nested_response_body_response.rb +17 -0
- data/lib/sink/models/currency.rb +23 -0
- data/lib/sink/models/decorator_test_keep_me_response.rb +11 -0
- data/lib/sink/models/docstring_leading_double_quote_response.rb +12 -0
- data/lib/sink/models/docstring_trailing_double_quote_response.rb +22 -0
- data/lib/sink/models/documents.rb +15 -0
- data/lib/sink/models/eeoc.rb +11 -0
- data/lib/sink/models/employment_data.rb +11 -0
- data/lib/sink/models/enum_basic_response.rb +51 -0
- data/lib/sink/models/export.rb +12 -0
- data/lib/sink/models/funding_account.rb +73 -0
- data/lib/sink/models/import.rb +11 -0
- data/lib/sink/models/interface.rb +11 -0
- data/lib/sink/models/keep_this_resource_keep_this_method_response.rb +11 -0
- data/lib/sink/models/make_ambiguous_schemas_explicit_make_ambiguous_schemas_explicit_response.rb +31 -0
- data/lib/sink/models/make_ambiguous_schemas_looser_make_ambiguous_schemas_looser_response.rb +31 -0
- data/lib/sink/models/map_nullable_items_response.rb +19 -0
- data/lib/sink/models/method_config_skipped_tests_all_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_go_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_java_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_kotlin_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_node_and_python_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_node_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_python_response.rb +11 -0
- data/lib/sink/models/method_config_skipped_tests_ruby_response.rb +11 -0
- data/lib/sink/models/model_from_nested_path.rb +30 -0
- data/lib/sink/models/model_from_nested_response_body_ref.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jmespath.rb +11 -0
- data/lib/sink/models/model_from_schemas_ref_openapi_uri_jsonpath.rb +11 -0
- data/lib/sink/models/model_level_1.rb +15 -0
- data/lib/sink/models/model_level_2.rb +15 -0
- data/lib/sink/models/model_level_3.rb +15 -0
- data/lib/sink/models/model_referenced_in_parent_and_child.rb +11 -0
- data/lib/sink/models/model_with_nested_model.rb +16 -0
- data/lib/sink/models/my_model.rb +11 -0
- data/lib/sink/models/name_child_prop_import_clash_response.rb +21 -0
- data/lib/sink/models/name_properties_common_conflicts_response.rb +59 -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 +15 -0
- data/lib/sink/models/name_response_shadows_pydantic_response.rb +15 -0
- data/lib/sink/models/nested_request_model_a.rb +11 -0
- data/lib/sink/models/nested_request_model_b.rb +11 -0
- data/lib/sink/models/nested_request_model_c.rb +17 -0
- data/lib/sink/models/object_missing_items_response.rb +11 -0
- data/lib/sink/models/object_mixed_known_and_unknown_response.rb +11 -0
- data/lib/sink/models/object_multiple_array_properties_same_ref_response.rb +42 -0
- data/lib/sink/models/object_multiple_properties_same_model_response.rb +19 -0
- data/lib/sink/models/object_multiple_properties_same_ref_response.rb +37 -0
- data/lib/sink/models/object_skipped_props.rb +27 -0
- data/lib/sink/models/object_two_dimensional_array_primitive_property_response.rb +23 -0
- data/lib/sink/models/object_with_any_of_null_property.rb +17 -0
- data/lib/sink/models/object_with_child_ref.rb +15 -0
- data/lib/sink/models/object_with_one_of_null_property.rb +17 -0
- data/lib/sink/models/object_with_union_properties.rb +15 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_response.rb +11 -0
- data/lib/sink/models/openapi_format_array_type_one_entry_with_null_response.rb +11 -0
- data/lib/sink/models/openapi_special_used_used_as_property_name_response.rb +11 -0
- data/lib/sink/models/page_cursor_shared_ref_pagination.rb +15 -0
- data/lib/sink/models/parent_model_with_child_ref.rb +19 -0
- data/lib/sink/models/path_param_colon_suffix_response.rb +11 -0
- data/lib/sink/models/path_param_file_extension_response.rb +11 -0
- data/lib/sink/models/path_param_multiple_response.rb +11 -0
- data/lib/sink/models/path_param_query_param_response.rb +11 -0
- data/lib/sink/models/path_param_singular_response.rb +11 -0
- data/lib/sink/models/primitive_strings_response.rb +11 -0
- data/lib/sink/models/private.rb +11 -0
- data/lib/sink/models/public.rb +11 -0
- data/lib/sink/models/recursion_create_envelope_response.rb +11 -0
- data/lib/sink/models/response_allof_simple_response.rb +15 -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 +15 -0
- data/lib/sink/models/response_nested_array_response.rb +21 -0
- data/lib/sink/models/response_object_all_properties_response.rb +49 -0
- data/lib/sink/models/response_object_no_properties_response.rb +8 -0
- data/lib/sink/models/response_object_with_additional_properties_prop_response.rb +17 -0
- data/lib/sink/models/response_object_with_heavily_nested_union_response.rb +11 -0
- data/lib/sink/models/response_only_read_only_properties_response.rb +16 -0
- data/lib/sink/models/responses_allof_cross_object.rb +15 -0
- data/lib/sink/models/return_.rb +11 -0
- data/lib/sink/models/root_response.rb +19 -0
- data/lib/sink/models/self_recursion.rb +15 -0
- data/lib/sink/models/shared_cursor_nested_response_prop_meta.rb +18 -0
- data/lib/sink/models/shared_self_recursion.rb +15 -0
- data/lib/sink/models/shipping_address.rb +62 -0
- data/lib/sink/models/simple_allof.rb +20 -0
- data/lib/sink/models/simple_object.rb +19 -0
- data/lib/sink/models/skip_this_resource_i_never_appear_response.rb +11 -0
- data/lib/sink/models/streaming_basic_response.rb +15 -0
- data/lib/sink/models/streaming_nested_params_response.rb +15 -0
- data/lib/sink/models/streaming_no_discriminator_response.rb +15 -0
- data/lib/sink/models/streaming_query_param_discriminator_response.rb +15 -0
- data/lib/sink/models/streaming_with_unrelated_default_param_response.rb +15 -0
- data/lib/sink/models/type_dates_response.rb +27 -0
- data/lib/sink/models/type_datetimes_response.rb +27 -0
- data/lib/sink/models/union_discriminated_variant_a.rb +19 -0
- data/lib/sink/models/union_discriminated_variant_b.rb +19 -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 +11 -0
- data/lib/sink/models/widget.rb +12 -0
- data/lib/sink/models/write_only_response_simple_response.rb +12 -0
- data/lib/sink/page_cursor.rb +49 -0
- data/lib/sink/page_cursor_from_headers.rb +49 -0
- data/lib/sink/page_cursor_id.rb +45 -0
- data/lib/sink/page_cursor_nested_items.rb +65 -0
- data/lib/sink/page_cursor_nested_object_ref.rb +59 -0
- data/lib/sink/page_cursor_shared_ref.rb +59 -0
- data/lib/sink/page_cursor_top_level_array.rb +46 -0
- data/lib/sink/page_cursor_url.rb +46 -0
- data/lib/sink/page_offset.rb +49 -0
- data/lib/sink/page_offset_no_start_field.rb +45 -0
- data/lib/sink/page_offset_total_count.rb +53 -0
- data/lib/sink/page_page_number.rb +53 -0
- data/lib/sink/page_page_number_without_current_page_response.rb +45 -0
- data/lib/sink/pooled_net_requester.rb +63 -0
- data/lib/sink/request_options.rb +84 -0
- data/lib/sink/resources/body_params/objects.rb +31 -0
- data/lib/sink/resources/body_params/unions.rb +31 -0
- data/lib/sink/resources/body_params.rb +475 -0
- data/lib/sink/resources/cards.rb +488 -0
- data/lib/sink/resources/casing/eeoc.rb +32 -0
- data/lib/sink/resources/casing.rb +15 -0
- data/lib/sink/resources/clients.rb +27 -0
- data/lib/sink/resources/company/payments.rb +28 -0
- data/lib/sink/resources/company.rb +17 -0
- data/lib/sink/resources/complex_queries.rb +56 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python/child_only_skip_python.rb +96 -0
- data/lib/sink/resources/config_tools/parent_with_skip_node_python.rb +98 -0
- data/lib/sink/resources/config_tools.rb +37 -0
- data/lib/sink/resources/decorator_tests/keep_this_resource.rb +27 -0
- data/lib/sink/resources/decorator_tests/languages.rb +55 -0
- data/lib/sink/resources/decorator_tests/skip_this_resource.rb +26 -0
- data/lib/sink/resources/decorator_tests.rb +36 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb +31 -0
- data/lib/sink/resources/deeply_nested/level_one/level_two.rb +33 -0
- data/lib/sink/resources/deeply_nested/level_one.rb +31 -0
- data/lib/sink/resources/deeply_nested.rb +15 -0
- data/lib/sink/resources/docstrings.rb +77 -0
- data/lib/sink/resources/empty_body.rb +55 -0
- data/lib/sink/resources/header_params.rb +33 -0
- data/lib/sink/resources/invalid_schemas/arrays.rb +24 -0
- data/lib/sink/resources/invalid_schemas/objects.rb +24 -0
- data/lib/sink/resources/invalid_schemas.rb +19 -0
- data/lib/sink/resources/make_ambiguous_schemas_explicit.rb +24 -0
- data/lib/sink/resources/make_ambiguous_schemas_looser.rb +24 -0
- data/lib/sink/resources/method_config.rb +156 -0
- data/lib/sink/resources/mixed_params/duplicates.rb +73 -0
- data/lib/sink/resources/mixed_params.rb +81 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child/child.rb +24 -0
- data/lib/sink/resources/model_referenced_in_parent_and_child.rb +26 -0
- data/lib/sink/resources/names/can_cause_clashes/employment_data.rb +15 -0
- data/lib/sink/resources/names/can_cause_clashes/response.rb +30 -0
- data/lib/sink/resources/names/can_cause_clashes.rb +22 -0
- data/lib/sink/resources/names/documents.rb +26 -0
- data/lib/sink/resources/names/openapi_specials.rb +24 -0
- data/lib/sink/resources/names/params.rb +47 -0
- data/lib/sink/resources/names/reserved_names/import.rb +29 -0
- data/lib/sink/resources/names/reserved_names/methods.rb +37 -0
- data/lib/sink/resources/names/reserved_names/public/class_.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public/interface.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public/private.rb +28 -0
- data/lib/sink/resources/names/reserved_names/public.rb +38 -0
- data/lib/sink/resources/names/reserved_names.rb +43 -0
- data/lib/sink/resources/names.rb +139 -0
- data/lib/sink/resources/openapi_formats.rb +48 -0
- data/lib/sink/resources/pagination_tests/cursor.rb +32 -0
- data/lib/sink/resources/pagination_tests/items_types.rb +32 -0
- data/lib/sink/resources/pagination_tests/nested_items.rb +32 -0
- data/lib/sink/resources/pagination_tests/offset.rb +70 -0
- data/lib/sink/resources/pagination_tests/schema_types.rb +51 -0
- data/lib/sink/resources/pagination_tests.rb +31 -0
- data/lib/sink/resources/parent/child.rb +28 -0
- data/lib/sink/resources/parent.rb +17 -0
- data/lib/sink/resources/path_params.rb +196 -0
- data/lib/sink/resources/positional_params.rb +219 -0
- data/lib/sink/resources/query_params.rb +157 -0
- data/lib/sink/resources/recursion/shared_responses.rb +24 -0
- data/lib/sink/resources/recursion.rb +61 -0
- data/lib/sink/resources/resource_refs/paginated_model_first_ref.rb +13 -0
- data/lib/sink/resources/resource_refs/paginated_model_second_ref.rb +13 -0
- data/lib/sink/resources/resource_refs/parent/child.rb +29 -0
- data/lib/sink/resources/resource_refs/parent.rb +30 -0
- data/lib/sink/resources/resource_refs.rb +23 -0
- data/lib/sink/resources/resources.rb +24 -0
- data/lib/sink/resources/responses/union_types.rb +91 -0
- data/lib/sink/resources/responses.rb +297 -0
- data/lib/sink/resources/shared_query_params.rb +45 -0
- data/lib/sink/resources/streaming.rb +96 -0
- data/lib/sink/resources/testing.rb +22 -0
- data/lib/sink/resources/tests.rb +24 -0
- data/lib/sink/resources/tools.rb +30 -0
- data/lib/sink/resources/types/allofs.rb +13 -0
- data/lib/sink/resources/types/arrays.rb +57 -0
- data/lib/sink/resources/types/enums.rb +86 -0
- data/lib/sink/resources/types/maps.rb +27 -0
- data/lib/sink/resources/types/objects.rb +98 -0
- data/lib/sink/resources/types/primitives.rb +31 -0
- data/lib/sink/resources/types/read_only_params.rb +31 -0
- data/lib/sink/resources/types/unions.rb +115 -0
- data/lib/sink/resources/types/write_only_responses.rb +26 -0
- data/lib/sink/resources/types.rb +90 -0
- data/lib/sink/resources/undocumented_resource.rb +44 -0
- data/lib/sink/resources/version_1_30_names.rb +38 -0
- data/lib/sink/resources/widgets.rb +28 -0
- data/lib/sink/util.rb +78 -0
- data/lib/sink/version.rb +5 -0
- data/lib/sink.rb +253 -0
- metadata +301 -0
@@ -0,0 +1,475 @@
|
|
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
|
+
def initialize(client:)
|
13
|
+
@client = client
|
14
|
+
@objects = Sink::Resources::BodyParams::Objects.new(client: client)
|
15
|
+
@unions = Sink::Resources::BodyParams::Unions.new(client: client)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Endpoint with a `requestBody` with various enums properties
|
19
|
+
#
|
20
|
+
# @param params [Hash] Attributes to send in this request.
|
21
|
+
# @option params [Integer, nil] :code
|
22
|
+
# @option params [Float, nil] :cost
|
23
|
+
# @option params [Boolean, nil] :enabled
|
24
|
+
# @option params [Symbol, Kind, nil] :kind
|
25
|
+
#
|
26
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
27
|
+
#
|
28
|
+
# @return [nil]
|
29
|
+
def enum_properties(params = {}, opts = {})
|
30
|
+
req = {}
|
31
|
+
req[:method] = :post
|
32
|
+
req[:path] = "/body_params/enum_properties"
|
33
|
+
req[:body] = params
|
34
|
+
req[:model] = NilClass
|
35
|
+
@client.request(req, opts)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Should return a ModelWithNestedModel object with a `properties` field that we
|
39
|
+
# can rename in the Stainless config to a prettier name.
|
40
|
+
#
|
41
|
+
# @param params [Hash] Attributes to send in this request.
|
42
|
+
# @option params [Sink::Models::NestedRequestModelA, nil] :data
|
43
|
+
#
|
44
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
45
|
+
#
|
46
|
+
# @return [Sink::Models::ModelWithNestedModel]
|
47
|
+
def nested_request_models(params = {}, opts = {})
|
48
|
+
req = {}
|
49
|
+
req[:method] = :post
|
50
|
+
req[:path] = "/body_params/with_nested_models"
|
51
|
+
req[:body] = params
|
52
|
+
req[:model] = Sink::Models::ModelWithNestedModel
|
53
|
+
@client.request(req, opts)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Endpoint with a `requestBody` that has an `type: null` schema that is defined as
|
57
|
+
# a model in the config.
|
58
|
+
#
|
59
|
+
# @param params [Hash] Attributes to send in this request.
|
60
|
+
# @option params [String] :name
|
61
|
+
# @option params [nil] :null_type_prop
|
62
|
+
#
|
63
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
64
|
+
#
|
65
|
+
# @return [nil]
|
66
|
+
def null_type(params = {}, opts = {})
|
67
|
+
req = {}
|
68
|
+
req[:method] = :post
|
69
|
+
req[:path] = "/body_params/null_type"
|
70
|
+
req[:body] = params
|
71
|
+
req[:model] = NilClass
|
72
|
+
@client.request(req, opts)
|
73
|
+
end
|
74
|
+
|
75
|
+
# Endpoint with a `requestBody` that has an `additionalProperties` object schema
|
76
|
+
# that is defined as a model in the config.
|
77
|
+
#
|
78
|
+
# @param params [Hash] Attributes to send in this request.
|
79
|
+
# @option params [Hash] :model_ref
|
80
|
+
# @option params [String] :name
|
81
|
+
#
|
82
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
83
|
+
#
|
84
|
+
# @return [nil]
|
85
|
+
def object_map_model_ref(params = {}, opts = {})
|
86
|
+
req = {}
|
87
|
+
req[:method] = :post
|
88
|
+
req[:path] = "/body_params/object_map_model_ref"
|
89
|
+
req[:body] = params
|
90
|
+
req[:model] = NilClass
|
91
|
+
@client.request(req, opts)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Endpoint with an object `requestBody` that has an array property with `object`
|
95
|
+
# items.
|
96
|
+
#
|
97
|
+
# @param params [Hash] Attributes to send in this request.
|
98
|
+
# @option params [Array<ArrayProp>, nil] :array_prop
|
99
|
+
#
|
100
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
101
|
+
#
|
102
|
+
# @return [nil]
|
103
|
+
def object_with_array_of_objects(params = {}, opts = {})
|
104
|
+
req = {}
|
105
|
+
req[:method] = :post
|
106
|
+
req[:path] = "/body_params/object_with_array_of_objects"
|
107
|
+
req[:body] = params
|
108
|
+
req[:model] = NilClass
|
109
|
+
@client.request(req, opts)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Endpoint with an object `requestBody` that has properties with union types.
|
113
|
+
#
|
114
|
+
# @param params [Hash] Attributes to send in this request.
|
115
|
+
# @option params [Bar::UnnamedTypeWithunionParent8, Sink::Models::SimpleObject] :bar
|
116
|
+
# @option params [Boolean, Float, Object, String] :foo
|
117
|
+
#
|
118
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
119
|
+
#
|
120
|
+
# @return [nil]
|
121
|
+
def object_with_union_properties(params = {}, opts = {})
|
122
|
+
req = {}
|
123
|
+
req[:method] = :post
|
124
|
+
req[:path] = "/body_params/object_with_union_properties"
|
125
|
+
req[:body] = params
|
126
|
+
req[:model] = NilClass
|
127
|
+
@client.request(req, opts)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Endpoint with a `requestBody` that only has `readOnly` properties
|
131
|
+
#
|
132
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
133
|
+
#
|
134
|
+
# @return [nil]
|
135
|
+
def only_read_only_properties(opts = {})
|
136
|
+
req = {}
|
137
|
+
req[:method] = :patch
|
138
|
+
req[:path] = "/body_params/only_read_only_properties"
|
139
|
+
req[:model] = NilClass
|
140
|
+
@client.request(req, opts)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Endpoint with a `requestBody` that has a schema that is defined as a model in
|
144
|
+
# the config with "param" in the name.
|
145
|
+
#
|
146
|
+
# @param params [Hash] Attributes to send in this request.
|
147
|
+
# @option params [Hash] :model_ref
|
148
|
+
# @option params [String] :name
|
149
|
+
#
|
150
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
151
|
+
#
|
152
|
+
# @return [nil]
|
153
|
+
def param_in_model_name_ref(params = {}, opts = {})
|
154
|
+
req = {}
|
155
|
+
req[:method] = :post
|
156
|
+
req[:path] = "/body_params/param_in_model_name_ref"
|
157
|
+
req[:body] = params
|
158
|
+
req[:model] = NilClass
|
159
|
+
@client.request(req, opts)
|
160
|
+
end
|
161
|
+
|
162
|
+
# Endpoint with a `requestBody` that has a property that is defined as a model in
|
163
|
+
# the config.
|
164
|
+
#
|
165
|
+
# @param params [Hash] Attributes to send in this request.
|
166
|
+
# @option params [Sink::Models::MyModel] :model_ref
|
167
|
+
# @option params [String] :name
|
168
|
+
#
|
169
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
170
|
+
#
|
171
|
+
# @return [nil]
|
172
|
+
def property_model_ref(params = {}, opts = {})
|
173
|
+
req = {}
|
174
|
+
req[:method] = :post
|
175
|
+
req[:path] = "/body_params/property_model_ref"
|
176
|
+
req[:body] = params
|
177
|
+
req[:model] = NilClass
|
178
|
+
@client.request(req, opts)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Endpoint with a `requestBody` that has a property that is a union type of
|
182
|
+
# complex types.
|
183
|
+
#
|
184
|
+
# @param params [Hash] Attributes to send in this request.
|
185
|
+
# @option params [String] :name
|
186
|
+
# @option params [Unions::UnnamedTypeWithunionParent10, Unions::UnnamedTypeWithunionParent9] :unions This is an object with required properties
|
187
|
+
#
|
188
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
189
|
+
#
|
190
|
+
# @return [nil]
|
191
|
+
def property_with_complex_union(params = {}, opts = {})
|
192
|
+
req = {}
|
193
|
+
req[:method] = :post
|
194
|
+
req[:path] = "/body_params/property_with_complex_union"
|
195
|
+
req[:body] = params
|
196
|
+
req[:model] = NilClass
|
197
|
+
@client.request(req, opts)
|
198
|
+
end
|
199
|
+
|
200
|
+
# Endpoint with a `requestBody` that has a property that is a union type of
|
201
|
+
# complex types with a lot of nesting.
|
202
|
+
#
|
203
|
+
# @param params [Hash] Attributes to send in this request.
|
204
|
+
# @option params [Array<Filter::UnnamedTypeWithunionParent11, Filter::UnnamedTypeWithunionParent12>, nil] :filters
|
205
|
+
#
|
206
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
207
|
+
#
|
208
|
+
# @return [nil]
|
209
|
+
def property_with_heavily_nested_complex_union(params = {}, opts = {})
|
210
|
+
req = {}
|
211
|
+
req[:method] = :post
|
212
|
+
req[:path] = "/body_params/property_with_heavily_nested_complex_union"
|
213
|
+
req[:body] = params
|
214
|
+
req[:model] = NilClass
|
215
|
+
@client.request(req, opts)
|
216
|
+
end
|
217
|
+
|
218
|
+
# Endpoint with a `requestBody` that sets `readOnly` to `true` on top level
|
219
|
+
# properties
|
220
|
+
#
|
221
|
+
# @param params [Hash] Attributes to send in this request.
|
222
|
+
# @option params [Boolean, nil] :in_both
|
223
|
+
#
|
224
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
225
|
+
#
|
226
|
+
# @return [nil]
|
227
|
+
def read_only_properties(params = {}, opts = {})
|
228
|
+
req = {}
|
229
|
+
req[:method] = :post
|
230
|
+
req[:path] = "/body_params/read_only_properties"
|
231
|
+
req[:body] = params
|
232
|
+
req[:model] = NilClass
|
233
|
+
@client.request(req, opts)
|
234
|
+
end
|
235
|
+
|
236
|
+
# Endpoint with a `requestBody` that has an `additionalProperties` string schema
|
237
|
+
# that is defined as a model in the config.
|
238
|
+
#
|
239
|
+
# @param params [Hash] Attributes to send in this request.
|
240
|
+
# @option params [Hash] :model_ref
|
241
|
+
# @option params [String] :name
|
242
|
+
#
|
243
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
244
|
+
#
|
245
|
+
# @return [nil]
|
246
|
+
def string_map_model_ref(params = {}, opts = {})
|
247
|
+
req = {}
|
248
|
+
req[:method] = :post
|
249
|
+
req[:path] = "/body_params/string_map_model_ref"
|
250
|
+
req[:body] = params
|
251
|
+
req[:model] = NilClass
|
252
|
+
@client.request(req, opts)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Endpoint with a `requestBody` making use of allOf.
|
256
|
+
#
|
257
|
+
# @param params [Hash] Attributes to send in this request.
|
258
|
+
# @option params [Boolean] :is_foo
|
259
|
+
# @option params [Symbol, Kind] :kind
|
260
|
+
#
|
261
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
262
|
+
#
|
263
|
+
# @return [Sink::Models::BodyParamTopLevelAllOfResponse]
|
264
|
+
def top_level_all_of(params = {}, opts = {})
|
265
|
+
req = {}
|
266
|
+
req[:method] = :post
|
267
|
+
req[:path] = "/body_params/top_level_allOf"
|
268
|
+
req[:body] = params
|
269
|
+
req[:model] = Sink::Models::BodyParamTopLevelAllOfResponse
|
270
|
+
@client.request(req, opts)
|
271
|
+
end
|
272
|
+
|
273
|
+
# Endpoint with a `requestBody` making use of allOf where one of the properties is
|
274
|
+
# an object type.
|
275
|
+
#
|
276
|
+
# @param params [Hash] Attributes to send in this request.
|
277
|
+
# @option params [Symbol, Kind] :kind
|
278
|
+
# @option params [NestedObj, nil] :nested_obj This is an object with required properties
|
279
|
+
#
|
280
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
281
|
+
#
|
282
|
+
# @return [nil]
|
283
|
+
def top_level_all_of_nested_object(params = {}, opts = {})
|
284
|
+
req = {}
|
285
|
+
req[:method] = :post
|
286
|
+
req[:path] = "/body_params/top_level_allOf_nested_object"
|
287
|
+
req[:body] = params
|
288
|
+
req[:model] = NilClass
|
289
|
+
@client.request(req, opts)
|
290
|
+
end
|
291
|
+
|
292
|
+
# Endpoint with a `requestBody` that is an `array` type.
|
293
|
+
#
|
294
|
+
# @param params [Hash] Attributes to send in this request.
|
295
|
+
# @option params [Array<Sink::Models::BasicSharedModelObject>] :items
|
296
|
+
#
|
297
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
298
|
+
#
|
299
|
+
# @return [nil]
|
300
|
+
def top_level_array(params = {}, opts = {})
|
301
|
+
req = {}
|
302
|
+
req[:method] = :post
|
303
|
+
req[:path] = "/body_params/top_level_array"
|
304
|
+
req[:body] = params[:items]
|
305
|
+
req[:model] = NilClass
|
306
|
+
@client.request(req, opts)
|
307
|
+
end
|
308
|
+
|
309
|
+
# Endpoint with a `requestBody` that is an `array` type with non-model children.
|
310
|
+
#
|
311
|
+
# @param params [Hash] Attributes to send in this request.
|
312
|
+
# @option params [Array<Item>] :items
|
313
|
+
#
|
314
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
315
|
+
#
|
316
|
+
# @return [nil]
|
317
|
+
def top_level_array_with_children(params = {}, opts = {})
|
318
|
+
req = {}
|
319
|
+
req[:method] = :post
|
320
|
+
req[:path] = "/body_params/top_level_array_with_children"
|
321
|
+
req[:body] = params[:items]
|
322
|
+
req[:model] = NilClass
|
323
|
+
@client.request(req, opts)
|
324
|
+
end
|
325
|
+
|
326
|
+
# Endpoint with a `requestBody` that is an `array` type.
|
327
|
+
#
|
328
|
+
# @param params [Hash] Attributes to send in this request.
|
329
|
+
# @option params [String] :id Query param:
|
330
|
+
# @option params [Array<Sink::Models::BasicSharedModelObject>] :items Body param:
|
331
|
+
#
|
332
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
333
|
+
#
|
334
|
+
# @return [nil]
|
335
|
+
def top_level_array_with_other_params(params = {}, opts = {})
|
336
|
+
req = {}
|
337
|
+
req[:method] = :post
|
338
|
+
req[:path] = "/body_params/top_level_array_with_other_params"
|
339
|
+
req[:body] = params[:items]
|
340
|
+
req[:query] = params.except(:items)
|
341
|
+
req[:model] = NilClass
|
342
|
+
@client.request(req, opts)
|
343
|
+
end
|
344
|
+
|
345
|
+
# Endpoint with a `requestBody` making use of oneOf but only contains one entry in
|
346
|
+
# the union.
|
347
|
+
#
|
348
|
+
# @param params [Hash] Attributes to send in this request.
|
349
|
+
# @option params [Symbol, Kind] :kind
|
350
|
+
#
|
351
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
352
|
+
#
|
353
|
+
# @return [nil]
|
354
|
+
def top_level_one_of_one_entry(params = {}, opts = {})
|
355
|
+
req = {}
|
356
|
+
req[:method] = :post
|
357
|
+
req[:path] = "/body_params/top_level_oneOf_one_entry"
|
358
|
+
req[:body] = params
|
359
|
+
req[:model] = NilClass
|
360
|
+
@client.request(req, opts)
|
361
|
+
end
|
362
|
+
|
363
|
+
# The request body being set to a $ref that is a shared type in the stainless
|
364
|
+
# config correctly references it.
|
365
|
+
#
|
366
|
+
# @param params [Hash] Attributes to send in this request.
|
367
|
+
# @option params [Sink::Models::SimpleObject, nil] :bar
|
368
|
+
# @option params [String, nil] :foo
|
369
|
+
#
|
370
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
371
|
+
#
|
372
|
+
# @return [nil]
|
373
|
+
def top_level_shared_type(params = {}, opts = {})
|
374
|
+
req = {}
|
375
|
+
req[:method] = :post
|
376
|
+
req[:path] = "/body_params/top_level_shared_type"
|
377
|
+
req[:body] = params
|
378
|
+
req[:model] = NilClass
|
379
|
+
@client.request(req, opts)
|
380
|
+
end
|
381
|
+
|
382
|
+
# Endpoint with a `requestBody` making use of anyOf where the same property is
|
383
|
+
# defined in both variants.
|
384
|
+
#
|
385
|
+
# @param params [Hash] Attributes to send in this request.
|
386
|
+
# @option params [Boolean, nil] :foo FOO 2
|
387
|
+
#
|
388
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
389
|
+
#
|
390
|
+
# @return [Sink::Models::BodyParamUnionOverlappingPropResponse]
|
391
|
+
def union_overlapping_prop(params = {}, opts = {})
|
392
|
+
req = {}
|
393
|
+
req[:method] = :post
|
394
|
+
req[:path] = "/body_params/top_level_anyOf_overlapping_property"
|
395
|
+
req[:body] = params
|
396
|
+
req[:model] = Sink::Models::BodyParamUnionOverlappingPropResponse
|
397
|
+
@client.request(req, opts)
|
398
|
+
end
|
399
|
+
|
400
|
+
# Endpoint with a `requestBody` that has an untyped object schema that is defined
|
401
|
+
# as a model in the config.
|
402
|
+
#
|
403
|
+
# @param params [Hash] Attributes to send in this request.
|
404
|
+
# @option params [String] :name
|
405
|
+
# @option params [Object] :unknown_object_prop
|
406
|
+
#
|
407
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
408
|
+
#
|
409
|
+
# @return [nil]
|
410
|
+
def unknown_object(params = {}, opts = {})
|
411
|
+
req = {}
|
412
|
+
req[:method] = :post
|
413
|
+
req[:path] = "/body_params/unknown_object"
|
414
|
+
req[:body] = params
|
415
|
+
req[:model] = NilClass
|
416
|
+
@client.request(req, opts)
|
417
|
+
end
|
418
|
+
|
419
|
+
# Endpoint with an optional request property that has a default value set.
|
420
|
+
#
|
421
|
+
# @param params [Hash] Attributes to send in this request.
|
422
|
+
# @option params [String, nil] :my_version_body_param
|
423
|
+
# @option params [Boolean, nil] :normal_param
|
424
|
+
#
|
425
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
426
|
+
#
|
427
|
+
# @return [nil]
|
428
|
+
def with_default_body_param_optional(params = {}, opts = {})
|
429
|
+
req = {}
|
430
|
+
req[:method] = :post
|
431
|
+
req[:path] = "/body_params/with_default_body_param_optional"
|
432
|
+
req[:body] = params
|
433
|
+
req[:model] = NilClass
|
434
|
+
@client.request(req, opts)
|
435
|
+
end
|
436
|
+
|
437
|
+
# Endpoint with a required request property that has a default value set.
|
438
|
+
#
|
439
|
+
# @param params [Hash] Attributes to send in this request.
|
440
|
+
# @option params [String] :my_version_body_param
|
441
|
+
# @option params [Boolean] :normal_param
|
442
|
+
#
|
443
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
444
|
+
#
|
445
|
+
# @return [nil]
|
446
|
+
def with_default_body_param_required(params = {}, opts = {})
|
447
|
+
req = {}
|
448
|
+
req[:method] = :post
|
449
|
+
req[:path] = "/body_params/with_default_body_param_required"
|
450
|
+
req[:body] = params
|
451
|
+
req[:model] = NilClass
|
452
|
+
@client.request(req, opts)
|
453
|
+
end
|
454
|
+
|
455
|
+
# Endpoint with a request body that contains a property that points to a model
|
456
|
+
# reference.
|
457
|
+
#
|
458
|
+
# @param params [Hash] Attributes to send in this request.
|
459
|
+
# @option params [String, nil] :foo
|
460
|
+
# @option params [Sink::Models::MyModel, nil] :my_model
|
461
|
+
#
|
462
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
463
|
+
#
|
464
|
+
# @return [nil]
|
465
|
+
def with_model_property(params = {}, opts = {})
|
466
|
+
req = {}
|
467
|
+
req[:method] = :post
|
468
|
+
req[:path] = "/body_params/with_model_property"
|
469
|
+
req[:body] = params
|
470
|
+
req[:model] = NilClass
|
471
|
+
@client.request(req, opts)
|
472
|
+
end
|
473
|
+
end
|
474
|
+
end
|
475
|
+
end
|