Skip to content

Commit

Permalink
feat(openapi): add DRD endpoints
Browse files Browse the repository at this point in the history
* adds all DRD endpoints
* adds a `binary` option for media type responses which is
  needed for image responses for DRD diagram endpoints

related to CAM-11534
  • Loading branch information
tmetzke authored May 5, 2021
1 parent cdf7d95 commit fbe6ea2
Show file tree
Hide file tree
Showing 16 changed files with 884 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html -->

<#assign sortByValues = [
'"id"',
'"key"',
'"name"',
'"version"',
'"deploymentId"',
'"category"',
'"tenantId"'
]>

<#assign params = {
"decisionRequirementsDefinitionId": {
"type": "string",
"desc": "Filter by decision requirements definition id."
},
"decisionRequirementsDefinitionIdIn": {
"type": "array",
"itemType": "string",
"desc": "Filter by decision requirements definition ids."
},
"name": {
"type": "string",
"desc": "Filter by decision requirements definition name."
},
"nameLike": {
"type": "string",
"desc": "Filter by decision requirements definition names that the parameter is a substring of."
},
"deploymentId": {
"type": "string",
"desc": "Filter by the id of the deployment a decision requirement definition belongs to."
},
"key": {
"type": "string",
"desc": "Filter by decision requirements definition key, i.e., the id in the DMN 1.3 XML. Exact
match."
},
"keyLike": {
"type": "string",
"desc": "Filter by decision requirements definition keys that the parameter is a substring of."
},
"category": {
"type": "string",
"desc": "Filter by decision requirements definition category. Exact match."
},
"categoryLike": {
"type": "string",
"desc": "Filter by decision requirements definition categories that the parameter is a substring
of."
},
"version": {
"type": "integer",
"format": "int32",
"desc": "Filter by decision requirements definition version."
},
"latestVersion": {
"type": "boolean",
"desc": "Only include those decision requirements definitions that are latest versions. Value may
only be `true`, as `false` is the default behavior."
},
"resourceName": {
"type": "string",
"desc": "Filter by the name of the decision requirements definition resource. Exact match."
},
"resourceNameLike": {
"type": "string",
"desc": "Filter by names of those decision requirements definition resources that the parameter is
a substring of."
},
"tenantIdIn": {
"type": "array",
"itemType": "string",
"desc": "Filter by a comma-separated list of tenant ids. A decision requirements definition must
have one of the given tenant ids."
},
"withoutTenantId": {
"type": "boolean",
"desc": "Only include decision requirements definitions which belong to no tenant. Value may only
be `true`, as `false` is the default behavior."
},
"includeDecisionRequirementsDefinitionsWithoutTenantId": {
"type": "boolean",
"desc": "Include decision requirements definitions which belong to no tenant. Can be used in
combination with `tenantIdIn`. Value may only be `true`, as `false` is the
default behavior."
}
}>
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@
array=false
additionalProperties=false
mediaType="application/json"
binary = false
examples=[]
last=false >
"${code}": {
Expand All @@ -269,6 +270,7 @@
array = array
additionalProperties = additionalProperties
mediaType = mediaType
binary = binary
examples = examples />
},
</#if>
Expand All @@ -294,6 +296,7 @@
array = type["array"]
additionalProperties = type["additionalProperties"]
mediaType = type["mediaType"]
binary = type["binary"]
examples = type["examples"] /><#sep>,
</#list>
},
Expand All @@ -311,8 +314,9 @@
array=false
additionalProperties=false
mediaType="application/json"
binary = false
examples=[] >
<#if mediaType == "application/xhtml+xml" | (mediaType == "application/json" & !array & flatType == "string")>
<#if mediaType == "application/xhtml+xml" | (mediaType == "application/json" & !array & flatType == "string") | binary>
"${mediaType}": {
"schema": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
{"name": "Batch"},
{"name": "Condition"},
{"name": "Decision Definition"},
{"name": "Decision Requirements Definition"},
{"name": "Deployment"},
{"name": "Engine"},
{"name": "Event Subscription"},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html -->
<#macro dto_macro docsUrl="">
<@lib.dto >

<@lib.property
name = "id"
type = "string"
desc = "The id of the decision requirements definition."
/>

<@lib.property
name = "key"
type = "string"
desc = "The key of the decision requirements definition."
/>

<@lib.property
name = "category"
type = "string"
desc = "The category of the decision requirements definition."
/>

<@lib.property
name = "name"
type = "string"
desc = "The name of the decision requirements definition."
/>

<@lib.property
name = "version"
type = "integer"
format = "int32"
desc = "The version of the decision requirements definition that the engine assigned to
it."
/>

<@lib.property
name = "resource"
type = "string"
desc = "The file name of the decision requirements definition."
/>

<@lib.property
name = "deploymentId"
type = "string"
desc = "The deployment id of the decision requirements definition."
/>

<@lib.property
name = "tenantId"
type = "string"
desc = "The tenant id of the decision requirements definition."
last = true
/>

</@lib.dto>
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-xml/index.html -->
<#macro dto_macro docsUrl="">
<@lib.dto >

<@lib.property
name = "id"
type = "string"
desc = "The id of the decision requirements definition."
/>

<@lib.property
name = "dmnXml"
type = "string"
desc = "An escaped XML string containing the XML that this decision requirements definition
was deployed with. Carriage returns, line feeds and quotation marks
are escaped."
last = true
/>

</@lib.dto>
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query-count/index.html -->
<#macro endpoint_macro docsUrl="">
{
<@lib.endpointInfo
id = "getDecisionRequirementsDefinitionsCount"
tag = "Decision Requirements Definition"
summary = "Get Decision Requirements Definition Count"
desc = "Requests the number of decision requirements definitions that fulfill the query
criteria.
Takes the same filtering parameters as the
[Get Decision Requirements Definitions](${docsUrl}/reference/rest/decision-requirements-definition/get-query/)
method."
/>

"parameters" : [

<#assign last = true >
<#include "/lib/commons/decision-requirements-definition.ftl" >
<@lib.parameters
object = params
last = last
/>

],

"responses": {

<@lib.response
code = "200"
dto = "CountResultDto"
desc = "Request successful."
examples = ['"example-1": {
"summary": "GET `/decision-requirements-definition/count?key=dish`",
"description": "GET `/decision-requirements-definition/count?key=dish`",
"value": {
"count": 1
}
}']
/>

<@lib.response
code = "400"
dto = "ExceptionDto"
desc = "Returned if some of the query parameters are invalid, for example if
a `sortOrder` parameter is supplied, but no `sortBy`. See the
[Introduction](${docsUrl}/reference/rest/overview/#error-handling)
for the error response format."
last = true
/>

}

}
</#macro>
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<#-- Generated From File: camunda-docs-manual/public/reference/rest/decision-requirements-definition/get-query/index.html -->
<#macro endpoint_macro docsUrl="">
{
<@lib.endpointInfo
id = "getDecisionRequirementsDefinitions"
tag = "Decision Requirements Definition"
summary = "Get Decision Requirements Definitions"
desc = "Queries for decision requirements definitions that fulfill given parameters.
Parameters may be the properties of decision requirements definitions, such as the name,
key or version. The size of the result set can be retrieved by using the
[Get Decision Requirements Definition Count](${docsUrl}/reference/rest/decision-requirements-definition/get-query-count/)
method."
/>

"parameters" : [

<#assign last = false >
<#include "/lib/commons/decision-requirements-definition.ftl" >
<@lib.parameters
object = params
last = last
/>
<#include "/lib/commons/sort-params.ftl">
<#assign last = true >
<#include "/lib/commons/pagination-params.ftl">

],

"responses": {

<@lib.response
code = "200"
dto = "DecisionRequirementsDefinitionDto"
array = true
desc = "Request successful."
examples = ['"example-1": {
"summary": "GET `/decision-requirements-definition?key=dish&sortBy=version&sortOrder=asc`",
"description": "GET `/decision-requirements-definition?key=dish&sortBy=version&sortOrder=asc`",
"value": [
{
"id": "dish:1:c633c195-41b7-11e6-b0ef-00aa004d0001",
"key": "dish",
"category": "drd-test",
"name": "Dish",
"version": 1,
"resource": "dish.dmn",
"deploymentId": "c627175e-41b7-11e6-b0ef-00aa004d0001",
"tenantId": null
}
]
}']
/>

<@lib.response
code = "400"
dto = "ExceptionDto"
desc = "Returned if some of the query parameters are invalid, for example if
a `sortOrder` parameter is supplied, but no `sortBy`. See the
[Introduction](${docsUrl}/reference/rest/overview/#error-handling)
for the error response format."
last = true
/>

}

}
</#macro>
Loading

0 comments on commit fbe6ea2

Please sign in to comment.