Skip to content

Instantly share code, notes, and snippets.

@hpl002
Created November 28, 2020 14:51
Show Gist options
  • Save hpl002/2a2078b2a61e64ae6b108137ff40c7b5 to your computer and use it in GitHub Desktop.
Save hpl002/2a2078b2a61e64ae6b108137ff40c7b5 to your computer and use it in GitHub Desktop.
simple test gist
{
"openapi": "3.0.0",
"info": {
"title": "Example API of new version",
"description": "Example desc",
"version": "v1",
"contact": {
"email": "[email protected]"
}
},
"servers": [
{
"url": "http://localhost:3010/api",
"description": "Sandbox"
}
],
"paths": {
"/flows": {
"get": {
"description": "List flow instances. Filter based on querystring.",
"parameters": [
{
"name": "Flow-Process-User",
"in": "header",
"description": "User header",
"required": false,
"schema": {
"type": "string"
},
"example": "{\"national_id\": \"01065100394\"}"
}
],
"responses": {
"200": {
"description": "A list of flow instances"
}
},
"tags": [
"flow"
]
}
},
"/flows/count": {
"get": {
"description": "Count the amount of processes. Filter based on querystring.",
"parameters": [
{
"name": "Flow-Process-User",
"in": "header",
"description": "User header",
"required": false,
"schema": {
"type": "string"
},
"example": "{\"national_id\": \"01065100394\"}"
}
],
"responses": {
"200": {
"description": "A count of flows you are allowed to access.",
"content": {
"application/json": {
"schema": {
"properties": {
"count": {
"type": "integer"
}
},
"example": {
"count": 15
}
}
}
}
}
},
"tags": [
"flow"
]
}
},
"/flows/{flowId}": {
"get": {
"description": "Get a flow instance. Filter based on querystring.",
"parameters": [
{
"description": "Flow id",
"in": "path",
"name": "flowId",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Flow-Process-User",
"in": "header",
"description": "User header",
"required": true,
"schema": {
"type": "string"
},
"example": "{\"national_id\": \"01065100394\"}"
}
],
"responses": {
"200": {
"description": "A flow instance"
}
},
"tags": [
"flow"
]
},
"delete": {
"description": "Delete a flow instance",
"parameters": [
{
"description": "Flow id",
"in": "path",
"name": "flowId",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "Flow-Process-User",
"in": "header",
"description": "User header",
"required": true,
"schema": {
"type": "string"
},
"example": "{\"national_id\": \"01065100394\"}"
}
],
"responses": {
"200": {
"description": "A flow instance"
}
},
"tags": [
"flow"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment