Skip to content

Commit dff43f8

Browse files
committed
Add json ingestion gem shell
1 parent 8d55f90 commit dff43f8

9 files changed

Lines changed: 103 additions & 1 deletion

File tree

CODEBASE_OVERVIEW.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,13 @@ graph LR;
192192
click opensearch-ruby href "https://rubygems.org/gems/opensearch-ruby" "Open on RubyGems.org" _blank;
193193
```
194194

195-
### Extensions (5 gems)
195+
### Extensions (6 gems)
196196

197197
These libraries extend ElasticGraph to provide optional but commonly needed functionality.
198198

199199
* [elasticgraph-apollo](elasticgraph-apollo/README.md): Transforms an ElasticGraph project into an Apollo subgraph.
200200
* [elasticgraph-health_check](elasticgraph-health_check/README.md): Provides a health check for high availability ElasticGraph deployments.
201+
* [elasticgraph-json_ingestion](elasticgraph-json_ingestion/README.md): JSON Schema ingestion support for ElasticGraph.
201202
* [elasticgraph-query_interceptor](elasticgraph-query_interceptor/README.md): Intercepts ElasticGraph datastore queries.
202203
* [elasticgraph-query_registry](elasticgraph-query_registry/README.md): Provides a source-controlled query registry for ElasticGraph applications.
203204
* [elasticgraph-warehouse](elasticgraph-warehouse/README.md): Extends ElasticGraph to support ingestion into a data warehouse.
@@ -216,6 +217,7 @@ graph LR;
216217
apollo-federation["apollo-federation"];
217218
elasticgraph-health_check["eg-health_check"];
218219
elasticgraph-datastore_core["eg-datastore_core"];
220+
elasticgraph-json_ingestion["eg-json_ingestion"];
219221
elasticgraph-query_interceptor["eg-query_interceptor"];
220222
elasticgraph-schema_artifacts["eg-schema_artifacts"];
221223
elasticgraph-query_registry["eg-query_registry"];
@@ -228,6 +230,7 @@ graph LR;
228230
elasticgraph-health_check --> elasticgraph-datastore_core;
229231
elasticgraph-health_check --> elasticgraph-graphql;
230232
elasticgraph-health_check --> elasticgraph-support;
233+
elasticgraph-json_ingestion --> elasticgraph-support;
231234
elasticgraph-query_interceptor --> elasticgraph-graphql;
232235
elasticgraph-query_interceptor --> elasticgraph-schema_artifacts;
233236
elasticgraph-query_registry --> elasticgraph-graphql;
@@ -242,6 +245,7 @@ graph LR;
242245
class apollo-federation externalGemCatStyle;
243246
class elasticgraph-health_check targetGemStyle;
244247
class elasticgraph-datastore_core otherEgGemStyle;
248+
class elasticgraph-json_ingestion targetGemStyle;
245249
class elasticgraph-query_interceptor targetGemStyle;
246250
class elasticgraph-schema_artifacts otherEgGemStyle;
247251
class elasticgraph-query_registry targetGemStyle;

Gemfile.lock

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ PATH
105105
elasticgraph-support (= 1.2.1.pre)
106106
hashdiff (~> 1.2, >= 1.2.1)
107107

108+
PATH
109+
remote: elasticgraph-json_ingestion
110+
specs:
111+
elasticgraph-json_ingestion (1.2.1.pre)
112+
elasticgraph-support (= 1.2.1.pre)
113+
108114
PATH
109115
remote: elasticgraph-lambda_support
110116
specs:
@@ -686,6 +692,7 @@ DEPENDENCIES
686692
elasticgraph-indexer (= 1.2.1.pre)!
687693
elasticgraph-indexer_autoscaler_lambda (= 1.2.1.pre)!
688694
elasticgraph-indexer_lambda (= 1.2.1.pre)!
695+
elasticgraph-json_ingestion (= 1.2.1.pre)!
689696
elasticgraph-lambda_support (= 1.2.1.pre)!
690697
elasticgraph-local (= 1.2.1.pre)!
691698
elasticgraph-opensearch (= 1.2.1.pre)!
@@ -777,6 +784,7 @@ CHECKSUMS
777784
elasticgraph-indexer (1.2.1.pre)
778785
elasticgraph-indexer_autoscaler_lambda (1.2.1.pre)
779786
elasticgraph-indexer_lambda (1.2.1.pre)
787+
elasticgraph-json_ingestion (1.2.1.pre)
780788
elasticgraph-lambda_support (1.2.1.pre)
781789
elasticgraph-local (1.2.1.pre)
782790
elasticgraph-opensearch (1.2.1.pre)

elasticgraph-json_ingestion/.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../spec_support/subdir_dot_rspec
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../config/site/yardopts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Gemfile
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 - 2026 Block, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ElasticGraph::JSONIngestion
2+
3+
JSON Schema ingestion support for ElasticGraph.
4+
5+
This gem provides the schema-definition extension that generates JSON Schema artifacts for indexing
6+
events and validates JSON-ingestion-specific schema options.
7+
8+
## Dependency Diagram
9+
10+
```mermaid
11+
graph LR;
12+
classDef targetGemStyle fill:#FADBD8,stroke:#EC7063,color:#000,stroke-width:2px;
13+
classDef otherEgGemStyle fill:#A9DFBF,stroke:#2ECC71,color:#000;
14+
classDef externalGemStyle fill:#E0EFFF,stroke:#70A1D7,color:#2980B9;
15+
elasticgraph-json_ingestion["elasticgraph-json_ingestion"];
16+
class elasticgraph-json_ingestion targetGemStyle;
17+
elasticgraph-support["elasticgraph-support"];
18+
elasticgraph-json_ingestion --> elasticgraph-support;
19+
class elasticgraph-support otherEgGemStyle;
20+
```
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Copyright 2024 - 2026 Block, Inc.
2+
#
3+
# Use of this source code is governed by an MIT-style
4+
# license that can be found in the LICENSE file or at
5+
# https://opensource.org/licenses/MIT.
6+
#
7+
# frozen_string_literal: true
8+
9+
require_relative "../elasticgraph-support/lib/elastic_graph/version"
10+
11+
Gem::Specification.new do |spec|
12+
spec.name = "elasticgraph-json_ingestion"
13+
spec.version = ElasticGraph::VERSION
14+
spec.authors = ["Josh Wilson", "Myron Marston", "Block Engineering"]
15+
spec.email = ["joshuaw@squareup.com"]
16+
spec.homepage = "https://block.github.io/elasticgraph/"
17+
spec.license = "MIT"
18+
spec.summary = "JSON Schema ingestion support for ElasticGraph."
19+
20+
spec.metadata = {
21+
"bug_tracker_uri" => "https://github.com/block/elasticgraph/issues",
22+
"changelog_uri" => "https://github.com/block/elasticgraph/releases/tag/v#{ElasticGraph::VERSION}",
23+
"documentation_uri" => "https://block.github.io/elasticgraph/api-docs/v#{ElasticGraph::VERSION}/",
24+
"homepage_uri" => "https://block.github.io/elasticgraph/",
25+
"source_code_uri" => "https://github.com/block/elasticgraph/tree/v#{ElasticGraph::VERSION}/#{spec.name}",
26+
"gem_category" => "extension"
27+
}
28+
29+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
30+
`git ls-files -z`.split("\x0").reject do |f|
31+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features|sig)/|\.(?:git|travis|circleci)|appveyor)})
32+
end - [".rspec", "Gemfile", ".yardopts"]
33+
end
34+
35+
spec.required_ruby_version = [">= 3.4", "< 4.1"]
36+
37+
spec.add_dependency "elasticgraph-support", ElasticGraph::VERSION
38+
39+
# This gem's schema-definition extension code references `elasticgraph-schema_definition`, but
40+
# applications load it through schema-definition tasks after `elasticgraph-schema_definition` is already
41+
# available. Keeping this as a development dependency avoids a runtime dependency cycle.
42+
spec.add_development_dependency "elasticgraph-schema_definition", ElasticGraph::VERSION
43+
end

elasticgraph-support/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ graph LR;
4545
elasticgraph-indexer["elasticgraph-indexer"];
4646
elasticgraph-indexer --> elasticgraph-support;
4747
class elasticgraph-indexer otherEgGemStyle;
48+
elasticgraph-json_ingestion["elasticgraph-json_ingestion"];
49+
elasticgraph-json_ingestion --> elasticgraph-support;
50+
class elasticgraph-json_ingestion otherEgGemStyle;
4851
elasticgraph-opensearch["elasticgraph-opensearch"];
4952
elasticgraph-opensearch --> elasticgraph-support;
5053
class elasticgraph-opensearch otherEgGemStyle;

0 commit comments

Comments
 (0)