mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Document example for updating SuppliedProduct
This commit is contained in:
@@ -113,10 +113,14 @@ describe "SuppliedProducts", type: :request, swagger_doc: "dfc-v1.7/swagger.yaml
|
||||
put "Update SuppliedProduct" do
|
||||
consumes "application/json"
|
||||
|
||||
parameter name: :supplied_product, in: :body, schema: {}
|
||||
parameter name: :supplied_product, in: :body, schema: {
|
||||
example: ExampleJson.read("patch_supplied_product")
|
||||
}
|
||||
|
||||
let(:id) { variant.id }
|
||||
let(:supplied_product) { ExampleJson.read("patch_supplied_product") }
|
||||
let(:supplied_product) { |example|
|
||||
example.metadata[:operation][:parameters].first[:schema][:example]
|
||||
}
|
||||
|
||||
response "401", "unauthorized" do
|
||||
before { login_as nil }
|
||||
|
||||
@@ -374,6 +374,66 @@ paths:
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
schema:
|
||||
example:
|
||||
"@context":
|
||||
rdfs: http://www.w3.org/2000/01/rdf-schema#
|
||||
skos: http://www.w3.org/2004/02/skos/core#
|
||||
dfc: http://static.datafoodconsortium.org/ontologies/DFC_FullModel.owl#
|
||||
dc: http://purl.org/dc/elements/1.1/#
|
||||
dfc-b: http://static.datafoodconsortium.org/ontologies/DFC_BusinessOntology.owl#
|
||||
dfc-p: http://static.datafoodconsortium.org/ontologies/DFC_ProductOntology.owl#
|
||||
dfc-t: http://static.datafoodconsortium.org/ontologies/DFC_TechnicalOntology.owl#
|
||||
dfc-m: http://static.datafoodconsortium.org/data/measures.rdf#
|
||||
dfc-pt: http://static.datafoodconsortium.org/data/productTypes.rdf#
|
||||
dfc-f: http://static.datafoodconsortium.org/data/facets.rdf#
|
||||
dfc-p:hasUnit:
|
||||
"@type": "@id"
|
||||
dfc-b:hasUnit:
|
||||
"@type": "@id"
|
||||
dfc-b:hasQuantity:
|
||||
"@type": "@id"
|
||||
dfc-p:hasType:
|
||||
"@type": "@id"
|
||||
dfc-b:hasType:
|
||||
"@type": "@id"
|
||||
dfc-b:references:
|
||||
"@type": "@id"
|
||||
dfc-b:referencedBy:
|
||||
"@type": "@id"
|
||||
dfc-b:offeres:
|
||||
"@type": "@id"
|
||||
dfc-b:supplies:
|
||||
"@type": "@id"
|
||||
dfc-b:defines:
|
||||
"@type": "@id"
|
||||
dfc-b:affiliates:
|
||||
"@type": "@id"
|
||||
dfc-b:manages:
|
||||
"@type": "@id"
|
||||
dfc-b:offeredThrough:
|
||||
"@type": "@id"
|
||||
dfc-b:hasBrand:
|
||||
"@type": "@id"
|
||||
dfc-b:hasGeographicalOrigin:
|
||||
"@type": "@id"
|
||||
dfc-b:hasClaim:
|
||||
"@type": "@id"
|
||||
dfc-b:hasAllergenDimension:
|
||||
"@type": "@id"
|
||||
dfc-b:hasNutrimentDimension:
|
||||
"@type": "@id"
|
||||
dfc-b:hasPhysicalDimension:
|
||||
"@type": "@id"
|
||||
dfc:owner:
|
||||
"@type": "@id"
|
||||
dfc-t:hostedBy:
|
||||
"@type": "@id"
|
||||
dfc-t:hasPivot:
|
||||
"@type": "@id"
|
||||
dfc-t:represent:
|
||||
"@type": "@id"
|
||||
dfc-b:description: DFC-Pesto updated
|
||||
dfc-b:quantity: 17
|
||||
servers:
|
||||
- url: "/"
|
||||
|
||||
Reference in New Issue
Block a user