Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
subrequests
Commits
49a2161e
Unverified
Commit
49a2161e
authored
Sep 12, 2017
by
Mateu Aguiló Bosch
Browse files
feat(DX): Created a schema to validate incoming blueprints
parent
985ebb41
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema.json
0 → 100644
View file @
49a2161e
{
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"title"
:
"Subrequests format"
,
"description"
:
"Describes the subrequests payload format."
,
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/subrequest"
},
"definitions"
:
{
"subrequest"
:
{
"title"
:
"Subrequest"
,
"description"
:
"Contains all the necessary information to make the request."
,
"type"
:
"object"
,
"required"
:
[
"action"
,
"uri"
],
"additionalProperties"
:
false
,
"properties"
:
{
"action"
:
{
"title"
:
"Action"
,
"description"
:
"The action intended for the request. Each action can resolve into a different HTTP method."
,
"type"
:
"string"
,
"enum"
:
[
"view"
,
"create"
,
"update"
,
"replace"
,
"delete"
,
"exists"
,
"discover"
,
"noop"
]
},
"uri"
:
{
"title"
:
"URI"
,
"description"
:
"The URI where to make the subrequest."
,
"type"
:
"string"
,
"format"
:
"uri"
},
"requestId"
:
{
"title"
:
"Request ID"
,
"description"
:
"ID other requests can use to reference this request."
,
"type"
:
"string"
},
"body"
:
{
"title"
:
"Body"
,
"description"
:
"The JSON encoded body payload for HTTP requests send a body."
,
"type"
:
"string"
},
"headers"
:
{
"title"
:
"Headers"
,
"description"
:
"HTTP headers to be sent with the request."
,
"type"
:
"object"
,
"additionalProperties"
:
true
,
"patternProperties"
:
{
".*"
:
{
"type"
:
"string"
}
}
},
"waitFor"
:
{
"title"
:
"Parent ID"
,
"description"
:
"ID of another request that is a dependeny for this one."
,
"type"
:
"string"
}
}
}
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment