Skip to content

Instantly share code, notes, and snippets.

@kinlane
Created January 7, 2025 22:52
Show Gist options
  • Save kinlane/3959fa013fe74baea543a594744f357a to your computer and use it in GitHub Desktop.
Save kinlane/3959fa013fe74baea543a594744f357a to your computer and use it in GitHub Desktop.
product-json-schema
$schema: https://json-schema.org/draft/2020-12/schema
title: Product
description: This is a Schema.org compliant demo product schema.
type: object
required:
- identifier
- name
- description
properties:
identifier:
type: string
format: uuid
description: Unique identifier for the product.
minLength: 36
maxLength: 36
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
example: efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
name:
type: integer
description: Name of the product.
minLength: 10
maxLength: 10
example: Example Product
descripton:
type: string
description: The description of the product.
minLength: 10
maxLength: 2500
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
image:
type: string
description: An image for the organization.
minLength: 10
maxLength: 2048
example: 'http://example.com/image.jpg'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment