Skip to content

Commit

Permalink
Use BasePackage for search output data (#529)
Browse files Browse the repository at this point in the history
So far the `/search` output was manually built. This had the risk that the format of the package output and search output diverge but they should not. To prevent this, a BasePackage is introduced. The package is composed out of this BasePackage with additional fields.

This change does not affect the output, only the order of the output.
  • Loading branch information
ruflin committed Jun 23, 2020
1 parent 584ca40 commit 337a7c5
Show file tree
Hide file tree
Showing 15 changed files with 273 additions and 269 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Remove package code generator. [#513](https://github.com/elastic/package-registry/pull/513)
* Support multiple packages paths. [#525](https://github.com/elastic/package-registry/pull/525)
* Added support for ecs style validation for dataset fields. [#520](https://github.com/elastic/package-registry/pull/520)
* Use BasePackage for search output data. [#529](https://github.com/elastic/package-registry/pull/529)

### Deprecated

Expand Down
12 changes: 6 additions & 6 deletions docs/api/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"format_version": "1.0.0",
"name": "example",
"title": "Example Integration",
"version": "1.0.0",
"readme": "/package/example/1.0.0/docs/README.md",
"license": "basic",
"description": "This is the example integration",
"type": "integration",
"download": "/epr/example/example-1.0.0.tar.gz",
"path": "/package/example/1.0.0",
"format_version": "1.0.0",
"readme": "/package/example/1.0.0/docs/README.md",
"license": "basic",
"categories": [
"logs",
"metrics"
Expand Down Expand Up @@ -111,7 +113,5 @@
],
"multiple": true
}
],
"download": "/epr/example/example-1.0.0.tar.gz",
"path": "/package/example/1.0.0"
]
}
64 changes: 32 additions & 32 deletions docs/api/search-all.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
[
{
"description": "Package with data sources",
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"name": "datasources",
"path": "/package/datasources/1.0.0",
"title": "Default datasource Integration",
"version": "1.0.0",
"description": "Package with data sources",
"type": "integration",
"version": "1.0.0"
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"path": "/package/datasources/1.0.0"
},
{
"description": "Tests if no pipeline is set, it defaults to the default one",
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"name": "default_pipeline",
"path": "/package/default_pipeline/0.0.2",
"title": "Default pipeline Integration",
"version": "0.0.2",
"description": "Tests if no pipeline is set, it defaults to the default one",
"type": "integration",
"version": "0.0.2"
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"path": "/package/default_pipeline/0.0.2"
},
{
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"name": "ecs_style_dataset",
"path": "/package/ecs_style_dataset/0.0.1",
"title": "Default pipeline Integration",
"version": "0.0.1",
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"type": "integration",
"version": "0.0.1"
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"path": "/package/ecs_style_dataset/0.0.1"
},
{
"description": "This is the example integration.",
"download": "/epr/example/example-0.0.2.tar.gz",
"name": "example",
"path": "/package/example/0.0.2",
"title": "Example",
"version": "0.0.2",
"description": "This is the example integration.",
"type": "integration",
"version": "0.0.2"
"download": "/epr/example/example-0.0.2.tar.gz",
"path": "/package/example/0.0.2"
},
{
"description": "This is the example integration",
"download": "/epr/example/example-1.0.0.tar.gz",
"name": "example",
"path": "/package/example/1.0.0",
"title": "Example Integration",
"version": "1.0.0",
"description": "This is the example integration",
"type": "integration",
"version": "1.0.0"
"download": "/epr/example/example-1.0.0.tar.gz",
"path": "/package/example/1.0.0"
},
{
"description": "This is the foo integration",
"download": "/epr/foo/foo-1.0.0.tar.gz",
"name": "foo",
"path": "/package/foo/1.0.0",
"title": "Foo",
"version": "1.0.0",
"description": "This is the foo integration",
"type": "solution",
"version": "1.0.0"
"download": "/epr/foo/foo-1.0.0.tar.gz",
"path": "/package/foo/1.0.0"
},
{
"description": "Tests that multiple can be set to false",
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"name": "multiple_false",
"path": "/package/multiple_false/0.0.1",
"title": "Multiple false",
"version": "0.0.1",
"description": "Tests that multiple can be set to false",
"type": "integration",
"version": "0.0.1"
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"path": "/package/multiple_false/0.0.1"
},
{
"description": "This package does contain a dataset but not stream configs.\n",
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"name": "no_stream_configs",
"path": "/package/no_stream_configs/1.0.0",
"title": "No Stream configs",
"version": "1.0.0",
"description": "This package does contain a dataset but not stream configs.\n",
"type": "integration",
"version": "1.0.0"
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"path": "/package/no_stream_configs/1.0.0"
}
]
48 changes: 24 additions & 24 deletions docs/api/search-category-logs.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
[
{
"description": "Package with data sources",
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"name": "datasources",
"path": "/package/datasources/1.0.0",
"title": "Default datasource Integration",
"version": "1.0.0",
"description": "Package with data sources",
"type": "integration",
"version": "1.0.0"
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"path": "/package/datasources/1.0.0"
},
{
"description": "Tests if no pipeline is set, it defaults to the default one",
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"name": "default_pipeline",
"path": "/package/default_pipeline/0.0.2",
"title": "Default pipeline Integration",
"version": "0.0.2",
"description": "Tests if no pipeline is set, it defaults to the default one",
"type": "integration",
"version": "0.0.2"
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"path": "/package/default_pipeline/0.0.2"
},
{
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"name": "ecs_style_dataset",
"path": "/package/ecs_style_dataset/0.0.1",
"title": "Default pipeline Integration",
"version": "0.0.1",
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"type": "integration",
"version": "0.0.1"
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"path": "/package/ecs_style_dataset/0.0.1"
},
{
"description": "This is the example integration",
"download": "/epr/example/example-1.0.0.tar.gz",
"name": "example",
"path": "/package/example/1.0.0",
"title": "Example Integration",
"version": "1.0.0",
"description": "This is the example integration",
"type": "integration",
"version": "1.0.0"
"download": "/epr/example/example-1.0.0.tar.gz",
"path": "/package/example/1.0.0"
},
{
"description": "Tests that multiple can be set to false",
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"name": "multiple_false",
"path": "/package/multiple_false/0.0.1",
"title": "Multiple false",
"version": "0.0.1",
"description": "Tests that multiple can be set to false",
"type": "integration",
"version": "0.0.1"
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"path": "/package/multiple_false/0.0.1"
},
{
"description": "This package does contain a dataset but not stream configs.\n",
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"name": "no_stream_configs",
"path": "/package/no_stream_configs/1.0.0",
"title": "No Stream configs",
"version": "1.0.0",
"description": "This package does contain a dataset but not stream configs.\n",
"type": "integration",
"version": "1.0.0"
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"path": "/package/no_stream_configs/1.0.0"
}
]
16 changes: 8 additions & 8 deletions docs/api/search-category-metrics.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[
{
"description": "This is the example integration",
"download": "/epr/example/example-1.0.0.tar.gz",
"name": "example",
"path": "/package/example/1.0.0",
"title": "Example Integration",
"version": "1.0.0",
"description": "This is the example integration",
"type": "integration",
"version": "1.0.0"
"download": "/epr/example/example-1.0.0.tar.gz",
"path": "/package/example/1.0.0"
},
{
"description": "This is the foo integration",
"download": "/epr/foo/foo-1.0.0.tar.gz",
"name": "foo",
"path": "/package/foo/1.0.0",
"title": "Foo",
"version": "1.0.0",
"description": "This is the foo integration",
"type": "solution",
"version": "1.0.0"
"download": "/epr/foo/foo-1.0.0.tar.gz",
"path": "/package/foo/1.0.0"
}
]
48 changes: 24 additions & 24 deletions docs/api/search-kibana652.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
[
{
"description": "Package with data sources",
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"name": "datasources",
"path": "/package/datasources/1.0.0",
"title": "Default datasource Integration",
"version": "1.0.0",
"description": "Package with data sources",
"type": "integration",
"version": "1.0.0"
"download": "/epr/datasources/datasources-1.0.0.tar.gz",
"path": "/package/datasources/1.0.0"
},
{
"description": "Tests if no pipeline is set, it defaults to the default one",
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"name": "default_pipeline",
"path": "/package/default_pipeline/0.0.2",
"title": "Default pipeline Integration",
"version": "0.0.2",
"description": "Tests if no pipeline is set, it defaults to the default one",
"type": "integration",
"version": "0.0.2"
"download": "/epr/default_pipeline/default_pipeline-0.0.2.tar.gz",
"path": "/package/default_pipeline/0.0.2"
},
{
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"name": "ecs_style_dataset",
"path": "/package/ecs_style_dataset/0.0.1",
"title": "Default pipeline Integration",
"version": "0.0.1",
"description": "Tests the registry validations works for dataset fields using the ecs style format",
"type": "integration",
"version": "0.0.1"
"download": "/epr/ecs_style_dataset/ecs_style_dataset-0.0.1.tar.gz",
"path": "/package/ecs_style_dataset/0.0.1"
},
{
"description": "This is the example integration.",
"download": "/epr/example/example-0.0.2.tar.gz",
"name": "example",
"path": "/package/example/0.0.2",
"title": "Example",
"version": "0.0.2",
"description": "This is the example integration.",
"type": "integration",
"version": "0.0.2"
"download": "/epr/example/example-0.0.2.tar.gz",
"path": "/package/example/0.0.2"
},
{
"description": "Tests that multiple can be set to false",
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"name": "multiple_false",
"path": "/package/multiple_false/0.0.1",
"title": "Multiple false",
"version": "0.0.1",
"description": "Tests that multiple can be set to false",
"type": "integration",
"version": "0.0.1"
"download": "/epr/multiple_false/multiple_false-0.0.1.tar.gz",
"path": "/package/multiple_false/0.0.1"
},
{
"description": "This package does contain a dataset but not stream configs.\n",
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"name": "no_stream_configs",
"path": "/package/no_stream_configs/1.0.0",
"title": "No Stream configs",
"version": "1.0.0",
"description": "This package does contain a dataset but not stream configs.\n",
"type": "integration",
"version": "1.0.0"
"download": "/epr/no_stream_configs/no_stream_configs-1.0.0.tar.gz",
"path": "/package/no_stream_configs/1.0.0"
}
]
Loading

0 comments on commit 337a7c5

Please sign in to comment.