kafka_rest_proxy_client 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/ProducerApi.md +2 -2
- data/lib/kafka_rest_proxy_client.rb +0 -11
- data/lib/kafka_rest_proxy_client/api/producer_api.rb +2 -2
- data/lib/kafka_rest_proxy_client/api_client.rb +7 -4
- data/lib/kafka_rest_proxy_client/version.rb +1 -1
- data/spec/api/producer_api_spec.rb +2 -13
- data/spec/api_client_spec.rb +1 -12
- data/spec/configuration_spec.rb +0 -11
- data/spec/models/body_spec.rb +0 -12
- data/spec/models/inline_response_200_offsets_spec.rb +0 -12
- data/spec/models/inline_response_200_spec.rb +0 -12
- data/spec/models/offset_spec.rb +0 -12
- data/spec/models/producer_request_spec.rb +0 -12
- data/spec/models/producer_response_spec.rb +0 -12
- data/spec/models/record_spec.rb +0 -12
- data/spec/models/topicstopic_name_records_spec.rb +0 -12
- data/spec/spec_helper.rb +0 -12
- data/swagger.yml +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11ad6afa31b950fba64eb151a92025f061b27c77
|
4
|
+
data.tar.gz: 458e2dcecbe78f3c6c368ffbbf086a7353e94acb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3e7c5eb67caf32095fc1da7a8358dba617ef926df3e2f90a60d315ae0f1746e4b4b2ec4ac1efc6a4b0a4b9c082cfb2cd303f9940ec5453bba6c1d567f794e1f
|
7
|
+
data.tar.gz: db41460ce84a1348068bfa3045572bce8d2c9bebeeded0e52019fd0e7c903c243b81dc27b172f1c453b644e762aee105d7eb78bf2c9062ba320a884288d60109
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/k
|
|
10
10
|
POST /topics/test HTTP/1.1
|
11
11
|
Host: kafkaproxy.example.com
|
12
12
|
Content-Type: application/vnd.kafka.json.v2+json
|
13
|
-
Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
|
13
|
+
Accept: application/vnd.kafka.json.v2+json, application/vnd.kafka+json, application/json
|
14
14
|
{
|
15
15
|
"records": [
|
16
16
|
{
|
@@ -32,7 +32,7 @@ Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/j
|
|
32
32
|
|
33
33
|
```
|
34
34
|
HTTP/1.1 200 OK
|
35
|
-
Content-Type: application/vnd.kafka.v2+json
|
35
|
+
Content-Type: application/vnd.kafka.json.v2+json
|
36
36
|
{
|
37
37
|
"key_schema_id": null,
|
38
38
|
"value_schema_id": null,
|
data/docs/ProducerApi.md
CHANGED
@@ -51,8 +51,8 @@ No authorization required
|
|
51
51
|
|
52
52
|
### HTTP request headers
|
53
53
|
|
54
|
-
- **Content-Type**: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
|
55
|
-
- **Accept**: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
|
54
|
+
- **Content-Type**: application/vnd.kafka.json.v2+json, application/vnd.kafka+json, application/json
|
55
|
+
- **Accept**: application/vnd.kafka.json.v2+json, application/vnd.kafka+json, application/json
|
56
56
|
|
57
57
|
|
58
58
|
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
# Common files
|
13
2
|
require 'kafka_rest_proxy_client/api_client'
|
14
3
|
require 'kafka_rest_proxy_client/api_error'
|
@@ -43,9 +43,9 @@ module KafkaProxyRestClient
|
|
43
43
|
# header parameters
|
44
44
|
header_params = {}
|
45
45
|
# HTTP header 'Accept' (if needed)
|
46
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.kafka.v2+json', 'application/vnd.kafka+json', 'application/json'])
|
46
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.kafka.json.v2+json', 'application/vnd.kafka.v1+json', 'application/vnd.kafka+json', 'application/json'])
|
47
47
|
# HTTP header 'Content-Type'
|
48
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/vnd.kafka.v2+json', 'application/vnd.kafka+json', 'application/json'])
|
48
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/vnd.kafka.json.v2+json', 'application/vnd.kafka.v1+json', 'application/vnd.kafka+json', 'application/json'])
|
49
49
|
|
50
50
|
# form parameters
|
51
51
|
form_params = {}
|
@@ -21,7 +21,7 @@ module KafkaProxyRestClient
|
|
21
21
|
@config = config
|
22
22
|
@user_agent = "Swagger-Codegen/#{VERSION}/ruby"
|
23
23
|
@default_headers = {
|
24
|
-
'Content-Type' => "application/json",
|
24
|
+
'Content-Type' => "application/vnd.kafka.json.v2+json",
|
25
25
|
'User-Agent' => @user_agent
|
26
26
|
}
|
27
27
|
end
|
@@ -115,6 +115,8 @@ module KafkaProxyRestClient
|
|
115
115
|
|
116
116
|
# Check if the given MIME is a JSON MIME.
|
117
117
|
# JSON MIME examples:
|
118
|
+
# application/vnd.kafka.json.v2+json
|
119
|
+
# application/vnd.kafka+json
|
118
120
|
# application/json
|
119
121
|
# application/json; charset=UTF8
|
120
122
|
# APPLICATION/JSON
|
@@ -122,7 +124,7 @@ module KafkaProxyRestClient
|
|
122
124
|
# @param [String] mime MIME
|
123
125
|
# @return [Boolean] True if the MIME is application/json
|
124
126
|
def json_mime?(mime)
|
125
|
-
(mime == "*/*") || !(mime =~ /\Aapplication\/json(;.*)?\z/i).nil?
|
127
|
+
(mime == "*/*") || !(mime =~ /\Aapplication\/(.*)?json(;.*)?\z/i).nil?
|
126
128
|
end
|
127
129
|
|
128
130
|
# Deserialize the response to the given return type.
|
@@ -301,8 +303,9 @@ module KafkaProxyRestClient
|
|
301
303
|
def select_header_accept(accepts)
|
302
304
|
return nil if accepts.nil? || accepts.empty?
|
303
305
|
# use JSON when present, otherwise use all of the provided
|
304
|
-
json_accept = accepts.find { |s| json_mime?(s) }
|
305
|
-
return json_accept || accepts.join(',')
|
306
|
+
# json_accept = accepts.find { |s| json_mime?(s) }
|
307
|
+
# return json_accept || accepts.join(',')
|
308
|
+
accepts.join(', ')
|
306
309
|
end
|
307
310
|
|
308
311
|
# Return Content-Type header based on an array of content types provided.
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
|
@@ -32,8 +21,8 @@ describe 'ProducerApi' do
|
|
32
21
|
end
|
33
22
|
|
34
23
|
# unit tests for topics_topic_name_post
|
35
|
-
#
|
36
|
-
# Produce messages to a topic, optionally specifying keys or partitions for the messages. If no partition is provided, one will be chosen based on the hash of the key. If no key is provided, the partition will be chosen for each message in a round-robin fashion. # For the ``avro`` embedded format, you must provide information about schemas and the REST proxy must be configured with the URL to access the schema registry (``schema.registry.connect``). Schemas may be provided as the full schema encoded as a string, or, after the initial request may be provided as the schema ID returned with the first response.
|
24
|
+
#
|
25
|
+
# Produce messages to a topic, optionally specifying keys or partitions for the messages. If no partition is provided, one will be chosen based on the hash of the key. If no key is provided, the partition will be chosen for each message in a round-robin fashion. # For the ``avro`` embedded format, you must provide information about schemas and the REST proxy must be configured with the URL to access the schema registry (``schema.registry.connect``). Schemas may be provided as the full schema encoded as a string, or, after the initial request may be provided as the schema ID returned with the first response.
|
37
26
|
# @param topic_name Name of the topic to produce the messages to
|
38
27
|
# @param body Data to send to the kafka topic.
|
39
28
|
# @param [Hash] opts the optional parameters
|
data/spec/api_client_spec.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
|
14
3
|
describe KafkaProxyRestClient::ApiClient do
|
@@ -123,7 +112,7 @@ describe KafkaProxyRestClient::ApiClient do
|
|
123
112
|
#api_client = KafkaProxyRestClient::ApiClient.new
|
124
113
|
#_model = KafkaProxyRestClient::ModelName.new
|
125
114
|
# update the model attribute below
|
126
|
-
#_model.id = 1
|
115
|
+
#_model.id = 1
|
127
116
|
# update the expected value (hash) below
|
128
117
|
#expected = {id: 1, name: '', tags: []}
|
129
118
|
#expect(api_client.object_to_hash(_model)).to eq(expected)
|
data/spec/configuration_spec.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
|
14
3
|
describe KafkaProxyRestClient::Configuration do
|
data/spec/models/body_spec.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -62,4 +51,3 @@ describe 'Body' do
|
|
62
51
|
end
|
63
52
|
|
64
53
|
end
|
65
|
-
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -56,4 +45,3 @@ describe 'InlineResponse200Offsets' do
|
|
56
45
|
end
|
57
46
|
|
58
47
|
end
|
59
|
-
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -50,4 +39,3 @@ describe 'InlineResponse200' do
|
|
50
39
|
end
|
51
40
|
|
52
41
|
end
|
53
|
-
|
data/spec/models/offset_spec.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -56,4 +45,3 @@ describe 'Offset' do
|
|
56
45
|
end
|
57
46
|
|
58
47
|
end
|
59
|
-
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -62,4 +51,3 @@ describe 'ProducerRequest' do
|
|
62
51
|
end
|
63
52
|
|
64
53
|
end
|
65
|
-
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -50,4 +39,3 @@ describe 'ProducerResponse' do
|
|
50
39
|
end
|
51
40
|
|
52
41
|
end
|
53
|
-
|
data/spec/models/record_spec.rb
CHANGED
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -50,4 +39,3 @@ describe 'Record' do
|
|
50
39
|
end
|
51
40
|
|
52
41
|
end
|
53
|
-
|
@@ -1,14 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
1
|
require 'spec_helper'
|
13
2
|
require 'json'
|
14
3
|
require 'date'
|
@@ -50,4 +39,3 @@ describe 'TopicstopicNameRecords' do
|
|
50
39
|
end
|
51
40
|
|
52
41
|
end
|
53
|
-
|
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#Kafka REST Proxy API
|
3
|
-
|
4
|
-
#An initial draft of the [Kafka REST Proxy API](https://github.com/confluentinc/kafka-rest). ## Example JSON request ``` POST /topics/test HTTP/1.1 Host: kafkaproxy.example.com Content-Type: application/vnd.kafka.json.v2+json Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json { \"records\": [ { \"key\": \"somekey\", \"value\": {\"foo\": \"bar\"} }, { \"value\": [ \"foo\", \"bar\" ], \"partition\": 1 }, { \"value\": 53.5 } ] } ``` ## Example JSON response ``` HTTP/1.1 200 OK Content-Type: application/vnd.kafka.v2+json { \"key_schema_id\": null, \"value_schema_id\": null, \"offsets\": [ { \"partition\": 2, \"offset\": 100 }, { \"partition\": 1, \"offset\": 101 }, { \"partition\": 2, \"offset\": 102 } ] } ```
|
5
|
-
|
6
|
-
OpenAPI spec version: 0.1.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
|
-
=end
|
11
|
-
|
12
|
-
# load the gem
|
13
1
|
require 'kafka_rest_proxy_client'
|
14
2
|
|
15
3
|
# The following was generated by the `rspec --init` command. Conventionally, all
|
data/swagger.yml
CHANGED
@@ -13,7 +13,7 @@ info:
|
|
13
13
|
POST /topics/test HTTP/1.1
|
14
14
|
Host: kafkaproxy.example.com
|
15
15
|
Content-Type: application/vnd.kafka.json.v2+json
|
16
|
-
Accept: application/vnd.kafka.v2+json, application/vnd.kafka+json, application/json
|
16
|
+
Accept: application/vnd.kafka.json.v2+json, application/vnd.kafka+json, application/json
|
17
17
|
{
|
18
18
|
"records": [
|
19
19
|
{
|
@@ -35,7 +35,7 @@ info:
|
|
35
35
|
|
36
36
|
```
|
37
37
|
HTTP/1.1 200 OK
|
38
|
-
Content-Type: application/vnd.kafka.v2+json
|
38
|
+
Content-Type: application/vnd.kafka.json.v2+json
|
39
39
|
{
|
40
40
|
"key_schema_id": null,
|
41
41
|
"value_schema_id": null,
|
@@ -59,12 +59,14 @@ tags:
|
|
59
59
|
- name: Producer
|
60
60
|
|
61
61
|
consumes:
|
62
|
-
- application/vnd.kafka.v2+json
|
62
|
+
- application/vnd.kafka.json.v2+json
|
63
|
+
- application/vnd.kafka.v1+json
|
63
64
|
- application/vnd.kafka+json
|
64
65
|
- application/json
|
65
66
|
|
66
67
|
produces:
|
67
|
-
- application/vnd.kafka.v2+json
|
68
|
+
- application/vnd.kafka.json.v2+json
|
69
|
+
- application/vnd.kafka.v1+json
|
68
70
|
- application/vnd.kafka+json
|
69
71
|
- application/json
|
70
72
|
|
@@ -165,6 +167,3 @@ definitions:
|
|
165
167
|
type: integer
|
166
168
|
error:
|
167
169
|
type: string
|
168
|
-
|
169
|
-
|
170
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kafka_rest_proxy_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swagger-Codegen
|
@@ -260,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
260
|
version: '0'
|
261
261
|
requirements: []
|
262
262
|
rubyforge_project:
|
263
|
-
rubygems_version: 2.
|
263
|
+
rubygems_version: 2.6.12
|
264
264
|
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: Kafka REST Proxy API Ruby Gem
|