-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add schemas for patterns from the pattern directory.
- Loading branch information
1 parent
52107eb
commit 1efbfdb
Showing
8 changed files
with
158 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
schemas/rest-api/collections/pattern-directory-patterns.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema", | ||
"$id": "https://raw.githubusercontent.com/johnbillion/wp-json-schemas/trunk/schemas/rest-api/collections/pattern-directory-patterns.json", | ||
"title": "WP_REST_API_Pattern_Directory_Patterns", | ||
"description": "A collection of patterns from the pattern directory in a REST API context.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "../pattern-directory-pattern.json" | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "self", | ||
"href": "/wp/v2/pattern-directory/patterns", | ||
"targetSchema": { | ||
"$ref": "#" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/hyper-schema", | ||
"$id": "https://raw.githubusercontent.com/johnbillion/wp-json-schemas/trunk/schemas/rest-api/pattern-directory-pattern.json", | ||
"title": "WP_REST_API_Pattern_Directory_Pattern", | ||
"description": "A pattern from the pattern directory in a REST API context.", | ||
"type": "object", | ||
"readOnly": true, | ||
"required": [ | ||
"id", | ||
"title", | ||
"content", | ||
"categories", | ||
"keywords", | ||
"description", | ||
"viewport_width" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "The pattern ID.", | ||
"type": "integer" | ||
}, | ||
"title": { | ||
"description": "The pattern title, in human readable format.", | ||
"type": "string" | ||
}, | ||
"content": { | ||
"description": "The pattern content.", | ||
"contentMediaType": "text/html", | ||
"type": "string" | ||
}, | ||
"categories": { | ||
"description": "The pattern category slugs.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"keywords": { | ||
"description": "The pattern keywords.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"description": { | ||
"description": "The pattern detailed description.", | ||
"type": "string" | ||
}, | ||
"viewport_width": { | ||
"description": "The pattern viewport width for inserter preview.", | ||
"type": "integer" | ||
}, | ||
"block_types": { | ||
"description": "Block types that the pattern is intended to be used with.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"links": [ | ||
{ | ||
"rel": "collection", | ||
"href": "/wp/v2/pattern-directory/patterns", | ||
"targetSchema": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters