mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add website to DFC Enterprise API
This commit is contained in:
@@ -16,6 +16,7 @@ class EnterpriseBuilder < DfcBuilder
|
||||
catalogItems: catalog_items,
|
||||
localizations: [address],
|
||||
socialMedias: SocialMediaBuilder.social_medias(enterprise),
|
||||
websites: [enterprise.website].compact,
|
||||
).tap do |e|
|
||||
e.registerSemanticProperty("ofn:long_description") do
|
||||
enterprise.long_description
|
||||
|
||||
@@ -10,6 +10,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
|
||||
id: 10_000, owner: user, abn: "123 456", name: "Fred's Farm",
|
||||
description: "This is an awesome enterprise",
|
||||
facebook: "https://facebook.com/user",
|
||||
website: "https://openfoodnetwork.org",
|
||||
address: build(:address, id: 40_000, address1: "42 Doveton Street"),
|
||||
)
|
||||
end
|
||||
|
||||
@@ -318,6 +318,7 @@ paths:
|
||||
- "@id": http://test.host/api/dfc/enterprises/10000
|
||||
"@type": dfc-b:Enterprise
|
||||
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
|
||||
dfc-b:websitePage: openfoodnetwork.org
|
||||
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
|
||||
dfc-b:name: Fred's Farm
|
||||
dfc-b:hasDescription: This is an awesome enterprise
|
||||
|
||||
Reference in New Issue
Block a user