Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/go/internal/spec/statik.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions code/go/internal/validator/folder_item_content.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func loadItemContent(itemPath, mediaType string) ([]byte, error) {
}
case "application/json": // no need to convert the item content
case "text/markdown": // text/markdown can't be transformed into JSON format
case "text/plain": // text/plain should be left as-is
default:
return nil, fmt.Errorf("unsupported media type (%s)", mediaType)
}
Expand Down
2 changes: 2 additions & 0 deletions test/packages/good/NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Elastic package-spec
Copyright 2021 Elasticsearch B.V.
3 changes: 3 additions & 0 deletions versions/1/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,6 @@
- description: Remove deprecated JSON-formatted pipeline test configs
type: breaking-change
link: https://github.com/elastic/package-spec/pull/150
- description: Add optional NOTICE.txt file to a package
type: enhancement
link: https://github.com/elastic/package-spec/pull/151
5 changes: 5 additions & 0 deletions versions/1/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ spec:
name: "changelog.yml"
required: true
$ref: "./changelog.spec.yml"
- description: The package's NOTICE file
type: file
contentMediaType: "text/plain"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to define the content type here provided that no action is taken based on this? Did you try without this definition?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just made an assumption that this was necessary. I'm not intimately familiar with the details but am glad to remove if that is preferred.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay leaving this in. We may not take any action on this content type today but if we do in the future, the NOTICE file would automatically get covered.

name: "NOTICE.txt"
required: false
- description: Folder containing data stream definitions
type: folder
name: data_stream
Expand Down