-
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.
improve error handling, add request body validation
- Loading branch information
1 parent
345b618
commit 91c6a88
Showing
15 changed files
with
3,136 additions
and
46 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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": "http://json-schema.org/draft-07/schema#", | ||
"title": "Capabilities Response", | ||
"type": "object", | ||
"required": [ | ||
"capabilities", | ||
"versions" | ||
], | ||
"properties": { | ||
"capabilities": { | ||
"$ref": "#/definitions/Capabilities" | ||
}, | ||
"versions": { | ||
"type": "string" | ||
} | ||
}, | ||
"definitions": { | ||
"Capabilities": { | ||
"title": "Capabilities", | ||
"description": "Describes the features of the specification which a data connector implements.", | ||
"type": "object", | ||
"properties": { | ||
"explain": true, | ||
"mutations": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/MutationCapabilities" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"query": { | ||
"anyOf": [ | ||
{ | ||
"$ref": "#/definitions/QueryCapabilities" | ||
}, | ||
{ | ||
"type": "null" | ||
} | ||
] | ||
}, | ||
"relationships": true | ||
} | ||
}, | ||
"MutationCapabilities": { | ||
"title": "Mutation Capabilities", | ||
"type": "object", | ||
"properties": { | ||
"nested_inserts": { | ||
"description": "Whether or not nested inserts to related collections are supported" | ||
}, | ||
"returning": true | ||
} | ||
}, | ||
"QueryCapabilities": { | ||
"title": "Query Capabilities", | ||
"type": "object", | ||
"properties": { | ||
"foreach": { | ||
"description": "Does the agent support foreach queries, i.e. queries with variables" | ||
}, | ||
"order_by_aggregate": { | ||
"description": "Does the agent support ordering by an aggregated array relationship?" | ||
}, | ||
"relation_comparisons": { | ||
"description": "Does the agent support comparisons that involve related collections (ie. joins)?" | ||
} | ||
} | ||
} | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Error Response", | ||
"type": "object", | ||
"required": [ | ||
"details", | ||
"message" | ||
], | ||
"properties": { | ||
"details": { | ||
"description": "Any additional structured information about the error" | ||
}, | ||
"message": { | ||
"description": "A human-readable summary of the error", | ||
"type": "string" | ||
} | ||
} | ||
} |
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": "http://json-schema.org/draft-07/schema#", | ||
"title": "Explain Response", | ||
"type": "object", | ||
"required": [ | ||
"details" | ||
], | ||
"properties": { | ||
"details": { | ||
"description": "A list of human-readable key-value pairs describing a query execution plan. For example, a connector for a relational database might return the generated SQL and/or the output of the `EXPLAIN` command. An API-based connector might encode a list of statically-known API calls which would be made.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.