Add long description to DFC Enterprise API

This commit is contained in:
Maikel Linke
2023-11-15 14:59:15 +11:00
parent 3f4ef3e48b
commit 6266df5c76
2 changed files with 7 additions and 1 deletions

View File

@@ -15,7 +15,11 @@ class EnterpriseBuilder < DfcBuilder
suppliedProducts: supplied_products,
catalogItems: catalog_items,
localizations: [address],
)
).tap do |e|
e.registerSemanticProperty("ofn:long_description") do
enterprise.long_description
end
end
end
def self.enterprise_group(group)

View File

@@ -99,6 +99,7 @@ paths:
dfc-b:hasDescription: Beautiful
dfc-b:manages: http://test.host/api/dfc/enterprises/10000/catalog_items/10001
dfc-b:supplies: http://test.host/api/dfc/enterprises/10000/supplied_products/10001
ofn:long_description: "<p>Hello, world!</p><p>This is a paragraph.</p>"
- "@id": http://test.host/api/dfc/enterprises/10000/catalog_items/10001
"@type": dfc-b:CatalogItem
dfc-b:references: http://test.host/api/dfc/enterprises/10000/supplied_products/10001
@@ -322,6 +323,7 @@ paths:
dfc-b:VATnumber: 123 456
dfc-b:manages: http://test.host/api/dfc/enterprises/10000/catalog_items/10001
dfc-b:supplies: http://test.host/api/dfc/enterprises/10000/supplied_products/10001
ofn:long_description: "<p>Hello, world!</p><p>This is a paragraph.</p>"
dfc-b:affiliates: http://test.host/api/dfc/enterprise_groups/60000
- "@id": http://test.host/api/dfc/addresses/40000
"@type": dfc-b:Address