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,98 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Responses
|
6
|
+
class UnionTypes
|
7
|
+
# @param client [Sink::Client]
|
8
|
+
def initialize(client:)
|
9
|
+
@client = client
|
10
|
+
end
|
11
|
+
|
12
|
+
# Endpoint with a top level union response of different types.
|
13
|
+
#
|
14
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
15
|
+
#
|
16
|
+
# @return [Boolean, Sink::Models::SimpleObject, Sink::Models::UnionTypeMixedTypesResponse::UnnamedTypeWithunionParent4]
|
17
|
+
def mixed_types(opts = {})
|
18
|
+
req = {
|
19
|
+
method: :post,
|
20
|
+
path: "/responses/unions/mixed_types",
|
21
|
+
model: Sink::Unknown
|
22
|
+
}
|
23
|
+
@client.request(req, opts)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Endpoint with a top level union response of floats and integers.
|
27
|
+
#
|
28
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
29
|
+
#
|
30
|
+
# @return [Sink::Models::SimpleObject, Sink::Models::UnionTypeNullableUnionResponse::UnnamedTypeWithunionParent5]
|
31
|
+
def nullable_union(opts = {})
|
32
|
+
req = {
|
33
|
+
method: :post,
|
34
|
+
path: "/responses/unions/nullable",
|
35
|
+
model: Sink::Unknown
|
36
|
+
}
|
37
|
+
@client.request(req, opts)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Endpoint with a top level union response of floats and integers.
|
41
|
+
#
|
42
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
43
|
+
#
|
44
|
+
# @return [Float]
|
45
|
+
def numbers(opts = {})
|
46
|
+
req = {
|
47
|
+
method: :post,
|
48
|
+
path: "/responses/unions/numbers",
|
49
|
+
model: Float
|
50
|
+
}
|
51
|
+
@client.request(req, opts)
|
52
|
+
end
|
53
|
+
|
54
|
+
# Endpoint with a top level union response of just object variants.
|
55
|
+
#
|
56
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
57
|
+
#
|
58
|
+
# @return [Sink::Models::SimpleObject, Sink::Models::UnionTypeObjectsResponse::UnnamedTypeWithunionParent6]
|
59
|
+
def objects(opts = {})
|
60
|
+
req = {
|
61
|
+
method: :post,
|
62
|
+
path: "/responses/unions/objects",
|
63
|
+
model: Sink::Unknown
|
64
|
+
}
|
65
|
+
@client.request(req, opts)
|
66
|
+
end
|
67
|
+
|
68
|
+
# Endpoint with a top level union response of different types.
|
69
|
+
#
|
70
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
71
|
+
#
|
72
|
+
# @return [Boolean, Object, Sink::Models::SimpleObject, Sink::Models::UnionTypeSuperMixedTypesResponse::UnnamedTypeWithunionParent7, String]
|
73
|
+
def super_mixed_types(opts = {})
|
74
|
+
req = {
|
75
|
+
method: :post,
|
76
|
+
path: "/responses/unions/super_mixed_types",
|
77
|
+
model: Sink::Unknown
|
78
|
+
}
|
79
|
+
@client.request(req, opts)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Endpoint with a top level union response with a variant that is `type: unknown`
|
83
|
+
#
|
84
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
85
|
+
#
|
86
|
+
# @return [Object, Sink::Models::SimpleObject]
|
87
|
+
def unknown_variant(opts = {})
|
88
|
+
req = {
|
89
|
+
method: :post,
|
90
|
+
path: "/responses/unions/unknown_variant",
|
91
|
+
model: Sink::Unknown
|
92
|
+
}
|
93
|
+
@client.request(req, opts)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,319 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Responses
|
6
|
+
# @return [Sink::Resources::Responses::UnionTypes]
|
7
|
+
attr_reader :union_types
|
8
|
+
|
9
|
+
# @param client [Sink::Client]
|
10
|
+
def initialize(client:)
|
11
|
+
@client = client
|
12
|
+
@union_types = Sink::Resources::Responses::UnionTypes.new(client: client)
|
13
|
+
end
|
14
|
+
|
15
|
+
# Endpoint with a top level additionalProperties response.
|
16
|
+
#
|
17
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
18
|
+
#
|
19
|
+
# @return [Hash]
|
20
|
+
def additional_properties(opts = {})
|
21
|
+
req = {
|
22
|
+
method: :post,
|
23
|
+
path: "/responses/additional_properties",
|
24
|
+
model: Hash
|
25
|
+
}
|
26
|
+
@client.request(req, opts)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Endpoint with a top level additionalProperties response where the items type
|
30
|
+
# points to an object defined as a model in the config.
|
31
|
+
#
|
32
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
33
|
+
#
|
34
|
+
# @return [Hash]
|
35
|
+
def additional_properties_nested_model_reference(opts = {})
|
36
|
+
req = {
|
37
|
+
method: :post,
|
38
|
+
path: "/responses/additional_properties_nested_model_reference",
|
39
|
+
model: Hash
|
40
|
+
}
|
41
|
+
@client.request(req, opts)
|
42
|
+
end
|
43
|
+
|
44
|
+
# Method with a response object defined using allOf and inline schema definitions.
|
45
|
+
#
|
46
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
47
|
+
#
|
48
|
+
# @return [Sink::Models::ResponseAllofSimpleResponse]
|
49
|
+
def allof_simple(opts = {})
|
50
|
+
req = {
|
51
|
+
method: :get,
|
52
|
+
path: "/responses/allof/simple",
|
53
|
+
model: Sink::Models::ResponseAllofSimpleResponse
|
54
|
+
}
|
55
|
+
@client.request(req, opts)
|
56
|
+
end
|
57
|
+
|
58
|
+
# Method with a response object that uses anyOf to indicate nullability.
|
59
|
+
#
|
60
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
61
|
+
#
|
62
|
+
# @return [Sink::Models::ObjectWithAnyOfNullProperty]
|
63
|
+
def anyof_null(opts = {})
|
64
|
+
req = {
|
65
|
+
method: :get,
|
66
|
+
path: "/responses/anyof_null",
|
67
|
+
model: Sink::Models::ObjectWithAnyOfNullProperty
|
68
|
+
}
|
69
|
+
@client.request(req, opts)
|
70
|
+
end
|
71
|
+
|
72
|
+
# Endpoint that returns an array of objects with union properties.
|
73
|
+
#
|
74
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
75
|
+
#
|
76
|
+
# @return [Array<Sink::Models::ObjectWithUnionProperties>]
|
77
|
+
def array_object_with_union_properties(opts = {})
|
78
|
+
req = {
|
79
|
+
method: :get,
|
80
|
+
path: "/responses/array/object_with_union_properties",
|
81
|
+
model: Sink::ArrayOf.new(Sink::Models::ObjectWithUnionProperties)
|
82
|
+
}
|
83
|
+
@client.request(req, opts)
|
84
|
+
end
|
85
|
+
|
86
|
+
# Endpoint that returns a top-level array.
|
87
|
+
#
|
88
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
89
|
+
#
|
90
|
+
# @return [Array<Sink::Models::SimpleObject>]
|
91
|
+
def array_response(opts = {})
|
92
|
+
req = {
|
93
|
+
method: :get,
|
94
|
+
path: "/responses/array",
|
95
|
+
model: Sink::ArrayOf.new(Sink::Models::SimpleObject)
|
96
|
+
}
|
97
|
+
@client.request(req, opts)
|
98
|
+
end
|
99
|
+
|
100
|
+
# Endpoint with a top level boolean response.
|
101
|
+
#
|
102
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
103
|
+
#
|
104
|
+
# @return [Boolean]
|
105
|
+
def boolean_response(opts = {})
|
106
|
+
req = {
|
107
|
+
method: :post,
|
108
|
+
path: "/responses/boolean",
|
109
|
+
model: Sink::BooleanModel
|
110
|
+
}
|
111
|
+
@client.request(req, opts)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Endpoint with an empty response.
|
115
|
+
#
|
116
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
117
|
+
#
|
118
|
+
# @return [nil]
|
119
|
+
def empty_response(opts = {})
|
120
|
+
req = {
|
121
|
+
method: :post,
|
122
|
+
path: "/responses/empty",
|
123
|
+
model: NilClass
|
124
|
+
}
|
125
|
+
@client.request(req, opts)
|
126
|
+
end
|
127
|
+
|
128
|
+
# Endpoint with a top level integer response.
|
129
|
+
#
|
130
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
131
|
+
#
|
132
|
+
# @return [Integer]
|
133
|
+
def integer_response(opts = {})
|
134
|
+
req = {
|
135
|
+
method: :post,
|
136
|
+
path: "/responses/integer",
|
137
|
+
model: Integer
|
138
|
+
}
|
139
|
+
@client.request(req, opts)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Endpoint with a response schema that doesn't set the `required` property.
|
143
|
+
#
|
144
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
145
|
+
#
|
146
|
+
# @return [Sink::Models::ResponseMissingRequiredResponse]
|
147
|
+
def missing_required(opts = {})
|
148
|
+
req = {
|
149
|
+
method: :get,
|
150
|
+
path: "/responses/missing_required",
|
151
|
+
model: Sink::Models::ResponseMissingRequiredResponse
|
152
|
+
}
|
153
|
+
@client.request(req, opts)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Endpoint that returns a nested array.
|
157
|
+
#
|
158
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
159
|
+
#
|
160
|
+
# @return [Sink::Models::ResponseNestedArrayResponse]
|
161
|
+
def nested_array(opts = {})
|
162
|
+
req = {
|
163
|
+
method: :get,
|
164
|
+
path: "/responses/array/nested",
|
165
|
+
model: Sink::Models::ResponseNestedArrayResponse
|
166
|
+
}
|
167
|
+
@client.request(req, opts)
|
168
|
+
end
|
169
|
+
|
170
|
+
# Method with a response object with a different property for each supported type.
|
171
|
+
#
|
172
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
173
|
+
#
|
174
|
+
# @return [Sink::Models::ResponseObjectAllPropertiesResponse]
|
175
|
+
def object_all_properties(opts = {})
|
176
|
+
req = {
|
177
|
+
method: :get,
|
178
|
+
path: "/responses/object/everything",
|
179
|
+
model: Sink::Models::ResponseObjectAllPropertiesResponse
|
180
|
+
}
|
181
|
+
@client.request(req, opts)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Endpoint with an empty response.
|
185
|
+
#
|
186
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
187
|
+
#
|
188
|
+
# @return [Sink::Models::ResponseObjectNoPropertiesResponse]
|
189
|
+
def object_no_properties(opts = {})
|
190
|
+
req = {
|
191
|
+
method: :post,
|
192
|
+
path: "/responses/object_no_properties",
|
193
|
+
model: Sink::Models::ResponseObjectNoPropertiesResponse
|
194
|
+
}
|
195
|
+
@client.request(req, opts)
|
196
|
+
end
|
197
|
+
|
198
|
+
# Endpoint with an object response that contains an `additionalProperties`
|
199
|
+
# property with a nested schema.
|
200
|
+
#
|
201
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
202
|
+
#
|
203
|
+
# @return [Sink::Models::ResponseObjectWithAdditionalPropertiesPropResponse]
|
204
|
+
def object_with_additional_properties_prop(opts = {})
|
205
|
+
req = {
|
206
|
+
method: :post,
|
207
|
+
path: "/responses/object_with_additional_properties_prop",
|
208
|
+
model: Sink::Models::ResponseObjectWithAdditionalPropertiesPropResponse
|
209
|
+
}
|
210
|
+
@client.request(req, opts)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Endpoint with an object response that contains a union property with multiple
|
214
|
+
# nested schemas.
|
215
|
+
#
|
216
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
217
|
+
#
|
218
|
+
# @return [Sink::Models::ResponseObjectWithHeavilyNestedUnionResponse]
|
219
|
+
def object_with_heavily_nested_union(opts = {})
|
220
|
+
req = {
|
221
|
+
method: :post,
|
222
|
+
path: "/responses/object_with_heavily_nested_union",
|
223
|
+
model: Sink::Models::ResponseObjectWithHeavilyNestedUnionResponse
|
224
|
+
}
|
225
|
+
@client.request(req, opts)
|
226
|
+
end
|
227
|
+
|
228
|
+
# Method with a response object that uses oneOf to indicate nullability.
|
229
|
+
#
|
230
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
231
|
+
#
|
232
|
+
# @return [Sink::Models::ObjectWithOneOfNullProperty]
|
233
|
+
def oneof_null(opts = {})
|
234
|
+
req = {
|
235
|
+
method: :get,
|
236
|
+
path: "/responses/oneof_null",
|
237
|
+
model: Sink::Models::ObjectWithOneOfNullProperty
|
238
|
+
}
|
239
|
+
@client.request(req, opts)
|
240
|
+
end
|
241
|
+
|
242
|
+
# Endpoint with a response that only has `readOnly` properties
|
243
|
+
#
|
244
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
245
|
+
#
|
246
|
+
# @return [Sink::Models::ResponseOnlyReadOnlyPropertiesResponse]
|
247
|
+
def only_read_only_properties(opts = {})
|
248
|
+
req = {
|
249
|
+
method: :get,
|
250
|
+
path: "/responses/only_read_only_properties",
|
251
|
+
model: Sink::Models::ResponseOnlyReadOnlyPropertiesResponse
|
252
|
+
}
|
253
|
+
@client.request(req, opts)
|
254
|
+
end
|
255
|
+
|
256
|
+
# Endpoint that returns a $ref to SimpleObject. This is used to test shared
|
257
|
+
# response models.
|
258
|
+
#
|
259
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
260
|
+
#
|
261
|
+
# @return [Sink::Models::SimpleObject]
|
262
|
+
def shared_simple_object(opts = {})
|
263
|
+
req = {
|
264
|
+
method: :get,
|
265
|
+
path: "/responses/shared_simple_object",
|
266
|
+
model: Sink::Models::SimpleObject
|
267
|
+
}
|
268
|
+
@client.request(req, opts)
|
269
|
+
end
|
270
|
+
|
271
|
+
# Endpoint with a top level string response.
|
272
|
+
#
|
273
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
274
|
+
#
|
275
|
+
# @return [String]
|
276
|
+
def string_response(opts = {})
|
277
|
+
req = {
|
278
|
+
method: :post,
|
279
|
+
path: "/responses/string",
|
280
|
+
model: String
|
281
|
+
}
|
282
|
+
@client.request(req, opts)
|
283
|
+
end
|
284
|
+
|
285
|
+
# Should not generate a named return type for object without defined properties;
|
286
|
+
# instead, it should simply use an `unknown` type or equivalent. In Java and Go,
|
287
|
+
# where we have fancier accessors for raw json stuff, we should generate a named
|
288
|
+
# type, but it should basically just have untyped additional properties. See
|
289
|
+
# https://linear.app/stainless/issue/STA-563/no-type-should-be-generated-for-endpoints-returning-type-object-schema.
|
290
|
+
#
|
291
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
292
|
+
#
|
293
|
+
# @return [Object]
|
294
|
+
def unknown_object(opts = {})
|
295
|
+
req = {
|
296
|
+
method: :post,
|
297
|
+
path: "/responses/unknown_object",
|
298
|
+
model: Sink::Unknown
|
299
|
+
}
|
300
|
+
@client.request(req, opts)
|
301
|
+
end
|
302
|
+
|
303
|
+
# Should return a ModelWithNestedModel object with a `properties` field that we
|
304
|
+
# can rename in the Stainless config to a prettier name.
|
305
|
+
#
|
306
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
307
|
+
#
|
308
|
+
# @return [Sink::Models::ModelWithNestedModel]
|
309
|
+
def with_model_in_nested_path(opts = {})
|
310
|
+
req = {
|
311
|
+
method: :get,
|
312
|
+
path: "/responses/with_model_in_nested_path",
|
313
|
+
model: Sink::Models::ModelWithNestedModel
|
314
|
+
}
|
315
|
+
@client.request(req, opts)
|
316
|
+
end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class SharedQueryParams
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
12
|
+
# @option params [String, nil] :get1
|
13
|
+
# @option params [String, nil] :shared1
|
14
|
+
# @option params [String, nil] :shared2
|
15
|
+
#
|
16
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
def retrieve(params = {}, opts = {})
|
20
|
+
req = {
|
21
|
+
method: :get,
|
22
|
+
path: "/shared-query-params",
|
23
|
+
query: params,
|
24
|
+
model: String
|
25
|
+
}
|
26
|
+
@client.request(req, opts)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
30
|
+
# @option params [String, nil] :get1
|
31
|
+
# @option params [String, nil] :shared1
|
32
|
+
# @option params [String, nil] :shared2
|
33
|
+
#
|
34
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
35
|
+
#
|
36
|
+
# @return [String]
|
37
|
+
def del(params = {}, opts = {})
|
38
|
+
req = {
|
39
|
+
method: :delete,
|
40
|
+
path: "/shared-query-params",
|
41
|
+
query: params,
|
42
|
+
model: String
|
43
|
+
}
|
44
|
+
@client.request(req, opts)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Streaming
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
12
|
+
# @option params [String] :model
|
13
|
+
# @option params [String] :prompt
|
14
|
+
# @option params [Boolean] :stream
|
15
|
+
#
|
16
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
17
|
+
#
|
18
|
+
# @return [Sink::Models::StreamingBasicResponse]
|
19
|
+
def basic(params = {}, opts = {})
|
20
|
+
req = {
|
21
|
+
method: :post,
|
22
|
+
path: "/streaming/basic",
|
23
|
+
body: params,
|
24
|
+
headers: {"Content-Type" => "application/json"},
|
25
|
+
model: Sink::Models::StreamingBasicResponse
|
26
|
+
}
|
27
|
+
@client.request(req, opts)
|
28
|
+
end
|
29
|
+
|
30
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
31
|
+
# @option params [String] :model
|
32
|
+
# @option params [String] :prompt
|
33
|
+
# @option params [ParentObject, nil] :parent_object
|
34
|
+
# @option params [Boolean] :stream
|
35
|
+
#
|
36
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
37
|
+
#
|
38
|
+
# @return [Sink::Models::StreamingNestedParamsResponse]
|
39
|
+
def nested_params(params = {}, opts = {})
|
40
|
+
req = {
|
41
|
+
method: :post,
|
42
|
+
path: "/streaming/nested_params",
|
43
|
+
body: params,
|
44
|
+
headers: {"Content-Type" => "application/json"},
|
45
|
+
model: Sink::Models::StreamingNestedParamsResponse
|
46
|
+
}
|
47
|
+
@client.request(req, opts)
|
48
|
+
end
|
49
|
+
|
50
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
51
|
+
# @option params [String] :model
|
52
|
+
# @option params [String] :prompt
|
53
|
+
#
|
54
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
55
|
+
#
|
56
|
+
# @return [Sink::Models::StreamingNoDiscriminatorResponse]
|
57
|
+
def no_discriminator(params = {}, opts = {})
|
58
|
+
req = {
|
59
|
+
method: :post,
|
60
|
+
path: "/streaming/no_discriminator",
|
61
|
+
body: params,
|
62
|
+
headers: {"Content-Type" => "application/json"},
|
63
|
+
model: Sink::Models::StreamingNoDiscriminatorResponse
|
64
|
+
}
|
65
|
+
@client.request(req, opts)
|
66
|
+
end
|
67
|
+
|
68
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
69
|
+
# @option params [String] :prompt
|
70
|
+
# @option params [Boolean] :should_stream
|
71
|
+
#
|
72
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
73
|
+
#
|
74
|
+
# @return [Sink::Models::StreamingQueryParamDiscriminatorResponse]
|
75
|
+
def query_param_discriminator(params = {}, opts = {})
|
76
|
+
req = {
|
77
|
+
method: :get,
|
78
|
+
path: "/streaming/query_param_discriminator",
|
79
|
+
query: params,
|
80
|
+
model: Sink::Models::StreamingQueryParamDiscriminatorResponse
|
81
|
+
}
|
82
|
+
@client.request(req, opts)
|
83
|
+
end
|
84
|
+
|
85
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
86
|
+
# @option params [String] :model
|
87
|
+
# @option params [Symbol, ParamWithDefaultValue] :param_with_default_value
|
88
|
+
# @option params [String] :prompt
|
89
|
+
# @option params [Boolean] :stream
|
90
|
+
#
|
91
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
92
|
+
#
|
93
|
+
# @return [Sink::Models::StreamingWithUnrelatedDefaultParamResponse]
|
94
|
+
def with_unrelated_default_param(params = {}, opts = {})
|
95
|
+
req = {
|
96
|
+
method: :post,
|
97
|
+
path: "/streaming/with_unrelated_default_param",
|
98
|
+
body: params,
|
99
|
+
headers: {"Content-Type" => "application/json"},
|
100
|
+
model: Sink::Models::StreamingWithUnrelatedDefaultParamResponse
|
101
|
+
}
|
102
|
+
@client.request(req, opts)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Testing
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
12
|
+
#
|
13
|
+
# @return [Sink::Models::RootResponse]
|
14
|
+
def root(opts = {})
|
15
|
+
req = {
|
16
|
+
method: :get,
|
17
|
+
path: "/",
|
18
|
+
model: Sink::Models::RootResponse
|
19
|
+
}
|
20
|
+
@client.request(req, opts)
|
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 Tests
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# Testing codegen change with new Github action
|
12
|
+
#
|
13
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
14
|
+
#
|
15
|
+
# @return [nil]
|
16
|
+
def run_codegen(opts = {})
|
17
|
+
req = {
|
18
|
+
method: :get,
|
19
|
+
path: "/tests/run_codegen",
|
20
|
+
model: NilClass
|
21
|
+
}
|
22
|
+
@client.request(req, opts)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Sink
|
4
|
+
module Resources
|
5
|
+
class Tools
|
6
|
+
# @param client [Sink::Client]
|
7
|
+
def initialize(client:)
|
8
|
+
@client = client
|
9
|
+
end
|
10
|
+
|
11
|
+
# @param params [Hash{Symbol => Object}] Attributes to send in this request.
|
12
|
+
# @option params [String, nil] :skipped_go
|
13
|
+
# @option params [String, nil] :skipped_java
|
14
|
+
# @option params [String, nil] :skipped_node
|
15
|
+
# @option params [String, nil] :skipped_python
|
16
|
+
# @option params [String, nil] :skipped_python_and_node
|
17
|
+
#
|
18
|
+
# @param opts [Hash, Sink::RequestOptions] Options to specify HTTP behaviour for this request.
|
19
|
+
#
|
20
|
+
# @return [Sink::Models::ObjectSkippedProps]
|
21
|
+
def skipped_params(params = {}, opts = {})
|
22
|
+
req = {
|
23
|
+
method: :post,
|
24
|
+
path: "/tools/skipped_params",
|
25
|
+
body: params,
|
26
|
+
headers: {"Content-Type" => "application/json"},
|
27
|
+
model: Sink::Models::ObjectSkippedProps
|
28
|
+
}
|
29
|
+
@client.request(req, opts)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|