-
Notifications
You must be signed in to change notification settings - Fork 90
Adding initial spec files #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 38 commits
394b1cb
2967350
bdffdfa
5558e48
2419161
eb9a53e
904bc9b
d0d5255
c2a1e1a
5c81724
7eff101
10449e0
fe691af
73b7e4d
367be0d
e3cc793
18863b1
f0ab0e9
08e40c7
b0c05d6
431d3c7
5f4f5c1
fd5303c
07bbedd
41bb01c
e6e5b3f
e9a6dbd
0f15458
da00c28
dd76b6d
0141965
6c38cc1
e585265
930d297
e4b6e97
d475a6d
6024684
e315c0d
396721e
076597f
4085ee2
3bb6f7c
d99805f
bed02b2
ac61112
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| ## | ||
| ## Describes the specification for the package's CHANGELOG file | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: array | ||
| items: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| version: | ||
| description: Package version. | ||
| type: string | ||
| pattern: "^[0-9]+\.[0-9]+\.[0-9]+$" | ||
| examples: | ||
| - "1.0.4" | ||
| changes: | ||
| description: List of changes in package version. | ||
| type: array | ||
| items: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| description: | ||
| description: Description of change. | ||
| type: string | ||
| examples: | ||
| - "Fix broken template" | ||
| type: | ||
| description: Type of change. | ||
| type: string | ||
| enum: | ||
| - "breaking-change" | ||
| - "bugfix" | ||
| - "enhancement" | ||
| - "known-issue" | ||
| link: | ||
| description: Link to issue or PR describing change in detail. | ||
| type: string | ||
| examples: | ||
| - "https://github.com/elastic/beats/issues/13507" | ||
| required: | ||
| - description | ||
| - type | ||
| - link | ||
| required: | ||
| - version | ||
| - changes |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| ## | ||
| ## This file documents changes in the package specification. It is NOT a package specification file. | ||
| ## | ||
| - version: 1.0.0-alpha1 | ||
| changes: | ||
| - description: Initial version of the Elastic Package specifiction. | ||
| type: enhancement | ||
| link: https://github.com/elastic/package-spec/pulls/1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| ## | ||
| ## Describes the specification for a dataset's various field definition files | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: object | ||
| additionalProperties: true | ||
| properties: | ||
| name: | ||
| description: Name of field | ||
| type: string | ||
| title: | ||
| description: Title of field | ||
| type: string | ||
| type: | ||
| description: Datatype of field | ||
| type: string | ||
| enum: | ||
| - constant_keyword | ||
| - text | ||
| - keyword | ||
| - long | ||
| - integer | ||
| - short | ||
| - byte | ||
| - double | ||
| - float | ||
| - half_float | ||
| - scaled_float | ||
| - date | ||
| - date_nanos | ||
| - boolean | ||
| - binary | ||
| - integer_range | ||
| - float_range | ||
| - long_range | ||
| - double_range | ||
| - date_range | ||
| - ip_range | ||
| - group | ||
| description: | ||
| description: Short description of field | ||
| type: string | ||
| default_field: | ||
| description: "Is this field a default? TODO: better description" | ||
| type: boolean | ||
| default: true | ||
| fields: | ||
| description: Sub-fields, when type is group | ||
| $ref: "#" # JSON-schema syntax for pointing to the root of the schema | ||
| required: | ||
| - name | ||
| - type |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| spec: | ||
| - name: base fields | ||
| description: Base fields definitions | ||
| type: file | ||
| name: "base-fields.yml" | ||
| required: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm can we make this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'm happy to change this to whatever matches the actual usage/parsing of these files. I don't know what that is, though! Are the files merged together somehow? If so, is there some ordering/precedence taken into account while merging?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file can have any name and merging order should not matter, at least so far.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 076597f. |
||
| contentMediaType: "application/x-yaml" | ||
| $ref: "./fields.spec.yml" | ||
| - name: dataset fields | ||
| description: Dataset-specific fields definitions | ||
| type: file | ||
| name: "fields.yml" | ||
| required: true | ||
| contentMediaType: "application/x-yaml" | ||
| $ref: "./fields.spec.yml" | ||
| - name: package fields | ||
| description: Package-specific fields definitions | ||
| type: file | ||
| name: "package-fields.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| $ref: "./fields.spec.yml" | ||
| - name: ECS fields | ||
| description: ECS fields definitions | ||
| type: file | ||
| name: "ecs.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| $ref: "./fields.spec.yml" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| ## | ||
|
ycombinator marked this conversation as resolved.
|
||
| ## Describes the specification for a dataset's manifest.yml file | ||
| ## | ||
| spec: | ||
| # Everything under here follows JSON schema (https://json-schema.org/), written as YAML for readability | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L39 | ||
| name: | ||
| description: Name of dataset | ||
| type: string | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L41 | ||
| title: | ||
| description: Title of dataset. | ||
| type: string | ||
| examples: | ||
| - AWS billing metrics | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L42 | ||
| release: | ||
| description: Stability of dataset. | ||
| type: string | ||
| enum: | ||
| - experimental | ||
| - beta | ||
| examples: | ||
| - beta | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L38 | ||
| type: | ||
| description: Type of dataset | ||
| type: string | ||
| enum: | ||
| - metrics | ||
| - logs | ||
| examples: | ||
| - metrics | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L46 | ||
| streams: | ||
| description: Streams offered by dataset. | ||
| type: array | ||
| items: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L66 | ||
| input: | ||
| type: string | ||
| examples: | ||
| - aws/metrics | ||
| - s3 | ||
| - file | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L71 | ||
| title: | ||
| type: string | ||
| examples: | ||
| - AWS Billing metrics | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L72 | ||
| description: | ||
| type: string | ||
| examples: | ||
| - Collect AWS billing metrics | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L70 | ||
| template_path: | ||
| description: "Path to Elasticsearch index template for stream." | ||
| type: string | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L67 | ||
| vars: | ||
| description: Input variables. | ||
| type: array | ||
| items: | ||
| type: object | ||
| additionalProperties: false | ||
| properties: | ||
| https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L77 | ||
| name: | ||
| description: Variable name. | ||
| type: string | ||
| examples: | ||
| - hosts | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L78 | ||
| type: | ||
| description: Data type of variable. | ||
| type: string | ||
| enum: | ||
| - text | ||
| - yaml | ||
| examples: | ||
| - text | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L79 | ||
| title: | ||
| description: Title of variable. | ||
| type: string | ||
| examples: | ||
| - Hosts | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L80 | ||
| description: | ||
| description: Short description of variable. | ||
| type: string | ||
| examples: | ||
| - "Hosts of integration service to connect to" | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L81 | ||
| multi: | ||
| description: Can variable contain multiple values? | ||
| type: boolean | ||
| default: false | ||
| examples: | ||
| - true | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L82 | ||
| required: | ||
| description: Is variable required? | ||
| type: boolean | ||
| default: false | ||
| examples: | ||
| - true | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L83 | ||
| show_user: | ||
| description: Should this variable be shown to the user by default? | ||
| type: boolean | ||
| default: true | ||
| examples: | ||
| - false | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L84 | ||
| default: | ||
| description: Default value(s) for variable | ||
| type: array | ||
| items: | ||
| type: string | ||
| examples: | ||
| - "http://127.0.0.1" | ||
| required: | ||
| - name | ||
| - type | ||
| # https://github.com/elastic/package-registry/blob/v0.8.0/util/dataset.go#L73 | ||
| enabled: | ||
| description: Is stream enabled? | ||
| type: boolean | ||
| required: | ||
|
ycombinator marked this conversation as resolved.
|
||
| - title | ||
| - description | ||
| - input | ||
| required: | ||
| - title | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| spec: | ||
| - description: Folder containing a single dataset definition | ||
| type: folder | ||
| pattern: "[a-z0-9][a-z0-9_]+[a-z0-9]" | ||
| minOccurences: 1 | ||
| contents: | ||
| - description: A dataset's manifest file | ||
| type: file | ||
| contentMediaType: "application/x-yaml" | ||
| name: "manifest.yml" | ||
| required: true | ||
| $ref: "./manifest.spec.yml" | ||
| - description: Folder containing field definitions | ||
| type: folder | ||
| name: fields | ||
| required: true | ||
| $ref: "./fields/spec.yml" | ||
| - description: Folder containing agent-related definitions | ||
| type: folder | ||
| name: agent | ||
| required: true | ||
| contents: | ||
| - description: Folder containing agent stream definitions | ||
| type: folder | ||
| name: stream | ||
| required: true | ||
| contents: | ||
| - description: Agent stream definition | ||
| type: file | ||
| name: "stream.yml.hbs" | ||
| contentMediaType: "application/x-hbs" | ||
| required: true | ||
| - description: Folder containing Elasticsearch assets | ||
| type: folder | ||
| name: elasticsearch | ||
| contents: | ||
| - description: Folder containing Elasticsearch Ingest Node pipeline definitions | ||
| type: folder | ||
| name: ingest_pipeline | ||
| contents: | ||
| - description: Default ingest pipeline definition | ||
| type: file | ||
| name: "default.yml" | ||
| contentMediaType: "application/x-yaml" | ||
| required: true |
Uh oh!
There was an error while loading. Please reload this page.