mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Include DFC context in spec example
The DFC Prototype does include the context while the output of the DFC Connector refers to the URL of the published context. While that's more efficient, it's also brittle because the context is updated from time to time. That happened three days ago and working with the newly published context breaks our integration until we get an updated version of the DFC Connector containing the new URLs for datatypes.
This commit is contained in:
@@ -30,7 +30,11 @@ describe "SuppliedProducts", type: :request, swagger_doc: "dfc-v1.7/swagger.yaml
|
||||
# supply it. I couldn't do it with rswag when requiring it.
|
||||
parameter name: :supplied_product, in: :body, required: false, schema: {
|
||||
example: {
|
||||
'@context': "http://static.datafoodconsortium.org/ontologies/context.json",
|
||||
'@context': {
|
||||
'dfc-b': "http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#",
|
||||
'dfc-m': "http://static.datafoodconsortium.org/data/measures.rdf#",
|
||||
'dfc-pt': "http://static.datafoodconsortium.org/data/productTypes.rdf#",
|
||||
},
|
||||
'@id': "http://test.host/api/dfc-v1.7/enterprises/6201/supplied_products/0",
|
||||
'@type': "dfc-b:SuppliedProduct",
|
||||
'dfc-b:name': "Apple",
|
||||
|
||||
@@ -308,7 +308,10 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
example:
|
||||
"@context": http://static.datafoodconsortium.org/ontologies/context.json
|
||||
"@context":
|
||||
dfc-b: http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#
|
||||
dfc-m: http://static.datafoodconsortium.org/data/measures.rdf#
|
||||
dfc-pt: http://static.datafoodconsortium.org/data/productTypes.rdf#
|
||||
"@id": http://test.host/api/dfc-v1.7/enterprises/6201/supplied_products/0
|
||||
"@type": dfc-b:SuppliedProduct
|
||||
dfc-b:name: Apple
|
||||
|
||||
Reference in New Issue
Block a user