Skip to content
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

Publish price as in new DFC standard #13079

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Jan 15, 2025

What? Why?

I noticed that our API documentation was out of date and we didn't publish prices correctly.

The change may affect API integrations that read prices from the OFN catalog. An offer's price attribute is now an object with currency instead of just a number value:

-                      dfc-b:hasPrice: 19.99
+                      dfc-b:hasPrice:
+                        "@type": dfc-b:Price
+                        dfc-b:value: 19.99
+                        dfc-b:hasUnit: dfc-m:AUD

What should we test?

  • Specs only.

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

The title of the pull request will be included in the release notes.

Dependencies

Documentation updates

@mkllnk mkllnk added the api changes These pull requests change the API and can break integrations label Jan 15, 2025
@mkllnk mkllnk self-assigned this Jan 15, 2025
@mkllnk mkllnk marked this pull request as ready for review January 15, 2025 23:53
@RachL
Copy link
Contributor

RachL commented Jan 16, 2025

@mkllnk does this impact the affliatedsalesdata endpoint? (no worries if it does, I just need to warn the users)

@mkllnk
Copy link
Member Author

mkllnk commented Jan 16, 2025

does this impact the affliatedsalesdata endpoint?

No. I kept that one the same.

Copy link
Collaborator

@rioug rioug left a comment

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Member

@dacook dacook left a comment

Choose a reason for hiding this comment

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

👍

@dacook dacook merged commit 51300ee into openfoodfoundation:master Jan 21, 2025
54 checks passed
@mkllnk mkllnk deleted the dfc-price branch January 22, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api changes These pull requests change the API and can break integrations
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants