-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28222da
commit abb328f
Showing
16 changed files
with
168 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/error.schema.json", | ||
"title": "Error", | ||
"description": "A human readable error message", | ||
"oneOf": [{ "type": "string" }, { "type": "null" }] | ||
} |
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,28 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/get-collection.response.schema.json", | ||
"title": "HTTP GET - Collection Endpoints", | ||
"description": "The HTTP response body for GET collection endpoints", | ||
"type": "object", | ||
"required": ["data", "error", "pagination"], | ||
"properties": { | ||
"data": { | ||
"description": "List of resources", | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"items": { | ||
"type": "object" | ||
} | ||
}, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.json" | ||
}, | ||
"pagination": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/pagination.schema.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,17 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/get-patch-resource.response.schema.json", | ||
"title": "HTTP GET/PATCH - Resource Endpoint", | ||
"description": "The HTTP response body for GET/PATCH resource endpoints", | ||
"type": "object", | ||
"required": ["data", "error"], | ||
"properties": { | ||
"data": { | ||
"description": "The resource", | ||
"oneOf": [{ "type": "object" }, { "type": "null" }] | ||
}, | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.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,13 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/options.response.schema.json", | ||
"title": "HTTP OPTIONS", | ||
"description": "The HTTP response body for OPTIONS requests that are not successful", | ||
"type": "object", | ||
"required": ["error"], | ||
"properties": { | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.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,36 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/pagination.schema.json", | ||
"title": "Pagination", | ||
"description": "The pagination information", | ||
"type": "object", | ||
"oneOf": [ | ||
{ | ||
"type": "object", | ||
"required": ["count", "limit", "offset", "total"], | ||
"properties": { | ||
"count": { | ||
"description": "The number of results in this response", | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"limit": { | ||
"description": "The limit for the number of results used for this response", | ||
"type": "integer", | ||
"minimum": -1 | ||
}, | ||
"offset": { | ||
"description": "The offset of the first resource returned", | ||
"type": "integer", | ||
"minimum": 0 | ||
}, | ||
"total": { | ||
"description": "Total number of records matching the query", | ||
"type": "integer", | ||
"minimum": 0 | ||
} | ||
} | ||
}, | ||
{ "type": "null" } | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/patch.request.schema.json", | ||
"title": "HTTP PATCH request", | ||
"description": "The HTTP request body for PATCH requests", | ||
"type": "object" | ||
} |
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,11 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/post.request.schema.json", | ||
"title": "HTTP POST request", | ||
"description": "The HTTP request body for POST requests", | ||
"type": "array", | ||
"minLength": 1, | ||
"items": { | ||
"type": "object" | ||
} | ||
} |
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,35 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/post.response.schema.json", | ||
"title": "HTTP POST response", | ||
"description": "The HTTP response body for POST requests", | ||
"type": "object", | ||
"required": ["data", "error"], | ||
"properties": { | ||
"data": { | ||
"description": "List of resources", | ||
"oneOf": [ | ||
{ | ||
"type": "array", | ||
"minItems": 1, | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.json" | ||
}, | ||
"data": { | ||
"description": "A single resource", | ||
"type": "object" | ||
} | ||
} | ||
} | ||
}, | ||
{ "type": "null" } | ||
] | ||
}, | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "https://envelope-zero.org/schemas/v3/options.response.schema.json", | ||
"$id": "https://envelope-zero.org/schemas/v4/options.response.schema.json", | ||
"title": "HTTP OPTIONS", | ||
"description": "The HTTP response body for OPTIONS requests that are not successful", | ||
"type": "object", | ||
"required": ["error"], | ||
"properties": { | ||
"error": { | ||
"$ref": "https://envelope-zero.org/schemas/v3/error.schema.json" | ||
"$ref": "https://envelope-zero.org/schemas/v4/error.schema.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
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