UNPKG

5.83 kBJSONView Raw
1{
2 "title": "Product",
3 "@id": "schema:Product",
4 "extends": "Thing",
5 "role": "tertiary",
6 "status": "stable",
7 "category": "other",
8 "description": "Any offered product or service. For example, a pair of shoes;\na haircut; or an episode of a TV show streamed online.\n",
9 "$comment": "The `Product` type allows you to provide details about a product such as the product\nbrand, logo and ID. This type can be used as any kind of product that is not [`CreativeWork`](./CreativeWork) item.\n\n`Product` is analogous, and structurally similar to, the \nJATS XML [`<product>`](https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/product.html) element which\ncontains the metadata concerning one product (for example, a book, software package, website, or\nhardware component) discussed in an article.\n\nTo meet Google's guidelines for [`Product`](https://developers.google.com/search/docs/data-types/product#product)\ninstances are required to have `image` and `name` properties.\n",
10 "properties": {
11 "type": {
12 "@id": "schema:type",
13 "description": "The name of the type.",
14 "type": "string",
15 "enum": [
16 "Product"
17 ],
18 "default": "Product",
19 "from": "Entity"
20 },
21 "id": {
22 "@id": "schema:id",
23 "description": "The identifier for this item.",
24 "type": "string",
25 "from": "Entity"
26 },
27 "meta": {
28 "@id": "stencila:meta",
29 "description": "Metadata associated with this item.",
30 "type": "object",
31 "from": "Entity"
32 },
33 "alternateNames": {
34 "@id": "schema:alternateName",
35 "description": "Alternate names (aliases) for the item.",
36 "type": "array",
37 "items": {
38 "type": "string"
39 },
40 "from": "Thing",
41 "isArray": true,
42 "isPlural": true,
43 "aliases": [
44 "alternateName"
45 ]
46 },
47 "description": {
48 "@id": "schema:description",
49 "description": "A description of the item.",
50 "$comment": "Allows for the description to be an array of nodes (e.g. an array of inline content,\nor a couple of paragraphs), or a string. The `minItems` restriction avoids a string\nbeing coerced into an array with a single string item.\n",
51 "anyOf": [
52 {
53 "type": "array",
54 "items": {
55 "$ref": "BlockContent.schema.json"
56 }
57 },
58 {
59 "type": "array",
60 "items": {
61 "$ref": "InlineContent.schema.json"
62 },
63 "minItems": 2
64 },
65 {
66 "type": "string"
67 }
68 ],
69 "from": "Thing"
70 },
71 "identifiers": {
72 "@id": "schema:identifier",
73 "description": "Any kind of identifier for any kind of Thing.",
74 "$comment": "Some identifiers have specific properties e.g the `issn` property for\nthe `Periodical` type. These should be used in preference to this\nproperty which is intended for identifiers that do not yet have a\nspecific property. Identifiers can be represented as strings, but\nusing a `PropertyValue` will usually be better because it allows\nfor `propertyID` (i.e. the type of identifier).\n",
75 "type": "array",
76 "items": {
77 "anyOf": [
78 {
79 "$ref": "PropertyValue.schema.json"
80 },
81 {
82 "type": "string"
83 }
84 ]
85 },
86 "from": "Thing",
87 "isArray": true,
88 "isPlural": true,
89 "aliases": [
90 "identifier"
91 ]
92 },
93 "images": {
94 "@id": "schema:image",
95 "description": "Images of the item.",
96 "type": "array",
97 "items": {
98 "anyOf": [
99 {
100 "$ref": "ImageObject.schema.json"
101 },
102 {
103 "type": "string",
104 "format": "uri"
105 }
106 ]
107 },
108 "from": "Thing",
109 "isArray": true,
110 "isPlural": true,
111 "aliases": [
112 "image"
113 ]
114 },
115 "name": {
116 "@id": "schema:name",
117 "description": "The name of the item.",
118 "type": "string",
119 "from": "Thing"
120 },
121 "url": {
122 "@id": "schema:url",
123 "description": "The URL of the item.",
124 "type": "string",
125 "format": "uri",
126 "from": "Thing"
127 },
128 "brands": {
129 "@id": "schema:brand",
130 "description": "Brands that the product is labelled with.",
131 "type": "array",
132 "items": {
133 "$ref": "Brand.schema.json"
134 },
135 "from": "Product",
136 "isArray": true,
137 "isPlural": true,
138 "aliases": [
139 "brand"
140 ]
141 },
142 "logo": {
143 "@id": "schema:logo",
144 "description": "The logo of the product.",
145 "anyOf": [
146 {
147 "$ref": "ImageObject.schema.json"
148 },
149 {
150 "type": "string",
151 "format": "uri"
152 }
153 ],
154 "from": "Product"
155 },
156 "productID": {
157 "@id": "schema:productID",
158 "description": "Product identification code.",
159 "type": "string",
160 "from": "Product"
161 }
162 },
163 "examples": [
164 {
165 "type": "Product",
166 "brand": {
167 "type": "Brand",
168 "name": "Astro"
169 },
170 "name": "Astrolabe",
171 "logo": {
172 "type": "ImageObject",
173 "contentUrl": "http://www.product-astrolabe.com/logo.png",
174 "caption": "Astrolabe Logo"
175 },
176 "productID": "AA55"
177 }
178 ],
179 "file": "Product.schema.yaml",
180 "children": [],
181 "descendants": [],
182 "$schema": "http://json-schema.org/draft-07/schema#",
183 "$id": "https://schema.stenci.la/v1/Product.schema.json",
184 "source": "https://github.com/stencila/schema/blob/master/schema/Product.schema.yaml",
185 "type": "object",
186 "propertyAliases": {
187 "alternateName": "alternateNames",
188 "identifier": "identifiers",
189 "image": "images",
190 "brand": "brands"
191 },
192 "additionalProperties": false,
193 "required": [
194 "type"
195 ]
196}