Skip to content

Use JSON Feed field names for banner images and attachment sizes - #120

Open
vitalivo wants to merge 1 commit into
gorilla:mainfrom
vitalivo:fix/json-feed-field-names
Open

vitalivo wants to merge 1 commit into
gorilla:mainfrom
vitalivo:fix/json-feed-field-names

Conversation

@vitalivo

Copy link
Copy Markdown

JSON Feed uses banner_image and size_in_bytes, but the structs currently use banner_ and size. As a result, conforming input loses those fields and generated output uses names that readers do not recognize.

Correct both struct tags and add round-trip tests against the specified JSON names. Both tests fail before the fix. Full go test -race -cover ./... passes (92.7% coverage), as does go vet ./....

Specification: https://www.jsonfeed.org/version/1.1/#items-a-nameitems-a and https://www.jsonfeed.org/version/1.1/#attachments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant